login
A096269
a(n) = number of distinct palindromes of length n that occur in A096268.
2
2, 1, 3, 0, 4, 0, 3, 0, 4, 0, 4, 0, 3, 0, 3, 0, 4, 0, 4, 0, 4, 0, 4, 0, 3, 0, 3, 0, 3, 0, 3, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3
OFFSET
1,1
LINKS
J.-P. Allouche, M. Baake, J. Cassaigns, and D. Damanik, Palindrome complexity, arXiv:math/0106121 [math.CO], 2001; Theoretical Computer Science, 292 (2003), 9-31.
D. Damanik, Local symmetries in the period-doubling sequence, Discrete Appl. Math., 100 (2000), 115-121.
FORMULA
For even n >= 4, a(n) = 0; for odd n >= 5, a(n) = a(2n-1) = a(2n+1).
For odd n >= 5, let x be the power of 2 closest to n; if n > x then a(n) = 4 and if n < x then a(n) = 3. - David Wasserman, Nov 01 2007
PROG
(PARI) A096269(n) = if(n<=2, 3-n, if(3==n, n, if(!(n%2), 0, my(pp2=2^(#binary(n)-1)); if(((2*pp2)-n)<(n-pp2), 3, 4)))); \\ Antti Karttunen, Mar 30 2021
CROSSREFS
Cf. A096268.
Sequence in context: A092093 A197386 A357991 * A260437 A262677 A307742
KEYWORD
nonn,easy,base
AUTHOR
N. J. A. Sloane, Jun 22 2004
EXTENSIONS
More terms from David Wasserman, Nov 01 2007
STATUS
approved