OFFSET
0,2
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
MAPLE
N0:= 10: # to get the first (N0+1)*(N0+2)/2 terms
V:= 3^N0:
S:= {seq(seq(2^i*3^j, i=0..ilog2(V/3^j)), j=0..N0)}:
# in Maple 11 or earlier, uncomment the next line and comment out the previous one
# S:= sort([seq(seq(2^i*3^j, i=0..ilog2(V/3^j)), j=0..N0)]):
for k from 1 to nops(S) do
r:= S[k];
jr:= padic[ordp](r, 3);
ir:= jr + padic[ordp](r, 2);
A[1+jr+ir*(ir+1)/2] := k;
od:
seq(A[k], k=1..(N0+1)*(N0+2)/2); # Robert Israel, Sep 22 2014
PROG
(PARI) lista(nn) = {w = readvec("b036561.txt"); v = readvec("b003586.txt"); for (i=1, nn, print1(setsearch(v, w[i], 0), ", "); ); }
(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a247714 = (+ 1) . fromJust .
(`elemIndex` a003586_list) . (a036561_list !!)
-- Reinhard Zumkeller, Sep 23 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Sep 22 2014
STATUS
approved