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!)
A047476 Numbers that are congruent to {0, 1, 2, 3} mod 8. 5
0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27, 32, 33, 34, 35, 40, 41, 42, 43, 48, 49, 50, 51, 56, 57, 58, 59, 64, 65, 66, 67, 72, 73, 74, 75, 80, 81, 82, 83, 88, 89, 90, 91, 96, 97, 98, 99, 104, 105, 106, 107, 112, 113, 114, 115, 120, 121, 122 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Primes of this sequence are in A033203. All of these numbers satisfy the condition that n XOR 4 = n + 4. - Brad Clardy, Jul 24 2012

Numbers k such that floor(k/4) = 2*floor(k/8). - Bruno Berselli, Oct 05 2017

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000

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

FORMULA

a(n) = 8 * floor(n/4) + (n mod 4), with offset 0.. a(0)=0. - Gary Detlefs, Mar 09 2010

From Colin Barker, May 14 2012: (Start)

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

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

a(n) = a(n-1) + a(n-4) - a(n-5). - Vincenzo Librandi, May 16 2012

a(2*k) = A047471, a(2*k-1) = A047467(k). - Wesley Ivan Hurt, Jun 01 2016

E.g.f.: 5 + sin(x) - cos(x) + (2*x - 3)*sinh(x) + 2*(x - 2)*cosh(x). - Ilya Gutkovskiy, Jun 01 2016

MAPLE

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

MATHEMATICA

Select[Range[0, 300], MemberQ[{0, 1, 2, 3}, Mod[#, 8]]&] (* Vincenzo Librandi, May 16 2012 *)

LinearRecurrence[{1, 0, 0, 1, -1}, {0, 1, 2, 3, 8}, 100] (* G. C. Greubel, Jun 01 2016 *)

PROG

(MAGMA) I:=[0, 1, 2, 3, 8]; [n le 5 select I[n] else Self(n-1)+Self(n-4)-Self(n-5): n in [1..70]]; // Vincenzo Librandi, May 16 2012

(Haskell)

a047476 n = a047476_list !! (n-1)

a047476_list = [n | n <- [1..], mod n 8 <= 3]

-- Reinhard Zumkeller, Dec 29 2012

(PARI) x='x+O('x^100); concat(0, Vec(x^2*(1+x+x^2+5*x^3)/((1-x)^2*(1+x)*(1+x^2)))) \\ Altug Alkan, Dec 24 2015

CROSSREFS

Cf. A033203 (primes), A047467, A047471.

Sequence in context: A053754 A080745 A283776 * A037462 A309125 A037318

Adjacent sequences:  A047473 A047474 A047475 * A047477 A047478 A047479

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 June 16 04:31 EDT 2021. Contains 345055 sequences. (Running on oeis4.)