OFFSET
1,1
LINKS
Colin Barker, Table of n, a(n) for n = 1..250
Index entries for linear recurrences with constant coefficients, signature (1,0,885289046402,-885289046402,0,-1,1).
FORMULA
G.f.: x*(238 +685381879*x +379673042758*x^2 +3874618202*x^3 +6994421*x^4 +2*x^5) / ((1 -x)*(1 -9602*x +x^2)*(1 +9602*x +92198403*x^2 +9602*x^3 +x^4)).
EXAMPLE
238 is in the sequence because 2*238+1 = 477 and 3*238+1 = 715 are both pentagonal numbers.
MATHEMATICA
Rest@ CoefficientList[Series[x (238 + 685381879 x + 379673042758 x^2 + 3874618202 x^3 + 6994421 x^4 + 2 x^5)/((1 - x) (1 - 9602 x + x^2) (1 + 9602 x + 92198403 x^2 + 9602 x^3 + x^4)), {x, 0, 10}], x] (* Michael De Vlieger, Dec 09 2016 *)
PROG
(PARI) isok(k) = ispolygonal(2*k+1, 5) & ispolygonal(3*k+1, 5)
(PARI) Vec(x*(238 +685381879*x +379673042758*x^2 +3874618202*x^3 +6994421*x^4 +2*x^5) / ((1 -x)*(1 -9602*x +x^2)*(1 +9602*x +92198403*x^2 +9602*x^3 +x^4)) + O(x^15))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Dec 09 2016
STATUS
approved