OFFSET
1,2
LINKS
Matthew House, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1).
FORMULA
a(n) = a(n-1) + a(n-18) - a(n-19). - Matthew House, Feb 12 2017
G.f.: x*(x^18 +27*x^17 +26*x^16 +8*x^15 +6*x^14 +x^13 +30*x^12 +17*x^11 +11*x^10 +107*x^9 +11*x^8 +17*x^7 +30*x^6 +x^5 +6*x^4 +8*x^3 +26*x^2 +27*x +1) / (x^19 -x^18 -x +1). - Colin Barker, Feb 12 2017
MATHEMATICA
x=19; Select[ Range[ 1250 ], PowerMod[ #, x-1, x^2 ]==1& ]
PROG
(PARI) isok(n) = Mod(n, 19^2)^18 == 1; \\ Michel Marcus, Feb 12 2017
(PARI) Vec(x*(x^18 +27*x^17 +26*x^16 +8*x^15 +6*x^14 +x^13 +30*x^12 +17*x^11 +11*x^10 +107*x^9 +11*x^8 +17*x^7 +30*x^6 +x^5 +6*x^4 +8*x^3 +26*x^2 +27*x +1) / (x^19 -x^18 -x +1) + O(x^100)) \\ Colin Barker, Feb 12 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert G. Wilson v, Jun 08 2000
STATUS
approved