A047401 Numbers that are congruent to {0, 1, 3, 6} mod 8.
0, 1, 3, 6, 8, 9, 11, 14, 16, 17, 19, 22, 24, 25, 27, 30, 32, 33, 35, 38, 40, 41, 43, 46, 48, 49, 51, 54, 56, 57, 59, 62, 64, 65, 67, 70, 72, 73, 75, 78, 80, 81, 83, 86, 88, 89, 91, 94, 96, 97, 99, 102, 104, 105, 107, 110, 112, 113, 115, 118, 120, 121, 123
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1).
Programs
-
Magma
[n : n in [0..150] | n mod 8 in [0, 1, 3, 6]]; // Wesley Ivan Hurt, Jun 01 2016
-
Maple
A047401:=n->2*(n-1)+(I^(n*(n-1))-1)/2: seq(A047401(n), n=1..100); # Wesley Ivan Hurt, Jun 01 2016
-
Mathematica
Select[Range[0,107], MemberQ[{0, 1, 3, 6}, Mod[#, 8]]&] (* Bruno Berselli, Dec 05 2011 *)
-
Maxima
makelist(2*(n-1)+(%i^(n*(n-1))-1)/2,n,1,55); /* Bruno Berselli, Dec 05 2011 */
-
PARI
my(x='x+O('x^100)); concat(0, Vec(x^2*(1+x+2*x^2)/((x^2+1)*(x-1)^2))) \\ Altug Alkan, Jun 02 2016
Formula
G.f.: x^2*(1+x+2*x^2) / ( (x^2+1)*(x-1)^2 ). - R. J. Mathar, Dec 05 2011
a(n) = 2*(n-1)+(i^(n*(n-1))-1)/2, where i=sqrt(-1). - Bruno Berselli, Dec 05 2011
From Wesley Ivan Hurt, Jun 01 2016: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
Sum_{n>=2} (-1)^n/a(n) = Pi/16 + (3-sqrt(2))*log(2)/8 + sqrt(2)*log(2+sqrt(2))/4. - Amiram Eldar, Dec 20 2021
Comments