The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A037480 Base-3 digits are, in order, the first n terms of the periodic sequence with initial period 1,2. 3
1, 5, 16, 50, 151, 455, 1366, 4100, 12301, 36905, 110716, 332150, 996451, 2989355, 8968066, 26904200, 80712601, 242137805, 726413416, 2179240250, 6537720751, 19613162255, 58839486766, 176518460300, 529555380901 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = (5*3^n + (-1)^n - 6)/8 . - Paul D. Hanna, Sep 23 2007
a(n) = 3*a(n-1)+a(n-2)-3*a(n-3). G.f.: x*(2*x+1) / ((x-1)*(x+1)*(3*x-1)). - Colin Barker, Apr 30 2014
MAPLE
a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=2*a[n-1]+3*a[n-2]+3 od: seq(a[n], n=1..33); # Zerinvary Lajos, Dec 14 2008
MATHEMATICA
CoefficientList[Series[(2 x + 1)/((x - 1) (x + 1) (3 x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, May 01 2014 *)
Table[FromDigits[PadRight[{}, n, {1, 2}], 3], {n, 30}] (* or *) LinearRecurrence[ {3, 1, -3}, {1, 5, 16}, 30] (* Harvey P. Dale, Dec 15 2019 *)
PROG
(PARI) Vec(x*(2*x+1)/((x-1)*(x+1)*(3*x-1)) + O(x^100)) \\ Colin Barker, Apr 30 2014
CROSSREFS
Sequence in context: A082001 A084356 A007806 * A027108 A304168 A317817
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved

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 June 7 09:13 EDT 2024. Contains 373161 sequences. (Running on oeis4.)