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!)
A033121 Base-3 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,1. 1
1, 3, 10, 31, 93, 280, 841, 2523, 7570, 22711, 68133, 204400, 613201, 1839603, 5518810, 16556431, 49669293, 149007880, 447023641, 1341070923, 4023212770, 12069638311, 36208914933, 108626744800, 325880234401, 977640703203, 2932922109610, 8798766328831 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = 3*a(n-1) + a(n-3) - 3*a(n-4).
G.f.: x*(1+x^2) / ((1-x)*(1-3*x)*(1+x+x^2)). - Colin Barker, Dec 24 2015
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {1, 0, 1}], 3], {n, 30}] (* or *) LinearRecurrence[ {3, 0, 1, -3}, {1, 3, 10, 31}, 30] (* Harvey P. Dale, Jan 20 2017 *)
PROG
(PARI) Vec(x*(1+x^2)/((1-x)*(1-3*x)*(1+x+x^2)) + O(x^30)) \\ Colin Barker, Dec 24 2015
CROSSREFS
Sequence in context: A290061 A212031 A339032 * A180432 A237930 A192337
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 April 28 05:00 EDT 2024. Contains 372020 sequences. (Running on oeis4.)