A251861 Number of non-palindromic words (length n>0) over the alphabet of 26 letters.
0, 650, 16900, 456300, 11863800, 308898200, 8031353200, 208826607600, 5429491797600, 141167083772000, 3670344178072000, 95428956352766400, 2481152865171926400, 64509974695265340800, 1677259342076898860800, 43608742899220046995200, 1133827315379721221875200, 29479510200008489360729600, 766467265200220723378969600, 19928148895209267985244544000
Offset: 1
Examples
For n=2, the a(2)=650 solutions are {ab,ac,...,az,...,yz}, but not, e.g., 'aa' or 'zz'.
Links
- Indranil Ghosh, Table of n, a(n) for n = 1..705
- Index entries for linear recurrences with constant coefficients, signature (26,26,-676).
Crossrefs
Programs
-
Maple
seq(26^n - 26^ceil(n/2), n = 1 .. 50); # Robert Israel, Dec 11 2014
-
Mathematica
f[n_, b_] := b^n - b^Ceiling[n/2]; Array[ f[#, 26] &, 50] (* Robert G. Wilson v, Dec 10 2014 *) Table[2^(n/2-1)*13^(n/2)*((-1)^n*(Sqrt[26]-1)-Sqrt[26]-1)+26^n, {n, 50}]
-
PARI
a(n)=26^n-26^ceil(n/2) \\ Charles R Greathouse IV, Dec 10 2014
Formula
a(n) = 2^(n/2-1)*13^(n/2)*((-1)^n*(sqrt(26)-1)-sqrt(26)-1)+26^n.
a(n) = 26^n - 26^ceiling(n/2).
G.f.: 650*x^2/((1 - 26*x)*(1 - 26*x^2)).
a(n+3) = 26*a(n+2) + 26*a(n+1) - 676*a(n). - Robert Israel, Dec 11 2014
Comments