login
A047398
Numbers that are congruent to {3, 6} mod 8.
16
3, 6, 11, 14, 19, 22, 27, 30, 35, 38, 43, 46, 51, 54, 59, 62, 67, 70, 75, 78, 83, 86, 91, 94, 99, 102, 107, 110, 115, 118, 123, 126, 131, 134, 139, 142, 147, 150, 155, 158, 163, 166, 171, 174, 179, 182, 187, 190, 195, 198, 203, 206, 211, 214, 219, 222, 227, 230
OFFSET
1,1
FORMULA
a(n) = 8*n - a(n-1) - 7, n > 1. - Vincenzo Librandi, Aug 05 2010
From R. J. Mathar, Dec 05 2011: (Start)
a(n) = 4*n - (3 + (-1)^n)/2.
G.f.: x*(3+3*x+2*x^2) / ( (1+x)*(x-1)^2 ). (End)
From Franck Maminirina Ramaharo, Aug 06 2018: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3), n > 3.
a(n) = 4*n + (n mod 2) - 2.
a(n) = A047470(n) + 3.
a(2*n) = A017137(n-1).
a(2*n-1) = A017101(n-1).
E.g.f.: ((8*x - 3)*exp(x) - exp(-x) + 4)/2. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(2)*Pi/16 + log(2)/8 - sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 18 2021
MAPLE
A047398:=n->4*n-(3+(-1)^n)/2: seq(A047398(n), n=1..100); # Wesley Ivan Hurt, Jan 30 2017
MATHEMATICA
Flatten[# + {3, 6} & /@ (8 Range[0, 28])] (* Arkadiusz Wesolowski, Sep 25 2012 *)
LinearRecurrence[{1, 1, -1}, {3, 6, 11}, 60] (* Harvey P. Dale, Oct 26 2020 *)
PROG
(Maxima) makelist(4*n + mod(n, 2) - 2, n, 1, 100); /* Franck Maminirina Ramaharo, Aug 06 2018 */
(Python)
def A047398(n): return ((n<<2)|(n&1))-2 # Chai Wah Wu, Mar 30 2024
CROSSREFS
KEYWORD
nonn,easy
STATUS
approved