A047406 Numbers that are congruent to {4, 6} mod 8.
4, 6, 12, 14, 20, 22, 28, 30, 36, 38, 44, 46, 52, 54, 60, 62, 68, 70, 76, 78, 84, 86, 92, 94, 100, 102, 108, 110, 116, 118, 124, 126, 132, 134, 140, 142, 148, 150, 156, 158, 164, 166, 172, 174, 180, 182, 188, 190, 196, 198, 204, 206, 212, 214, 220, 222, 228
Offset: 1
Examples
a(2) = 8*2 - 4 - 6 = 6; a(3) = 8*3 - 6 - 6 = 12; a(4) = 8*4 - 12 - 6 = 14.
Links
- David Lovler, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
Programs
-
Mathematica
Select[Range[230], MemberQ[{4, 6}, Mod[#, 8]] &] (* Amiram Eldar, Dec 19 2021 *)
-
PARI
a(n)=4*n-1-(-1)^n \\ Charles R Greathouse IV, May 20 2013
Formula
a(n) = A042964(n)*2.
a(n) = (4*n - 1 - (-1)^n). - Jon E. Schoenfield, Jul 05 2010
a(n) = 8*n - a(n-1) - 6 (with a(1)=4). - Vincenzo Librandi, Aug 05 2010
G.f.: 2*x*(2+x+x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, May 18 2013: (Start)
a(n) = (8 * ceiling(n/2) - 4) * (n mod 2) + (8 * ceiling(n/2) - 2) * (n+1 mod 2).
a(n) = 8 * ceiling(n/2) - 3 + (-1)^n. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/16 - log(2)/8. - Amiram Eldar, Dec 19 2021
E.g.f.: 2*(1 + 2*x*exp(x) - cosh(x)). - David Lovler, Sep 02 2022
Comments