%I #9 Jan 10 2022 19:06:11
%S 2,29,100,1777,6178,110125,382916,6825953,23734594,423098941,
%T 1471161892,26225308369,91188302690,1625546019917,5652203604868,
%U 100757627926465,350345435199106,6245347385420893,21715764778739684,387110780268168881,1346027070846661282
%N 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.
%C Also positive integers y in the solutions to 5*x^2-3*y^2+2*x+2*y+1 = 0, the corresponding values of x being A253304.
%H Colin Barker, <a href="/A253305/b253305.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,62,-62,-1,1).
%F a(n) = a(n-1)+62*a(n-2)-62*a(n-3)-a(n-4)+a(n-5).
%F 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)).
%e 2 is in the sequence because O(2) = 8 = 1+7 = H(1)+H(2).
%t LinearRecurrence[{1,62,-62,-1,1},{2,29,100,1777,6178},30] (* _Harvey P. Dale_, Jan 10 2022 *)
%o (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))
%Y Cf. A000566, A000567, A253304.
%K nonn,easy
%O 1,1
%A _Colin Barker_, Dec 30 2014