login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A106710
Number of words with n letters from an alphabet of size 26 with at least two equal consecutive letters.
2
0, 26, 1326, 50726, 1725126, 55009526, 1684153926, 50135658326, 1462218522726, 41984966747126, 1190791264331526, 33440126095275926, 931432109043580326, 25766955599293244726, 708683864685628269126, 19394355959426432653526, 528467641885089690397926
OFFSET
1,2
FORMULA
a(n) = 26^n - 26*25^(n - 1).
From Colin Barker, Nov 05 2015: (Start)
a(n) = 51*a(n-1) - 650*a(n-2) for n>2.
G.f.: 26*x^2 / ((1-25*x)*(1-26*x)). (End)
From G. C. Greubel, Sep 10 2021: (Start)
a(n) = 26*(A009970(n-1) - A009969(n-1)).
E.g.f.: exp(26*x) - (26/25)*exp(25*x). (End)
EXAMPLE
a(3) = 1326 because 26^3 - 26*(25^2) = 1326.
MATHEMATICA
Table[26*(26^(n-1) -25^(n-1)), {n, 25}] (* G. C. Greubel, Sep 10 2021 *)
PROG
(PARI) a(n) = 26^n - 26*(25^(n - 1)); \\ Michel Marcus, Aug 14 2013
(PARI) concat(0, Vec(26*x^2/((25*x-1)*(26*x-1)) + O(x^100))) \\ Colin Barker, Nov 05 2015
(Sage) [26*(26^(n-1) - 25^(n-1)) for n in (1..25)] # G. C. Greubel, Sep 10 2021
CROSSREFS
Sequence in context: A187463 A160311 A220955 * A114052 A042303 A042300
KEYWORD
nonn,easy
AUTHOR
Luca Colucci, May 14 2005
EXTENSIONS
More terms from Michel Marcus, Aug 14 2013
STATUS
approved