cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-7 of 7 results.

A076436 Square board sizes for which the lights-out problem has a unique solution (counting solutions differing only by rotation and reflection as distinct).

Original entry on oeis.org

1, 2, 3, 6, 7, 8, 10, 12, 13, 15, 18, 20, 21, 22, 25, 26, 27, 28, 31, 36, 37, 38, 40, 42, 43, 45, 46, 48, 51, 52, 55, 56, 57, 58, 60, 63, 66, 68, 70, 72, 73, 75, 76, 78, 80, 81, 82, 85, 86, 87, 88, 90, 91, 93, 96, 97, 100, 102, 103, 105, 106, 108, 110, 111, 112, 115, 116, 117, 120
Offset: 1

Views

Author

Eric W. Weisstein, Oct 11 2002

Keywords

Comments

These are also the boards where any starting configuration can be turned off. - Robert Cowen (robert.cowen(AT)gmail.com), Jan 06 2007. [Comment corrected by Sune Kristian Jakobsen (sunejakobsen(AT)hotmail.com), Feb 04 2008]

Crossrefs

Cf. A075462, A076437, A117872. Complement of A117870.

Formula

Positive integer n is in this sequence iff A159257(n)=0. [Max Alekseyev, Sep 25 2009]

Extensions

More terms from N. J. A. Sloane (based on A117870), May 14 2006, and Thomas Buchholz, May 16 2014

A159257 Rank deficiency of the Lights Out problem of size n.

Original entry on oeis.org

0, 0, 0, 4, 2, 0, 0, 0, 8, 0, 6, 0, 0, 4, 0, 8, 2, 0, 16, 0, 0, 0, 14, 4, 0, 0, 0, 0, 10, 20, 0, 20, 16, 4, 6, 0, 0, 0, 32, 0, 2, 0, 0, 4, 0, 0, 30, 0, 8, 8, 0, 0, 2, 4, 0, 0, 0, 0, 22, 0, 40, 24, 0, 28, 42, 0, 32, 0, 8, 0, 14, 0, 0, 4, 0, 0, 2, 0, 64, 0, 0, 0, 6, 12, 0, 0, 0, 0, 10, 0, 0, 20, 0, 4, 62, 0, 0, 20, 16, 0, 18, 0, 0, 4, 0, 0, 6, 0, 8, 0, 0, 0, 2, 4, 0, 0, 0, 8, 46, 0, 0, 0, 80, 4, 50, 56, 0, 56, 56, 0
Offset: 1

Views

Author

Bruno Vallet (bruno.vallet(AT)gmail.com), Apr 07 2009

Keywords

Comments

A square array of n X n pixels can have two states (gray, red). Touching a pixel switches its state and the state of the adjacent pixels. The general problem is to turn all pixels ON given any initial configuration. It requires inverting a n^2 by n^2 matrix in Z/2Z. The sequence is the rank deficiency (corank) of the matrix, such that the zero terms correspond to the sizes for which the general case admits a solution.
The size 5 game can be played at the link given below. Rank deficiency is 2 for that game, but only initial configurations that admit a solution are given.
a(n) is nonzero iff n is in A117870; a(n) is zero iff n is in A076436. - Max Alekseyev, Sep 17 2009
a(n) is even and satisfies a(n) <= n. - Thomas Buchholz, May 19 2014
For all indices n and natural numbers k, a(n*k - 1) >= a(n - 1). - William Boyles, Jun 17 2022

Examples

			For n=2, matrix is [1 1 1 0][1 1 0 1][1 0 1 1][0 1 1 1] which is of full rank.
		

References

Crossrefs

Programs

  • Mathematica
    Table[First[Dimensions[NullSpace[AdjacencyMatrix[GridGraph[{n, n}]] + IdentityMatrix[n*n],Modulus -> 2]]], {n, 2, 30}]
    (* Or Faster *)
    A[k_] := DiagonalMatrix[Array[1 &, k - 1], -1] +
      DiagonalMatrix[Array[1 &, k - 1], 1] + IdentityMatrix[k];
    B[k_, 0] := IdentityMatrix[k];
    B[k_, 1] := A[k];
    B[k_, n_] := B[k, n] = Mod[A[k].B[k, n - 1] + B[k, n - 2], 2];
    Table[First[Dimensions[NullSpace[B[n, n], Modulus -> 2]]], {n, 2, 30}]
    (* Birkas Gyorgy, Jun 10 2011 *)
  • PARI
    { A159257(n) = my(p,q,r); p=Mod(1,2); q=p*x;for(u=2,n,r=x*q+p;p=q;q=r); p=subst(q,x,1+x); r=gcd(p,q); poldegree(r) } \\ Zhao Hui Du, Mar 18 2014
    
  • PARI
    { A159257(n) = my(f = polchebyshev(n,2,x/2)*Mod(1,2)); poldegree( gcd(f,subst(f,x,1+x)) ); } \\ Max Alekseyev, Nov 12 2019

Formula

Let f(k,x) = U(k,x/2), where U(k,x) is the k-th Chebyshev polynomial of the second kind over the field GF(2). So f(0,x)=1, f(1,x)=x, f(2,x)=(1+x)^2, and f(n+1,x)=x*f(n,x)+f(n-1,x). Then a(n) equals the degree of gcd(f(n,x), f(n,1+x)). For example, f(5,x)=x^5+x=x(1+x)^4 and f(5, 1+x)=x^4(1+x). So their GCD is x(1+x) and the degree is 2, that is a(5)=2. - Zhao Hui Du, Mar 17 2014; edited by Max Alekseyev, Nov 12 2019

Extensions

More terms from Max Alekseyev, Sep 17 2009
More terms from Thomas Buchholz, May 16 2014

A093614 Numbers n such that F_n(x) and F_n(1-x) have a common factor mod 2, with F_n(x) = U(n-1,x/2) the monic Chebyshev polynomials of second kind.

Original entry on oeis.org

5, 6, 10, 12, 15, 17, 18, 20, 24, 25, 30, 31, 33, 34, 35, 36, 40, 42, 45, 48, 50, 51, 54, 55, 60, 62, 63, 65, 66, 68, 70, 72, 75, 78, 80, 84, 85, 90, 93, 95, 96, 99, 100, 102, 105, 108, 110, 114, 115, 119, 120, 124, 125, 126, 127, 129, 130, 132, 135, 136, 138
Offset: 1

Views

Author

Ralf Stephan, May 22 2004

Keywords

Comments

Goldwasser et al. proved that 2^k+-1 belongs to the set, for k>4.
Closed under multiplication by positive integers. - Don Knuth, May 11 2006

Crossrefs

Equals A117870(n) + 1.
Cf. A094425 (primitive elements), A076436.

Programs

  • PARI
    { F2(n)=local(t, t1, t2, tmp); t1=Mod(0, 2); t2=Mod(1, 2); t=Mod(1, 2)*x; for(k=2, n, tmp=t*t2-t1; t1=t2; t2=tmp); tmp }
    for(n=2, 200, t=F2(n); if(gcd(t, subst(t, x, 1-x))!=1, print1(n", ")))

Extensions

More terms from Thomas Buchholz, May 16 2014

A118141 Length of the longest perfect parity pattern with n columns.

Original entry on oeis.org

2, 3, 5, 4, 23, 8, 11, 27, 29, 30, 47, 62, 17, 339, 23, 254, 167, 512, 59, 2339, 185, 2046, 95, 1024, 125, 2043, 35, 3276, 2039, 340, 47, 4091, 509, 4094, 335, 3590, 1025, 16379, 119, 1048574, 4679, 16382, 371, 92819, 12281, 8388606, 191, 2097152, 6149, 262139
Offset: 1

Views

Author

Don Knuth, May 11 2006

Keywords

Comments

Also the length of the unique perfect parity pattern whose first row is 0....01 (with n-1 zeros).
Definitions: A parity pattern is a matrix of 0's and 1's with the property that every 0 is adjacent to an even number of 1's and every 1 is adjacent to an odd number of 1's.
It is called perfect if no row or column is entirely zero. Every parity pattern can be built up in a straightforward way from the smallest perfect subpattern in its upper left corner.
For example, the 3 X 2 matrix
11
00
11
is a parity pattern built up from the perfect 1 X 2 pattern "11". The 3 X 5 matrix
01010
11011
01010
is similarly built up from the perfect 3 X 2 pattern of its first two columns. The 4 X 4 matrix
0011
0100
1101
0101
is perfect. So is the 5 X 5
01110
10101
11011
10101
01110
which moreover has 8-fold symmetry (cf. A118143).
All perfect parity patterns of n columns can be shown to have length d-1 where d divides a(n)+1.

References

  • D. E. Knuth, The Art of Computer Programming, Section 7.1.3.

Crossrefs

The number of perfect parity patterns that have exactly n columns is A000740.
The sequence of all n such that an n X n parity pattern exists is A117870 (cf. A076436, A093614, A094425).
Cf. also A118142, A118143.
Cf. A007802.

Extensions

More terms from John W. Layman, May 17 2006
More terms from Andries E. Brouwer, Jun 15 2008

A165740 Positive integers n such that solution to the toric n X n "Lights Out" puzzle is not unique (up to the order of flippings; each flipping appears at most once).

Original entry on oeis.org

3, 5, 6, 9, 10, 12, 15, 17, 18, 20, 21, 24, 25, 27, 30, 31, 33, 34, 35, 36, 39, 40, 42, 45, 48, 50, 51, 54, 55, 57, 60, 62, 63, 65, 66, 68, 69, 70, 72, 75, 78, 80, 81, 84, 85, 87, 90, 93, 95, 96, 99, 100, 102, 105, 108, 110, 111, 114, 115, 117, 119, 120, 123, 124, 125, 126
Offset: 1

Views

Author

Max Alekseyev, Sep 25 2009

Keywords

Comments

Complement to the sequence A165741 in the set of positive integers.
Any positive multiple of a member of this sequence is also a member. Primitive elements are in A007802. - Thomas Buchholz, May 23 2014

References

Crossrefs

Formula

A number n is in this sequence iff A165738(n) > 0.

Extensions

More terms from Thomas Buchholz, May 20 2014

A118142 Numbers n such that a perfect n X n parity pattern exists.

Original entry on oeis.org

4, 5, 9, 11, 16, 19, 23, 29, 30, 32, 33, 39, 47, 59, 61, 62, 64, 65, 67, 79, 84, 95, 101, 119, 123, 125, 126, 128, 129, 131, 135, 154, 159, 164, 169, 170, 185, 191, 203, 204, 239, 247, 251, 253, 254, 256, 257, 259
Offset: 1

Views

Author

Don Knuth, May 11 2006

Keywords

Comments

See A118141 for definitions and references.

Crossrefs

A subsequence of A117870.

A162698 Numbers n such that the incidence matrix of the grid n X n has -1 as eigenvalue.

Original entry on oeis.org

4, 5, 9, 11, 14, 17, 19, 23, 24, 29, 34, 35, 39, 41, 44, 47, 49, 53, 54, 59, 64, 65, 69, 71, 74, 77, 79, 83, 84, 89, 94, 95, 99, 101, 104, 107, 109, 113, 114, 119, 124, 125, 129, 131, 134, 137, 139, 143, 144, 149, 154, 155, 159, 161, 164, 167, 169, 173, 174, 179, 184, 185, 189, 191, 194, 197, 199
Offset: 1

Views

Author

Vincent Delecroix, Jul 11 2009

Keywords

Comments

Numbers n such that n+1 is a multiple of 5 or 6. - Tom Edgar, Dec 15 2017

Crossrefs

Programs

  • Mathematica
    With[{nn=40},Select[Union[Join[5*Range[nn],6*Range[nn]]]-1,#<=5nn&]] (* Harvey P. Dale, Sep 04 2023 *)
  • 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

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.

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
Showing 1-7 of 7 results.