A299645 Numbers of the form m*(8*m + 5), where m is an integer.
0, 3, 13, 22, 42, 57, 87, 108, 148, 175, 225, 258, 318, 357, 427, 472, 552, 603, 693, 750, 850, 913, 1023, 1092, 1212, 1287, 1417, 1498, 1638, 1725, 1875, 1968, 2128, 2227, 2397, 2502, 2682, 2793, 2983, 3100, 3300, 3423, 3633, 3762, 3982, 4117, 4347, 4488, 4728, 4875
Offset: 1
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Crossrefs
Programs
-
GAP
List([1..50], n -> (8*n*(n-1)-(2*n-1)*(-1)^n-1)/4);
-
Julia
[div((8n*(n-1)-(2n-1)*(-1)^n-1), 4) for n in 1:50] # Peter Luschny, Feb 27 2018
-
Magma
[(8*n*(n-1)-(2*n-1)*(-1)^n-1)/4: n in [1..50]];
-
Maple
seq((exp(I*Pi*x)*(1-2*x)+8*(x-1)*x-1)/4, x=1..50); # Peter Luschny, Feb 27 2018
-
Mathematica
Table[(8 n (n - 1) - (2 n - 1) (-1)^n - 1)/4, {n, 1, 50}]
-
Maxima
makelist((8*n*(n-1)-(2*n-1)*(-1)^n-1)/4, n, 1, 50);
-
PARI
vector(50, n, nn; (8*n*(n-1)-(2*n-1)*(-1)^n-1)/4)
-
PARI
concat(0, Vec(x^2*(3 + 10*x + 3*x^2)/((1 - x)^3*(1 + x)^2) + O(x^60))) \\ Colin Barker, Feb 27 2018
-
Python
[(8*n*(n-1)-(2*n-1)*(-1)**n-1)/4 for n in range(1, 60)]
-
Python
def A299645(n): return (n>>1)*((n<<2)+(1 if n&1 else -5)) # Chai Wah Wu, Mar 11 2025
-
Sage
[(8*n*(n-1)-(2*n-1)*(-1)^n-1)/4 for n in (1..50)]
Formula
O.g.f.: x^2*(3 + 10*x + 3*x^2)/((1 - x)^3*(1 + x)^2).
E.g.f.: (1 + 2*x - (1 - 8*x^2)*exp(2*x))*exp(-x)/4.
a(n) = a(-n+1) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) = (8*n*(n - 1) - (2*n - 1)*(-1)^n - 1)/4 = (2*n + (-1)^n - 1)*(4*n - 3*(-1)^n - 2)/4. Therefore, 3 and 13 are the only prime numbers in this sequence.
a(n) + a(n+1) = 4*n^2 for even n, otherwise a(n) + a(n+1) = 4*n^2 - 1.
From Amiram Eldar, Mar 18 2022: (Start)
Sum_{n>=2} 1/a(n) = 8/25 + (sqrt(2)-1)*Pi/5.
Sum_{n>=2} (-1)^n/a(n) = 8*log(2)/5 - sqrt(2)*log(2*sqrt(2)+3)/5 - 8/25. (End)
a(n) = (n-1)*(4*n+1)/2 if n is odd and a(n) = n*(4*n-5)/2 if n is even. - Chai Wah Wu, Mar 11 2025
Comments