OFFSET
1,1
COMMENTS
Numbers n such that n+1 is a multiple of 5 or 6. - Tom Edgar, Dec 15 2017
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
M. Kreh, "Lights Out" and Variants, Amer. Math. Month., Vol. 124 (10), Dec. 2017, pp. 937-950.
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-2,2,-2,2,-2,2,-1).
FORMULA
G.f.: x*(x^9+4*x^8-3*x^7+7*x^6-5*x^5+8*x^4-5*x^3+7*x^2-3*x+4) / ((x-1)^2*(x^4-x^3+x^2-x+1)*(x^4+x^3+x^2+x+1)). - Colin Barker, Dec 03 2012 ["Empirical" removed after Tom Edgar's comment by Andrey Zabolotskiy, Dec 15 2017]
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - 2*a(n-4) + 2*a(n-5) - 2*a(n-6) + 2*a(n-7) - 2*a(n-8) + 2*a(n-9) - a(n-10) for n>10.
MATHEMATICA
With[{nn=40}, Select[Union[Join[5*Range[nn], 6*Range[nn]]]-1, #<=5nn&]] (* Harvey P. Dale, Sep 04 2023 *)
PROG
(PARI) for(n=1, 100, if( matdet(matrix(n^2, n^2, i, j, (abs((i-1)\n - (j-1)\n) + abs((i-1)%n - (j-1)%n)==1) + (i==j) ))==0, print1(n, ", ") ) ) \\ Max Alekseyev, Apr 23 2010
(PARI) Vec(x*(x^9+4*x^8-3*x^7+7*x^6-5*x^5+8*x^4-5*x^3+7*x^2-3*x+4) / ((x-1)^2*(x^4-x^3+x^2-x+1)*(x^4+x^3+x^2+x+1)) + O(x^100)) \\ Colin Barker, Dec 15 2017
(Sage) [n for n in [1..200] if (n+1)%5==0 or (n+1)%6==0] # Tom Edgar, Dec 15 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincent Delecroix, Jul 11 2009
EXTENSIONS
Twelve more terms from Max Alekseyev, Apr 23 2010
a(33)-a(40) from Max Alekseyev, Feb 15 2013
More terms from Tom Edgar, Dec 15 2017
STATUS
approved