login
A190322
a(1) = 1, a(2) = 9, a(3) = 17; for n>3, a(n) = a(n-3) + 2.
2
1, 9, 17, 3, 11, 19, 5, 13, 21, 7, 15, 23, 9, 17, 25, 11, 19, 27, 13, 21, 29, 15, 23, 31, 17, 25, 33, 19, 27, 35, 21, 29, 37, 23, 31, 39, 25, 33, 41, 27, 35, 43, 29, 37, 45, 31, 39, 47, 33, 41, 49, 35, 43, 51, 37, 45, 53, 39, 47, 55, 41, 49, 57, 43, 51, 59
OFFSET
1,2
REFERENCES
Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 62.
FORMULA
a(1)=1, a(2)=9, a(3)=17, a(4)=3, a(n) = a(n-1)+a(n-3)-a(n-4). - Harvey P. Dale, Feb 24 2014
G.f.: x*(1+8*x+8*x^2-15*x^3) / ((x-1)^2*(x^2+x+1)). - Colin Barker, Sep 12 2014
MATHEMATICA
RecurrenceTable[{a[1]==1, a[2]==9, a[3]==17, a[n]==a[n-3]+2}, a, {n, 70}] (* or *) LinearRecurrence[{1, 0, 1, -1}, {1, 9, 17, 3}, 70] (* Harvey P. Dale, Feb 24 2014 *)
PROG
(PARI) Vec(-x*(15*x^3-8*x^2-8*x-1)/((x-1)^2*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Sep 12 2014
(Magma) I:=[1, 9, 17, 3]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..30]]; // G. C. Greubel, Dec 30 2017
CROSSREFS
Cf. A136313.
Sequence in context: A050802 A264519 A136313 * A184938 A103707 A271641
KEYWORD
nonn,easy
AUTHOR
Nathaniel Johnston, May 08 2011
STATUS
approved