login
A047615
Numbers that are congruent to {0, 5} mod 8.
15
0, 5, 8, 13, 16, 21, 24, 29, 32, 37, 40, 45, 48, 53, 56, 61, 64, 69, 72, 77, 80, 85, 88, 93, 96, 101, 104, 109, 112, 117, 120, 125, 128, 133, 136, 141, 144, 149, 152, 157, 160, 165, 168, 173, 176, 181, 184, 189, 192, 197, 200, 205, 208, 213, 216, 221, 224, 229, 232
OFFSET
1,2
FORMULA
a(n) = 8*n-a(n-1)-11 (with a(1)=0). - Vincenzo Librandi, Aug 06 2010
a(n+1) = Sum_{k>=0} A030308(n,k)*b(k) with b(0)=5 and b(k)=2^(k+2) for k>0. - Philippe Deléham, Oct 17 2011
From Wesley Ivan Hurt, Mar 26 2015: (Start)
a(n) = a(n-1)+a(n-2)-a(n-3).
a(n) = (8n - 7 + (-1)^n)/2. (End)
G.f.: x^2*(5+3*x) / ((1-x)^2*(1+x)). - Colin Barker, Aug 25 2016
From Franck Maminirina Ramaharo, Jul 23 2018: (Start)
a(n) = A047470(n) - (-1)^(n - 1) + 1.
E.g.f.: (6 + exp(-x) + (8*x - 7)*exp(x))/2. (End)
Sum_{n>=2} (-1)^n/a(n) = log(2)/2 - (sqrt(2)-1)*Pi/16 - sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 18 2021
MAPLE
a:=n->add(4-(-1)^j, j=1..n): seq(a(n), n=0..59); # Zerinvary Lajos, Dec 13 2008
MATHEMATICA
Table[(8 n - 7 + (-1)^n)/2, {n, 1, 40}] (* Wesley Ivan Hurt, Mar 26 2015 *)
Rest@ CoefficientList[Series[x^2*(5 + 3 x)/((1 - x)^2*(1 + x)), {x, 0, 59}], x] (* Michael De Vlieger, Aug 25 2016 *)
Rest@(Range[0, 60]! CoefficientList[ Series[(6 + Exp[-x] + (8 x - 7)*Exp[x])/2, {x, 0, 60}], x]) (* or *)
LinearRecurrence[{1, 1, -1}, {0, 5, 8}, 60] (* Robert G. Wilson v, Jul 23 2018 *)
PROG
(PARI) forstep(n=0, 200, [5, 3], print1(n", ")) \\ Charles R Greathouse IV, Oct 17 2011
(PARI) concat(0, Vec(x^2*(5+3*x)/((1-x)^2*(1+x)) + O(x^100))) \\ Colin Barker, Aug 25 2016
(Magma) [(8*n - 7 + (-1)^n)/2 : n in [1..50]]; // Wesley Ivan Hurt, Mar 26 2015
(GAP) Filtered([0..250], n->n mod 8=0 or n mod 8=5); # Muniru A Asiru, Jul 23 2018
(Python)
def A047615(n): return (n<<2)-3-(n&1) # Chai Wah Wu, Mar 30 2024
CROSSREFS
KEYWORD
nonn,easy
EXTENSIONS
More terms from Vincenzo Librandi, Aug 06 2010
STATUS
approved