A096269 a(n) = number of distinct palindromes of length n that occur in A096268.
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
Links
- Antti Karttunen, Table of n, a(n) for n = 1..16384
- 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.
Crossrefs
Cf. A096268.
Programs
-
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
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
Extensions
More terms from David Wasserman, Nov 01 2007