login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A051065
a(n) = A004128(n) mod 2.
4
0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1
OFFSET
0,1
REFERENCES
Letter from Gary W. Adamson concerning Prouhet-Thue-Morse sequence, Nov. 11, 1999.
FORMULA
a(0)=0, a(n) = (n + a(floor(n/3))) mod 2. - Alex Ratushnyak, Aug 17 2012
PROG
(Python)
TOP = 1000
a = [0]*TOP
for n in range(1, TOP):
print(a[n-1], end=', ')
a[n] = (n + a[n//3]) % 2
# Alex Ratushnyak, Aug 17 2012
(PARI) a(n)=if(n<1, 0, (a(n\3)+n)%2) \\ Benoit Cloitre, Nov 21 2013
CROSSREFS
KEYWORD
nonn,easy
EXTENSIONS
More terms from James A. Sellers, Dec 11 1999
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 21 17:36 EDT 2024. Contains 376087 sequences. (Running on oeis4.)