OFFSET
1,3
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1442,-1442,0,0,-1,1).
FORMULA
G.f.: x^2*(1+6*x+20*x^2+513*x^3+20*x^4+6*x^5+x^6) / ((1-x)*(1+6*x-x^2)*(1-6*x-x^2)*(1+38*x^2+x^4)).
EXAMPLE
7 is in the sequence because 2*7+1 = 15, 5*7+1 = 36, and 15 and 36 are both triangular numbers.
PROG
(PARI) concat(0, Vec(x^2*(1+6*x+20*x^2+513*x^3+20*x^4+6*x^5+x^6)/((1-x)*(1+6*x-x^2)*(1-6*x-x^2)*(1+38*x^2+x^4)) + O(x^30)))
(PARI) isok(n) = ispolygonal(2*n+1, 3) && ispolygonal(5*n+1, 3); \\ Michel Marcus, Jun 29 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Jun 29 2016
STATUS
approved