login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A037496 Base-3 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,2. 0
1, 3, 11, 34, 102, 308, 925, 2775, 8327, 24982, 74946, 224840, 674521, 2023563, 6070691, 18212074, 54636222, 163908668, 491726005, 1475178015, 4425534047, 13276602142, 39829806426, 119489419280, 358468257841, 1075404773523 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..26.

Index entries for linear recurrences with constant coefficients, signature (3,0,1,-3).

FORMULA

a(n) = 3*a(n-1) + a(n-3) - 3*a(n-4).

From Bruno Berselli, Jan 20 2011: (Start)

G.f.: x*(1+2*x^2)/((1-x)*(1-3*x)*(1+x+x^2)).

a(n) = round((11*3^n-13)/26) = (11*3^n-13)/26 + ((3-7*i*sqrt(3))*(-1+i*sqrt(3))^n + (3+7*i*sqrt(3))*(-1-i*sqrt(3))^n)/(78*2^n) where i is the imaginary unit. (End)

MATHEMATICA

With[{c=PadRight[{}, 30, {1, 0, 2}]}, Table[FromDigits[Take[c, n], 3], {n, 30}]] (* or *) LinearRecurrence[{3, 0, 1, -3}, {1, 3, 11, 34}, 30] (* Harvey P. Dale, Mar 30 2012 *)

PROG

(MAGMA) I:=[1, 3, 11, 34]; [n le 4 select I[n] else 3*Self(n-1) +Self(n-3)-3*Self(n-4): n in [1..30]]; // Vincenzo Librandi, Nov 26 2016

CROSSREFS

Sequence in context: A036542 A084266 A052471 * A180762 A134326 A295546

Adjacent sequences:  A037493 A037494 A037495 * A037497 A037498 A037499

KEYWORD

nonn,base,easy

AUTHOR

Clark Kimberling

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 06:19 EDT 2019. Contains 322294 sequences. (Running on oeis4.)