login
a(n) = number of distinct palindromes of length n that occur in A096268.
2

%I #16 Mar 30 2021 18:43:05

%S 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,

%T 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,

%U 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

%N a(n) = number of distinct palindromes of length n that occur in A096268.

%H Antti Karttunen, <a href="/A096269/b096269.txt">Table of n, a(n) for n = 1..16384</a>

%H J.-P. Allouche, M. Baake, J. Cassaigns, and D. Damanik, <a href="http://arxiv.org/abs/math/0106121">Palindrome complexity</a>, arXiv:math/0106121 [math.CO], 2001; <a href="http://dx.doi.org/10.1016/S0304-3975(01)00212-2">Theoretical Computer Science</a>, 292 (2003), 9-31.

%H D. Damanik, <a href="https://doi.org/10.1016/S0166-218X(99)00199-7">Local symmetries in the period-doubling sequence</a>, Discrete Appl. Math., 100 (2000), 115-121.

%F For even n >= 4, a(n) = 0; for odd n >= 5, a(n) = a(2n-1) = a(2n+1).

%F 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

%o (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

%Y Cf. A096268.

%K nonn,easy,base

%O 1,1

%A _N. J. A. Sloane_, Jun 22 2004

%E More terms from _David Wasserman_, Nov 01 2007