[go: up one dir, main page]

login
A328103
Bitwise XOR of trajectories of rule 30 and rule 124, when both are started from a lone 1 cell: a(n) = A110240(n) XOR A267357(n).
9
0, 4, 30, 100, 398, 1748, 6510, 28628, 102590, 456132, 1642078, 7289764, 26336590, 116802708, 420215854, 1865678868, 6741198206, 29904470916, 107568473246, 477629808612, 1725756768270, 7655529847380, 27537572248046, 122273029571156, 441793665700414, 1959816793456452, 7049616389341662, 31301899019407908, 113099196716630990, 501713069953322004
OFFSET
0,2
FORMULA
a(n) = A110240(n) XOR A267357(n), where XOR is bitwise exclusive or (A003987).
PROG
(PARI)
A269160(n) = bitxor(n, bitor(2*n, 4*n));
A110240(n) = if(!n, 1, A269160(A110240(n-1)));
A269174(n) = bitand(bitor(n, n<<1), bitor(bitxor(n, n<<1), bitxor(n, n<<2)));
A267357(n) = if(!n, 1, A269174(A267357(n-1)));
A328103(n) = bitxor(A110240(n), A267357(n));
\\ 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
Cf. A003987, A110240, A267357, A269160, A269174, A328109 (binary weight of terms).
Cf. also A327971, A327972, A327973, A327976, A328104 for other such combinations, and also A328111.
Sequence in context: A201975 A109670 A014697 * A211624 A027297 A211628
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 05 2019
STATUS
approved