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!)
A287765 Period 4: repeat [1, 3, 5, 3]. 1
1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
G.f.: x * (3*x^2+2*x+1) / (1-x+x^2-x^3). [Corrected by Georg Fischer, May 19 2019]
a(n) = a(n-1) - a(n-2) + a(n-3) with a(1)=1, a(2)=3 and a(3)=5.
a(2n) = 3, a(4*n+1) = 1 and a(4*n+3) = 5.
MATHEMATICA
PadRight[{}, 105, {1, 3, 5, 3}] (* or *)
f[n_] := Switch[Mod[n, 4], 0, 3, 1, 1, 2, 3, 3, 5]; Array[f, 105] (* or *)
CoefficientList[ Series[(3x^2 +2x +1)/(-x^3 +x^2 -x +1), {x, 0, 104}], x] (* or *)
LinearRecurrence[{1, -1, 1}, {1, 3, 5}, 105] (* or *)
RecurrenceTable[{a[n] == a[n - 1] - a[n - 2] + a[n - 3], a[1] == 1, a[2] == 3, a[3] == 5}, a, {n, 105}]
CROSSREFS
Inspired by the first difference of A108752.
Sequence in context: A103728 A243533 A239730 * A162777 A241014 A173454
KEYWORD
nonn,easy
AUTHOR
Robert G. Wilson v, May 31 2017
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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)