OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..650
Index entries for linear recurrences with constant coefficients, signature (1,898,-898,-1,1).
FORMULA
G.f.: 27*x^2*(1+10*x+x^2) / ((1-x)*(1-30*x+x^2)*(1+30*x+x^2)).
EXAMPLE
27 is in the sequence because 2*27+1 = 55, 7*27+1 = 190, and 55 and 190 are both triangular numbers.
MATHEMATICA
LinearRecurrence[{1, 898, -898, -1, 1}, {0, 27, 297, 24570, 267030}, 20] (* Paolo Xausa, Oct 21 2024 *)
PROG
(PARI) isok(n) = ispolygonal(2*n+1, 3) && ispolygonal(7*n+1, 3)
(PARI) concat(0, Vec(27*x^2*(1+10*x+x^2)/((1-x)*(1-30*x+x^2)*(1+30*x+x^2)) + O(x^20)))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Jul 08 2016
STATUS
approved