login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A100531 a(n) = a(n-1) + (2*n - 1) mod 8 + 1 with a(0)=1. 1
1, 3, 7, 13, 21, 23, 27, 33, 41, 43, 47, 53, 61, 63, 67, 73, 81, 83, 87, 93, 101, 103, 107, 113, 121, 123, 127, 133, 141, 143, 147, 153, 161, 163, 167, 173, 181, 183, 187, 193, 201, 203, 207, 213, 221, 223, 227, 233, 241, 243, 247, 253, 261, 263, 267, 273, 281, 283 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Numbers == 1,3,7,13 modulo 20. - Ralf Stephan, May 15 2007

LINKS

Colin Barker, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).

FORMULA

a(0)=1, a(1)=3, a(2)=7, a(3)=13, a(4)=21, a(n) = a(n-1)+a(n-4)-a(n-5). - Harvey P. Dale, Apr 09 2012

G.f.: (7*x^4+6*x^3+4*x^2+2*x+1)/((x-1)^2*(x^3+x^2+x+1)). - Harvey P. Dale, Apr 09 2012

a(n) = (-3/2+(-1)^n/2+(-i)^n+i^n+5*n) where i=sqrt(-1). - Colin Barker, Oct 16 2015

MATHEMATICA

digits=200 f[n_]:=f[n]=f[n-1]+Mod[2*n-1, 8]+1 f[0]=1; a=Table[f[n], {n, 1, digits}]

RecurrenceTable[{a[0]==1, a[n]==a[n-1]+Mod[2n-1, 8]+1}, a, {n, 60}] (* or *) LinearRecurrence[{1, 0, 0, 1, -1}, {1, 3, 7, 13, 21}, 60] (* Harvey P. Dale, Apr 09 2012 *)

PROG

(PARI) a(n) = (-3/2+(-1)^n/2+(-I)^n+I^n+5*n) \\ Colin Barker, Oct 16 2015

(PARI) Vec((7*x^4+6*x^3+4*x^2+2*x+1)/((x-1)^2*(x^3+x^2+x+1)) + O(x^100)) \\ Colin Barker, Oct 16 2015

CROSSREFS

Sequence in context: A076950 A169633 A069194 * A032409 A073896 A299478

Adjacent sequences:  A100528 A100529 A100530 * A100532 A100533 A100534

KEYWORD

nonn,easy

AUTHOR

Roger L. Bagula, Nov 24 2004

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 24 01:21 EDT 2020. Contains 337315 sequences. (Running on oeis4.)