login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A225058
a(4*n) = n-1. a(2*n+1) = a(4*n+2) = 2*n+1.
1
-1, 1, 1, 3, 0, 5, 3, 7, 1, 9, 5, 11, 2, 13, 7, 15, 3, 17, 9, 19, 4, 21, 11, 23, 5, 25, 13, 27, 6, 29, 15, 31, 7, 33, 17, 35, 8, 37, 19, 39, 9, 41, 21, 43, 10, 45, 23, 47, 11, 49, 25, 51, 12, 53, 27, 55, 13, 57, 29, 59, 14, 61, 31, 63, 15, 65, 33, 67, 16, 69
OFFSET
0,4
COMMENTS
Consider the family of sequences with recurrence a(n) = 2*a(n-4)-a(n-8) where a(0) and a(4) move up in steps of 1. This here is characterized by a(0)=-1, a(4)=0:
-2, 1, 1, 3, -1, 5, 3, 7, 0, 9, 5, 11,...
-1, 1, 1, 3, 0, 5, 3, 7, 1, 9, 5, 11,... = a(n)
0, 1, 1, 3, 1, 5, 3, 7, 2, 9, 5, 11,... = A060819
1, 1, 1, 3, 2, 5, 3, 7, 3, 9, 5, 11,... = b(n)
2, 1, 1, 3, 3, 5, 3, 7, 4, 9, 5, 11,... .
a(n+4)+b(n) = A145979(n).
a(n+4)*b(n) = A061037(n+2).
a(n+4)-b(n) = repeat -1, 4, 2, 4 with period of length 4.
FORMULA
a(n) = 2*a(n-4) - a(n-8).
a(n+4) - a(n) = A176895(n).
G.f.: (-1+x+x^2+3*x^3+3*x^5+x^6+x^7+2*x^4)/((-1+x)^2*(1+x)^2*(x^2+1)^2). - R. J. Mathar, Apr 28 2013
MATHEMATICA
a[n_] := 1/16*(11*n-(-1)^n*(5*n+4)-2*(n+4)*Re[I^n]-4); Table[a[n], {n, 0, 47}] (* Jean-François Alcover, Apr 30 2013 *)
LinearRecurrence[{0, 0, 0, 2, 0, 0, 0, -1}, {-1, 1, 1, 3, 0, 5, 3, 7}, 80] (* Harvey P. Dale, Jul 14 2019 *)
PROG
(PARI) x='x+O('x^50); Vec((-1+x+x^2+3*x^3+3*x^5+x^6+x^7+2*x^4)/((-1+x)^2*(1+x)^2*(x^2+1)^2)) \\ G. C. Greubel, Sep 20 2018
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((-1+x+x^2+3*x^3+3*x^5+x^6+x^7+2*x^4)/((-1+x)^2*(1+x)^2*(x^2+1)^2))); // G. C. Greubel, Sep 20 2018
CROSSREFS
Sequence in context: A284233 A326990 A037284 * A002123 A276408 A225744
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Apr 26 2013
STATUS
approved