[go: up one dir, main page]

login
A047608
Numbers that are congruent to {4, 5} mod 8.
2
4, 5, 12, 13, 20, 21, 28, 29, 36, 37, 44, 45, 52, 53, 60, 61, 68, 69, 76, 77, 84, 85, 92, 93, 100, 101, 108, 109, 116, 117, 124, 125, 132, 133, 140, 141, 148, 149, 156, 157, 164, 165, 172, 173, 180, 181, 188, 189, 196, 197, 204, 205, 212, 213, 220, 221, 228, 229
OFFSET
1,1
FORMULA
G.f.: x*(4+x+3*x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Sep 22 2016
a(n) = 4n - 3*(1 + (-1)^n)/2 or a(n) = 4n - 3*((n-1) mod 2). - Heinz Ebert, Jul 12 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)-1)*Pi/16 - log(2)/4 + sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 19 2021
E.g.f.: 3 + ((8*x - 3)*exp(x) - 3*exp(-x))/2. - David Lovler, Aug 20 2022
MATHEMATICA
Select[Range[230], MemberQ[{4, 5}, Mod[#, 8]] &] (* Amiram Eldar, Dec 19 2021 *)
PROG
(PARI) a(n) = 4n - 3*(1 + (-1)^n)/2 \\ David Lovler, Aug 20 2022
CROSSREFS
Union of A017113 and A004770.
Sequence in context: A330223 A325688 A080277 * A266725 A308783 A130011
KEYWORD
nonn,easy
STATUS
approved