A117943 a(1) = 0, a(2) = 1; a(3n) = a(n); if every third term (a(3), a(6), a(9), ...) is deleted, this gives back the original sequence.
0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1
Offset: 1
References
- J.-P. Delahaye, La suite du lézard et autres inventions, Pour la Science, No. 353, 2007.
Links
- Eric Angelini, Decimation-like sequences
- Eric Angelini, Decimation-like sequences [Cached copy, with permission]
Programs
-
PARI
a(n)=while(n>5,if(n%3,n-=n\3,n\=3));n==2 \\ M. F. Hasler, Mar 07 2015
Formula
a(1)=0, a(1)=1; and for n>2, a(n)=a(n/3) if Mod(n,3)=0, a(n)=a(n-floor(n/3)) if Mod(n,3)>0. - John W. Layman, Feb 14 2007
Extensions
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jul 14 2007
Definition simplified by M. F. Hasler, Mar 07 2015
Comments