login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A170732 Expansion of g.f.: (1+x)/(1 - 12*x). 51

%I #37 Sep 08 2022 08:45:49

%S 1,13,156,1872,22464,269568,3234816,38817792,465813504,5589762048,

%T 67077144576,804925734912,9659108818944,115909305827328,

%U 1390911669927936,16690940039135232,200291280469622784,2403495365635473408,28841944387625680896,346103332651508170752

%N Expansion of g.f.: (1+x)/(1 - 12*x).

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

%H Kenny Lau, <a href="/A170732/b170732.txt">Table of n, a(n) for n = 0..926</a>

%H M. Janjic, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Janjic/janjic63.html">On Linear Recurrence Equations Arising from Compositions of Positive Integers</a>, J. Int. Seq. 18 (2015) # 15.4.7.

%H <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (12).

%F a(0)=1; for n > 0, a(n) = 13*12^(n-1). - _Vincenzo Librandi_, Dec 05 2009

%F E.g.f.: (13*exp(12*x) - 1)/12. - _G. C. Greubel_, Sep 24 2019

%p k:=13; seq(`if`(n=0, 1, k*(k-1)^(n-1)), n = 0..25); # _G. C. Greubel_, Sep 24 2019

%t Join[{1}, 13*12^Range[0, 25]] (* _Vladimir Joseph Stephan Orlovsky_, Jul 11 2011 *)

%o (PARI) a(n)=if(n,13*12^(n-1),1) \\ _Charles R Greathouse IV_, Jul 01 2016

%o (Python) for i in range(1001):print(i,13*12**(i-1) if i>0 else 1) # _Kenny Lau_, Aug 01 2017

%o (Magma) k:=13; [1] cat [k*(k-1)^(n-1): n in [1..25]]; // _G. C. Greubel_, Sep 24 2019

%o (Sage) k=13; [1]+[k*(k-1)^(n-1) for n in (1..25)] # _G. C. Greubel_, Sep 24 2019

%o (GAP) k:=13;; Concatenation([1], List([1..25], n-> k*(k-1)^(n-1) )); # _G. C. Greubel_, Sep 24 2019

%Y Cf. A003945, A003953, A003954.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_, Dec 05 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:12 EDT 2024. Contains 371969 sequences. (Running on oeis4.)