%I #9 Nov 05 2024 16:31:33
%S 1,22,77,1376,4785,85302,296605,5287360,18384737,327731030,1139557101,
%T 20314036512,70634155537,1259142532726,4378178086205,78046522992512,
%U 271376407189185,4837625283003030,16820959067643277,299854721023195360,1042628085786694001
%N Numbers n such that the sum of the heptagonal numbers H(n) and H(n+1) is equal to the octagonal number O(m) for some m.
%C Also positive integers x in the solutions to 5*x^2-3*y^2+2*x+2*y+1 = 0, the corresponding values of y being A253305.
%H Colin Barker, <a href="/A253304/b253304.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*(3*x^3+7*x^2-21*x-1) / ((x-1)*(x^2-8*x+1)*(x^2+8*x+1)).
%e 1 is in the sequence because H(1)+H(2) = 1+7 = 8 = O(2).
%t LinearRecurrence[{1,62,-62,-1,1},{1,22,77,1376,4785},30] (* _Harvey P. Dale_, Nov 05 2024 *)
%o (PARI) Vec(x*(3*x^3+7*x^2-21*x-1)/((x-1)*(x^2-8*x+1)*(x^2+8*x+1)) + O(x^100))
%Y Cf. A000566, A000567, A253305.
%K nonn,easy
%O 1,2
%A _Colin Barker_, Dec 30 2014