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”).

A047454
Numbers that are congruent to {1, 2, 3, 4} mod 8.
1
1, 2, 3, 4, 9, 10, 11, 12, 17, 18, 19, 20, 25, 26, 27, 28, 33, 34, 35, 36, 41, 42, 43, 44, 49, 50, 51, 52, 57, 58, 59, 60, 65, 66, 67, 68, 73, 74, 75, 76, 81, 82, 83, 84, 89, 90, 91, 92, 97, 98, 99, 100, 105, 106, 107, 108, 113, 114, 115, 116, 121, 122, 123
OFFSET
1,2
FORMULA
From Colin Barker, May 14 2012: (Start)
a(n) = (-5-(-1)^n-(1-i)*(-i)^n-(1+i)*i^n+4*n)/2 where i=sqrt(-1).
G.f.: x*(1+x+x^2+x^3+4*x^4)/((1-x)^2*(1+x)*(1+x^2)). (End)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5. - Vincenzo Librandi, May 15 2012
a(2k) = A047463(k), a(2k-1) = A047471(k). - Wesley Ivan Hurt, Jun 01 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = (2*sqrt(2)-1)*Pi/16 + 3*log(2)/8. - Amiram Eldar, Dec 23 2021
MAPLE
A047454:=n->(-5-I^(2*n)-(1-I)*(-I)^n-(1+I)*I^n+4*n)/2: seq(A047454(n), n=1..100); # Wesley Ivan Hurt, Jun 01 2016
MATHEMATICA
Select[Range[0, 300], MemberQ[{1, 2, 3, 4}, Mod[#, 8]]&] (* Vincenzo Librandi, May 15 2012 *)
PROG
(Magma) I:=[1, 2, 3, 4, 9]; [n le 5 select I[n] else Self(n-1)+Self(n-4)-Self(n-5): n in [1..70]]; // Vincenzo Librandi, May 15 2012
(PARI) my(x='x+O('x^100)); Vec(x*(1+x+x^2+x^3+4*x^4)/((1-x)^2*(1+x)*(1+x^2))) \\ Altug Alkan, Dec 24 2015
CROSSREFS
Sequence in context: A135210 A037468 A265746 * A373788 A081870 A165315
KEYWORD
nonn,easy
STATUS
approved