login
A241666
Gives the value (either 0 or 1) that the trajectory of n under A241663 eventually reaches.
2
0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
OFFSET
0
COMMENTS
a(n) = 1 for n = 1, 5, 25, 29, 125, 145, 149, 625, 725, 745, 841, ... - Alois P. Heinz, Apr 30 2014
FORMULA
a(0) = 0, a(1) = 1, and for n > 1, a(n) = a(A241663(n)). - Antti Karttunen, Nov 05 2017
EXAMPLE
A241663(A241663(7))=0, so a(7)=0. A241663(A241663(A241663(29)))=1, so a(29)=1.
PROG
(Python) # The link above provides a Python program. Input m=4, as well as starting and ending values of n. The fourth string of numbers will be this sequence.
(Scheme, with memoization-macro definec)
(definec (A241666 n) (if (<= n 1) n (A241666 (A241663 n)))) ;; Antti Karttunen, Nov 05 2017
CROSSREFS
Sequence in context: A103588 A153638 A122415 * A324539 A324964 A285957
KEYWORD
nonn
AUTHOR
Colin Defant, Apr 26 2014
EXTENSIONS
Term a(0)=0 prepended and more terms added by Antti Karttunen, Nov 05 2017
STATUS
approved