A253305 Numbers n such that the octagonal number O(n) is equal to the sum of the heptagonal numbers H(m) and H(m+1) for some m.
2, 29, 100, 1777, 6178, 110125, 382916, 6825953, 23734594, 423098941, 1471161892, 26225308369, 91188302690, 1625546019917, 5652203604868, 100757627926465, 350345435199106, 6245347385420893, 21715764778739684, 387110780268168881, 1346027070846661282
Offset: 1
Examples
2 is in the sequence because O(2) = 8 = 1+7 = H(1)+H(2).
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,62,-62,-1,1).
Programs
-
Mathematica
LinearRecurrence[{1,62,-62,-1,1},{2,29,100,1777,6178},30] (* Harvey P. Dale, Jan 10 2022 *)
-
PARI
Vec(-x*(x^4+3*x^3-53*x^2+27*x+2)/((x-1)*(x^2-8*x+1)*(x^2+8*x+1)) + O(x^100))
Formula
a(n) = a(n-1)+62*a(n-2)-62*a(n-3)-a(n-4)+a(n-5).
G.f.: -x*(x^4+3*x^3-53*x^2+27*x+2) / ((x-1)*(x^2-8*x+1)*(x^2+8*x+1)).
Comments