[go: up one dir, main page]

login
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
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
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
Sum_{n>=2} (-1)^n/a(n) = (2*sqrt(2)-1)*Pi/16 + 5*log(2)/8. - Amiram Eldar, Dec 19 2021
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: A353652 A080745 A283776 * A347397 A037462 A309125
KEYWORD
nonn,easy
STATUS
approved