login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047605 Numbers that are congruent to {0, 2, 3, 5} mod 8. 1
0, 2, 3, 5, 8, 10, 11, 13, 16, 18, 19, 21, 24, 26, 27, 29, 32, 34, 35, 37, 40, 42, 43, 45, 48, 50, 51, 53, 56, 58, 59, 61, 64, 66, 67, 69, 72, 74, 75, 77, 80, 82, 83, 85, 88, 90, 91, 93, 96, 98, 99, 101, 104, 106, 107, 109, 112, 114, 115, 117, 120, 122, 123 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..63.

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

FORMULA

From Bruno Berselli, Dec 05 2011: (Start)

G.f.: x^2*(2-x+3*x^2)/((1-x)^2*(1+x^2)).

a(n) = 2*(n-1)-(i^(n*(n+1))+1)/2, where i=sqrt(-1). (End)

From Wesley Ivan Hurt, Jun 04 2016: (Start)

a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.

a(2k) = A047617(k), a(2k-1) = A047470(k). (End)

E.g.f.: (6 + sin(x) - cos(x) + (4*x - 5)*exp(x))/2. - Ilya Gutkovskiy, Jun 05 2016

MAPLE

A047605:=n->2*(n-1)-(I^(n*(n+1))+1)/2: seq(A047605(n), n=1..100); # Wesley Ivan Hurt, Jun 04 2016

MATHEMATICA

Table[(1+I)*((4-4*I)*n+5*I-5+I^(1-n)-I^n)/4, {n, 80}] (* Wesley Ivan Hurt, Jun 04 2016 *)

Flatten[#+{0, 2, 3, 5}&/@(8*Range[0, 20])] (* or *) LinearRecurrence[{2, -2, 2, -1}, {0, 2, 3, 5}, 100] (* Harvey P. Dale, Sep 30 2018 *)

PROG

(PARI) a(n)=n\4*8+[-3, 0, 2, 3][n%4+1] \\ Charles R Greathouse IV, Dec 05 2011

(MAGMA) [n : n in [0..150] | n mod 8 in [0, 2, 3, 5]]; // Wesley Ivan Hurt, Jun 04 2016

CROSSREFS

Cf. A047470, A047617.

Sequence in context: A028841 A028840 A189143 * A295085 A153000 A222172

Adjacent sequences:  A047602 A047603 A047604 * A047606 A047607 A047608

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane

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 February 23 08:18 EST 2019. Contains 320420 sequences. (Running on oeis4.)