OFFSET
0,2
COMMENTS
Central diagonal of A099884 when viewed as a square array. Thus also a subsequence of A118666. - Antti Karttunen, Jan 18 2020
LINKS
Robert Price, Table of n, a(n) for n = 0..999
Eric Weisstein's World of Mathematics, Rule 102
FORMULA
It appears that a(n) = A099885(2*n). - Peter Bala, Feb 01 2017
From Antti Karttunen, Jan 19 2020: (Start)
Bala's observation is correct, and follows from the formula given below and from the fact that this is the central diagonal of square array A099884.
a(0) = 1; for n > 0, a(n) = A048726(a(n-1)).
(End)
EXAMPLE
1; 1, 1, 0; 1, 0, 1, 0, 0; 1, 1, 1, 1, 0, 0, 0; 1, 0, 0, 0, 1, 0, 0, 0, 0; ...
MATHEMATICA
NestList[BitXor[4#, 2#]&, 1, 50] (* Paolo Xausa, Oct 04 2023 *)
PROG
(PARI) A117998(n) = (subst(lift(Mod(1+'x, 2)^n), 'x, 2)<<n); \\ Antti Karttunen, Jan 19 2020, after Gheorghe Coserea's code for A001317.
(Python)
def A117998(n): return sum((bool(~n&n-k)^1)<<k for k in range(n+1))<<n # Chai Wah Wu, May 03 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric W. Weisstein, Apr 08 2006
STATUS
approved