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
EXAMPLE
8 is in the sequence because 2*8-1 = 15, 7*8-1 = 55, and 15 and 55 are both triangular numbers.
MATHEMATICA
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 *)
LinearRecurrence[{1, 898, -898, -1, 1}, {1, 8, 638, 6931, 572671}, 20] (* Harvey P. Dale, Apr 10 2023 *)
PROG
(PARI) isok(n) = ispolygonal(2*n-1, 3) && ispolygonal(7*n-1, 3)
(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))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Jun 29 2016
STATUS
approved