Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #12 Apr 10 2023 15:59:07
%S 1,8,638,6931,572671,6223778,514257668,5588945461,461802812941,
%T 5018866799948,414698411763098,4506936797407591,372398711960448811,
%U 4047224225205216518,334413628642071268928,3634402847297487025321,300303066121868039048281
%N Values of n such that 2*n-1 and 7*n-1 are both triangular numbers.
%H Colin Barker, <a href="/A274588/b274588.txt">Table of n, a(n) for n = 1..650</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,898,-898,-1,1).
%F Intersection of A069099 and A174114.
%F G.f.: (1+7*x-268*x^2+7*x^3+x^4) / ((1-x)*(1-30*x+x^2)*(1+30*x+x^2)).
%e 8 is in the sequence because 2*8-1 = 15, 7*8-1 = 55, and 15 and 55 are both triangular numbers.
%t CoefficientList[Series[(1 + 7 x - 268 x^2 + 7 x^3 + x^4)/((1 - x) (1 - 30 x + x^2) (1 + 30 x + x^2)), {x, 0, 16}], x] (* _Michael De Vlieger_, Jun 30 2016 *)
%t LinearRecurrence[{1,898,-898,-1,1},{1,8,638,6931,572671},20] (* _Harvey P. Dale_, Apr 10 2023 *)
%o (PARI) isok(n) = ispolygonal(2*n-1, 3) && ispolygonal(7*n-1, 3)
%o (PARI) Vec((1+7*x-268*x^2+7*x^3+x^4)/((1-x)*(1-30*x+x^2)*(1+30*x+x^2)) + O(x^20))
%Y Cf. A069099, A174114, A274587.
%K nonn,easy
%O 1,2
%A _Colin Barker_, Jun 29 2016