Anonymous user
Ludic numbers: Difference between revisions
m
→{{header|PARI/GP}}: editing lang tags
(→{{header|Elixir}}: used in operator) |
m (→{{header|PARI/GP}}: editing lang tags) |
||
Line 1,279:
===Version #1. Creating vector of ludic numbers' flags, where the index of each flag=1 is the ludic number.===
<lang
\\ Creating Vlf - Vector of ludic numbers' flags,
\\ where the index of each flag=1 is the ludic number.
\\ 2/28/16 aev
ludic(maxn)={my(Vlf=vector(maxn,z,1),n2=maxn/2,k,j1);
for(i=2,n2,
Line 1,328 ⟶ 1,329:
Upgraded script from [http://oeis.org/A003309 A003309] to meet task requirements.
<lang
\\ Creating Vl - Vector of ludic numbers.
\\ 2/28/16 aev
ludic2(maxn)={my(Vw=vector(maxn, x, x+1),Vl=Vec([1]),vwn=#Vw,i);
while(vwn>0, i=Vw[1]; Vl=concat(Vl,[i]);
|