OFFSET
0,3
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..1023
FORMULA
PROG
(PARI)
A269161(n) = bitxor(4*n, bitor(2*n, n));
(PARI)
A030101(n) = if(n<1, 0, subst(Polrev(binary(n)), x, 2));
A327971write(up_to) = { my(s=1, n=0); for(n=0, up_to, write("b327971.txt", n, " ", bitxor(s, A030101(s))); s = A269160(s)); };
(Python)
def A269160(n): return(n^((n<<1)|(n<<2)))
def A269161(n): return((n<<2)^((n<<1)|n))
def genA327971():
'''Yield successive terms of A327971.'''
s1 = 1
s2 = 1
while True:
yield (s1^s2)
s1 = A269160(s1)
s2 = A269161(s2)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 03 2019
STATUS
approved