A047557 Numbers that are congruent to {0, 3, 6, 7} mod 8.
0, 3, 6, 7, 8, 11, 14, 15, 16, 19, 22, 23, 24, 27, 30, 31, 32, 35, 38, 39, 40, 43, 46, 47, 48, 51, 54, 55, 56, 59, 62, 63, 64, 67, 70, 71, 72, 75, 78, 79, 80, 83, 86, 87, 88, 91, 94, 95, 96, 99, 102, 103, 104, 107, 110, 111, 112, 115, 118, 119, 120, 123, 126
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1).
Programs
-
Maple
A047557:=n->2*n-1-cos(Pi*(n-1)/2): seq(A047557(k), k=1..100); # Wesley Ivan Hurt, Oct 22 2013
-
Mathematica
Table[2n-1-Cos[Pi(n-1)/2], {n,100}] (* Wesley Ivan Hurt, Oct 22 2013 *)
-
Sage
[lucas_number1(n,0,1)+2*n+3 for n in range(-1,55)] # Zerinvary Lajos, Jul 06 2008
Formula
From R. J. Mathar, Oct 08 2011: (Start)
G.f.: x^2*(3+x^2) / ( (x^2+1)*(x-1)^2 ).
a(n) = 2*n-1-sin(Pi*n/2). (End)
a(n) = 2n-1-cos(Pi*(n-1)/2). - Wesley Ivan Hurt, Oct 22 2013
From Wesley Ivan Hurt, May 20 2016: (Start)
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4) for n>4.
a(n) = 2*n-2-I^(1-n)*(I^(n-1)-1)^2/2 where I=sqrt(-1).
Sum_{n>=2} (-1)^n/a(n) = 5*log(2)/8 - Pi/16. - Amiram Eldar, Dec 23 2021
Extensions
More terms from Wesley Ivan Hurt, May 20 2016