OFFSET
1,1
LINKS
PROG
(PARI)
A269161(n) = bitxor(4*n, bitor(2*n, n));
\\ Use this one for writing b-files:
A030101(n) = if(n<1, 0, subst(Polrev(binary(n)), x, 2));
A327976write(up_to) = { my(s=1, t, n=0); for(n=1, up_to, t = A269160(s); write("b327976.txt", n, " ", bitxor(2*A030101(s), t)); s = t); };
(Python)
def A269160(n): return(n^((n<<1)|(n<<2)))
def A269161(n): return((n<<2)^((n<<1)|n))
def genA327976():
'''Yield successive terms of A327976.'''
s1 = 1
s2 = 1
while True:
s1 = A269160(s1)
yield (s1^(s2<<1))
s2 = A269161(s2)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 04 2019
STATUS
approved