OFFSET
0,3
COMMENTS
From Antti Karttunen, Oct 15 2016: (Start)
Iterates of map f : n -> A005940(1+n), (Doudna-sequence, but with starting offset zero) starting from the initial value 0. Conversely, the unique infinite sequence such that a(n) = A156552(a(n+1)) and a(0) = 0.
On the other hand, this sequence cannot ever fall into a loop because 0 is not in the range of map f, for n=0.., while f is injective on [1..]. Thus the values obtained by this sequence are not bounded, although there might be more nonmonotonic positions like for example there is from a(10) = 16 to a(11) = 11.
The formula A008966(a(n+1)) = A085357(a(n)) tells that the squarefreeness of the next term a(n+1) is determined by whether the previous term a(n) is a fibbinary number (A003714) or not. Numerous other such correspondences hold, and they hold also for any other trajectories outside of this sequence.
Even and odd terms alternate. No two squares can occur in succession because A106737 obtains even values for all squares > 1 and A000005 is odd for all squares. More directly this is seen from the fact that the rightmost 1-bit in the binary expansion of any square is always alone.
(End)
LINKS
Yang Haoran, Table of n, a(n) for n = 0..23
FORMULA
EXAMPLE
101 is interpreted as 3^1 * 2^1 = 6. 1110011 is interpreted as 5^3 * 2^2 = 500.
MATHEMATICA
NestList[Times @@ Flatten@ MapIndexed[Prime[#2]^#1 &, #] &@ Flatten@ MapIndexed[If[Total@ #1 == 0, ConstantArray[0, Boole[First@ #2 == 1] + Length@ #1 - 1], Length@ #1] &, Reverse@ Split@ IntegerDigits[#, 2]] &, 0, 21] (* Michael De Vlieger, Oct 17 2016 *)
PROG
(PARI) step(n)=my(t=1, v); forprime(p=2, , v=valuation(n+1, 2); t*=p^v; n>>=v+1; if(!n, return(t)))
t=0; concat(0, vector(20, n, t=step(t))) \\ Charles R Greathouse IV, Sep 01 2015
(Scheme, with memoization-macro definec)
;; Antti Karttunen, Oct 15 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Mark Zegarelli (mtzmtz(AT)gmail.com), Dec 16 2008
EXTENSIONS
a(20)-a(22) from Yang Haoran, Aug 31 2015
STATUS
approved