login
A047404
Numbers that are congruent to {1, 2, 3, 6} mod 8.
7
1, 2, 3, 6, 9, 10, 11, 14, 17, 18, 19, 22, 25, 26, 27, 30, 33, 34, 35, 38, 41, 42, 43, 46, 49, 50, 51, 54, 57, 58, 59, 62, 65, 66, 67, 70, 73, 74, 75, 78, 81, 82, 83, 86, 89, 90, 91, 94, 97, 98, 99, 102, 105, 106, 107, 110, 113, 114, 115, 118, 121, 122, 123
OFFSET
1,2
FORMULA
a(n) = A056594(n) + 2*n-2. - Zerinvary Lajos, Jul 06 2008
G.f.: x*(1+x)*(2*x^2-x+1)/((x^2+1)*(x-1)^2). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, May 30 2016: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
a(n) = (4*n-4+i^(1-n)-i^(1+n))/2 where i = sqrt(-1).
a(2k) = A016825(k-1) k>0, a(2k-1) = A047471(k). (End)
E.g.f.: 2 + sin(x) + 2*(x - 1)*exp(x). - Ilya Gutkovskiy, May 30 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(2)*Pi/8 + log(2)/4. - Amiram Eldar, Dec 23 2021
MAPLE
A047404:=n->(4*n-4+I^(1-n)-I^(1+n))/2: seq(A047404(n), n=1..100); # Wesley Ivan Hurt, May 30 2016
MATHEMATICA
Table[(4n-4+I^(1-n)-I^(1+n))/2, {n, 80}] (* Wesley Ivan Hurt, May 30 2016 *)
LinearRecurrence[{2, -2, 2, -1}, {1, 2, 3, 6}, 70] (* Harvey P. Dale, Sep 15 2024 *)
PROG
(Sage) [lucas_number1(n, 0, 1)+2*n-2 for n in range(1, 56)] # Zerinvary Lajos, Jul 06 2008
(PARI) a(n)=(n-1)\4*8+[6, 1, 2, 3][n%4+1] \\ Charles R Greathouse IV, Jun 11 2015
(Magma) [n : n in [0..150] | n mod 8 in [1, 2, 3, 6]]; // Wesley Ivan Hurt, May 30 2016
CROSSREFS
KEYWORD
nonn,easy
STATUS
approved