|
| |
|
|
A037488
|
|
Base 3 digits are, in order, the first n terms of the periodic sequence with initial period 2,1.
|
|
0
| |
|
|
2, 7, 23, 70, 212, 637, 1913, 5740, 17222, 51667, 155003, 465010, 1395032, 4185097, 12555293, 37665880, 112997642, 338992927, 1016978783, 3050936350, 9152809052, 27458427157, 82375281473, 247125844420, 741377533262
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,1
|
|
|
LINKS
| Index entries for sequences related to linear recurrences with constant coefficients, signature (3,1,-3).
|
|
|
FORMULA
| a(n) = 3*a(n-1) + a(n-2) - 3*a(n-3).
G.f.: x*(2+x)/((1-x^2)*(1-3*x)). - Michael Somos, Sep 28, 2002
a(n) = (7*3^n-(-1)^n-6)/8. - Bruno Berselli, Jan 20 2011
|
|
|
PROG
| (PARI) a(n)=if(n<1, 0, 3*a(n-1)+1+n%2)
a(n)=if(n<1, 0, 3^n*7\8)
|
|
|
CROSSREFS
| Sequence in context: A034546 A010748 A048496 * A129669 A037568 A076656
Adjacent sequences: A037485 A037486 A037487 * A037489 A037490 A037491
|
|
|
KEYWORD
| nonn,base,easy
|
|
|
AUTHOR
| Clark Kimberling (ck6(AT)evansville.edu)
|
| |
|
|