[go: up one dir, main page]

login
A037793
Base-4 digits are, in order, the first n terms of the periodic sequence with initial period 3,2,1,0.
0
3, 14, 57, 228, 915, 3662, 14649, 58596, 234387, 937550, 3750201, 15000804, 60003219, 240012878, 960051513, 3840206052, 15360824211, 61443296846, 245773187385, 983092749540, 3932370998163, 15729483992654, 62917935970617, 251671743882468, 1006686975529875, 4026747902119502
OFFSET
1,1
FORMULA
a(n) = 4*a(n-1) + a(n-4) - 4*a(n-5); a(1)=3, a(2)=14, a(3)=57, a(4)=228, a(5)=915. - Harvey P. Dale, Jun 01 2014
G.f.: x*(3 + 2*x + x^2)/((x - 1)*(4*x - 1)*(1 + x)*(x^2 + 1)). - R. J. Mathar, May 01 2015
E.g.f.: (76*cosh(4*x) - 51*cosh(x) - 25*cos(x) + 76*sinh(4*x) - 34*sinh(x) - 15*sin(x))/85. - Stefano Spezia, May 28 2023
MATHEMATICA
Module[{nn=30, per}, per=PadRight[{}, nn, {3, 2, 1, 0}]; Table[ FromDigits[ Take[ per, n], 4], {n, nn}]] (* or *) LinearRecurrence[{4, 0, 0, 1, -4}, {3, 14, 57, 228, 915}, 30] (* Harvey P. Dale, Jun 01 2014 *)
PROG
(PARI) a(n) = 76<<(2*n) \ 85; \\ Kevin Ryde, May 28 2023
CROSSREFS
Sequence in context: A111468 A052412 A353095 * A037093 A135926 A015523
KEYWORD
nonn,base,easy
EXTENSIONS
a(24)-a(26) from Stefano Spezia, May 28 2023
STATUS
approved