OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..400
Index entries for linear recurrences with constant coefficients, signature (1,37634,-37634,-1,1).
FORMULA
G.f.: 63*x^2*(15+194*x+15*x^2) / ((1-x)*(1-194*x+x^2)*(1+194*x+x^2)).
a(n) = a(n-1)+37634*a(n-2)-37634*a(n-3)-a(n-4)+a(n-5). - Wesley Ivan Hurt, Apr 24 2021
EXAMPLE
945 is in the sequence because 2*945+1 = 1891, 6*945+1 = 5671, and 1891 and 5671 are both triangular numbers.
PROG
(PARI) isok(n) = ispolygonal(2*n+1, 3) && ispolygonal(6*n+1, 3)
(PARI) concat(0, Vec(63*x^2*(15+194*x+15*x^2)/((1-x)*(1-194*x+x^2)*(1+194*x+x^2)) + O(x^20)))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Jul 04 2016
STATUS
approved