OFFSET
0,2
COMMENTS
For n >= 1, a(n) equals the number of words of length n-1 on the alphabet {0,1,...,12} with no two adjacent letters identical. - Milan Janjic, Jan 31 2015
LINKS
Kenny Lau, Table of n, a(n) for n = 0..926
M. Janjic, On Linear Recurrence Equations Arising from Compositions of Positive Integers, J. Int. Seq. 18 (2015) # 15.4.7.
Index entries for linear recurrences with constant coefficients, signature (12).
FORMULA
a(0)=1; for n > 0, a(n) = 13*12^(n-1). - Vincenzo Librandi, Dec 05 2009
E.g.f.: (13*exp(12*x) - 1)/12. - G. C. Greubel, Sep 24 2019
MAPLE
k:=13; seq(`if`(n=0, 1, k*(k-1)^(n-1)), n = 0..25); # G. C. Greubel, Sep 24 2019
MATHEMATICA
Join[{1}, 13*12^Range[0, 25]] (* Vladimir Joseph Stephan Orlovsky, Jul 11 2011 *)
PROG
(PARI) a(n)=if(n, 13*12^(n-1), 1) \\ Charles R Greathouse IV, Jul 01 2016
(Python) for i in range(1001):print(i, 13*12**(i-1) if i>0 else 1) # Kenny Lau, Aug 01 2017
(Magma) k:=13; [1] cat [k*(k-1)^(n-1): n in [1..25]]; // G. C. Greubel, Sep 24 2019
(Sage) k=13; [1]+[k*(k-1)^(n-1) for n in (1..25)] # G. C. Greubel, Sep 24 2019
(GAP) k:=13;; Concatenation([1], List([1..25], n-> k*(k-1)^(n-1) )); # G. C. Greubel, Sep 24 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Dec 05 2009
STATUS
approved