OFFSET
0,2
LINKS
PROG
(PARI)
A269160(n) = bitxor(n, bitor(2*n, 4*n));
A269174(n) = bitand(bitor(n, n<<1), bitor(bitxor(n, n<<1), bitxor(n, n<<2)));
\\ Use this one for writing b-files:
A328103write(up_to) = { my(s1=1, s2=1); for(n=0, up_to, write("b328103.txt", n, " ", bitxor(s1, s2)); s1 = A269160(s1); s2 = A269174(s2)); };
(Python)
def A269160(n): return(n^((n<<1)|(n<<2)))
def A269174(n): return((n|(n<<1))&((n^(n<<1))|(n^(n<<2))))
def genA328103():
'''Yield successive terms of A328103.'''
s1 = 1
s2 = 1
while True:
yield (s1^s2)
s1 = A269174(s1)
s2 = A269160(s2)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 05 2019
STATUS
approved