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-10 of 13 results. Next

A184271 Table read by antidiagonals: T(n,k) = number of distinct n X k toroidal binary arrays (n >= 1, k >= 1).

Original entry on oeis.org

2, 3, 3, 4, 7, 4, 6, 14, 14, 6, 8, 40, 64, 40, 8, 14, 108, 352, 352, 108, 14, 20, 362, 2192, 4156, 2192, 362, 20, 36, 1182, 14624, 52488, 52488, 14624, 1182, 36, 60, 4150, 99880, 699600, 1342208, 699600, 99880, 4150, 60, 108, 14602, 699252, 9587580, 35792568
Offset: 1

Views

Author

R. H. Hardin, Jan 10 2011

Keywords

Comments

This is a 2-dimensional generalization of binary necklaces (A000031). A toroidal array or necklace can be defined either as an equivalence class of matrices under all possible rotations of the sequence of rows and the sequence of columns, or as a matrix that is minimal among all possible rotations of its sequence of rows and its sequence of columns. - Gus Wiseman, Feb 04 2019

Examples

			      1     2        3           4            5             6              7
----------------------------------------------------------------------------
1:    2     3        4           6            8            14             20
2:    3     7       14          40          108           362           1182
3:    4    14       64         352         2192         14624          99880
4:    6    40      352        4156        52488        699600        9587580
5:    8   108     2192       52488      1342208      35792568      981706832
6:   14   362    14624      699600     35792568    1908897152   104715443852
7:   20  1182    99880     9587580    981706832  104715443852 11488774559744
8:   36  4150   699252   134223976  27487816992 5864063066500
9:   60 14602  4971184  1908881900 781874936816
10: 108 52588 35792568 27487869472
From _Gus Wiseman_, Feb 04 2019: (Start)
Inequivalent representatives of the T(2,3) = 14 toroidal necklaces:
  [0 0 0] [0 0 0] [0 0 0] [0 0 0] [0 0 1] [0 0 1] [0 0 1]
  [0 0 0] [0 0 1] [0 1 1] [1 1 1] [0 0 1] [0 1 0] [0 1 1]
.
  [0 0 1] [0 0 1] [0 0 1] [0 1 1] [0 1 1] [0 1 1] [1 1 1]
  [1 0 1] [1 1 0] [1 1 1] [0 1 1] [1 0 1] [1 1 1] [1 1 1]
(End)
		

Crossrefs

Main diagonal is A179043.
Cf. A001037 (binary Lyndon words), A008965, A323858, A323859 (binary toroidal necklaces of size n), A323861 (aperiodic version), A323865, A323870 (normal toroidal necklaces), A323872.

Programs

  • Mathematica
    a[n_, k_] := Sum[If[Mod[n, c] == 0, Sum[If[Mod[k, d] == 0, EulerPhi[c] EulerPhi[d] 2^(n k/LCM[c, d]), 0], {d, 1, k}], 0], {c, 1, n}]/(n k)
    (* second program *)
    neckmatQ[m_]:=m==First[Union@@Table[RotateLeft[m,{i,j}],{i,Length[m]},{j,Length[First[m]]}]];
    Table[Length[Select[Partition[#,n-k]&/@Tuples[{0,1},(n-k)*k],neckmatQ]],{n,8},{k,n-1}] (* Gus Wiseman, Feb 04 2019 *)

Formula

T(n,k) = (1/(nk))*Sum_{ c divides n } Sum_{ d divides k } phi(c)*phi(d)*2^(nk/lcm(c,d)), where phi is A000010 and lcm stands for least common multiple. - Stewart N. Ethier, Aug 24 2012

A179043 Number of n X n checkered tori.

Original entry on oeis.org

1, 2, 7, 64, 4156, 1342208, 1908897152, 11488774559744, 288230376353050816, 29850020237398264483840, 12676506002282327791964489728, 21970710674130840874443091905462272, 154866286100907105149651981766316633972736
Offset: 0

Views

Author

Rouben Rostamian (rostamian(AT)umbc.edu), Jun 25 2010

Keywords

Comments

Consider an n X n checkerboard whose tiles are assigned colors 0 and 1, at random. There are 2^(n^2) such checkerboards. We identify the opposite edges of each checkerboard, thus making it into a (topological) torus. There are a(n) such (distinct) tori. It is possible to show that a(n) >= 2^(n^2)/n^2 for all n.
Main diagonal of A184271.
Main diagonal of Table 3: The number a(m, n) of toroidal m X n binary arrays, allowing rotation of the rows and/or the columns but not reflection, for m, n = 1, 2, ..., 8, at page 5 of Ethier. - Jonathan Vos Post, Jan 14 2013
This is a 2-dimensional generalization of binary necklaces (A000031). - Gus Wiseman, Feb 04 2019

Examples

			From _Gus Wiseman_, Feb 04 2019: (Start)
Inequivalent representatives of the a(2) = 7 checkered tori:
  [0 0] [0 0] [0 0] [0 1] [0 1] [0 1] [1 1]
  [0 0] [0 1] [1 1] [0 1] [1 0] [1 1] [1 1]
(End)
		

Crossrefs

Cf. A184271 (n X k toroidal binary arrays).

Programs

  • Mathematica
    a[n_] := Sum[If[Mod[n, c] == 0, Sum[If[Mod[n, d] == 0, EulerPhi[c] EulerPhi[d] 2^(n^2/LCM[c, d]), 0], {d, 1, n}], 0], {c, 1, n}]/n ^2

Formula

a(n) = (1/n^2)*Sum_{ c divides n } Sum_{ d divides n } phi(c)*phi(d)*2^(n^2/lcm(c,d)), where phi is A000010 and lcm stands for least common multiple. - Stewart N. Ethier, Aug 24 2012

Extensions

Terms a(6) and a(7) from A184271
a(8)-a(12) from Stewart N. Ethier, Aug 24 2012
a(0)=1 prepended by Alois P. Heinz, Aug 20 2017

A323858 Number of toroidal necklaces of positive integers summing to n.

Original entry on oeis.org

1, 1, 3, 5, 10, 14, 31, 44, 90, 154, 296, 524, 1035, 1881, 3636, 6869, 13208, 25150, 48585, 93188, 180192, 347617, 673201, 1303259, 2529740, 4910708, 9549665, 18579828, 36192118, 70540863, 137620889, 268655549, 524873503, 1026068477, 2007178821, 3928564237
Offset: 0

Views

Author

Gus Wiseman, Feb 04 2019

Keywords

Comments

The 1-dimensional (necklace) case is A008965.
We define a toroidal necklace to be an equivalence class of matrices under all possible rotations of the sequence of rows and the sequence of columns. Alternatively, a toroidal necklace is a matrix that is minimal among all possible rotations of its sequence of rows and its sequence of columns.

Examples

			Inequivalent representatives of the a(6) = 31 toroidal necklaces:
  6  15  24  33  114  123  132  222  1113  1122  1212  11112  111111
.
  1  2  3  11  11  12  12  111
  5  4  3  13  22  12  21  111
.
  1  1  1  2  11
  1  2  3  2  11
  4  3  2  2  11
.
  1  1  1
  1  1  2
  1  2  1
  3  2  2
.
  1
  1
  1
  1
  2
.
  1
  1
  1
  1
  1
  1
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    ptnmats[n_]:=Union@@Permutations/@Select[Union@@(Tuples[Permutations/@#]&/@Map[primeMS,facs[n],{2}]),SameQ@@Length/@#&];
    neckmatQ[m_]:=m==First[Union@@Table[RotateLeft[m,{i,j}],{i,Length[m]},{j,Length[First[m]]}]];
    Table[Length[Join@@Table[Select[ptnmats[k],neckmatQ],{k,Times@@Prime/@#&/@IntegerPartitions[n]}]],{n,10}]
  • PARI
    U(n,m,k) = (1/(n*m)) * sumdiv(n, c, sumdiv(m, d, eulerphi(c) * eulerphi(d) * subst(k, x, x^lcm(c,d))^(n*m/lcm(c, d))));
    a(n)={if(n < 1, n==0, sum(i=1, n, sum(j=1, n\i, polcoef(U(i, j, x/(1-x) + O(x*x^n)), n))))} \\ Andrew Howroyd, Aug 18 2019

Extensions

Terms a(18) and beyond from Andrew Howroyd, Aug 18 2019

A323865 Number of aperiodic binary toroidal necklaces of size n.

Original entry on oeis.org

1, 2, 2, 4, 8, 12, 36, 36, 114, 166, 396, 372, 1992, 1260, 4644, 8728, 20310, 15420, 87174, 55188, 314064, 399432, 762228, 729444, 5589620, 4026522, 10323180, 19883920, 57516048, 37025580, 286322136, 138547332, 805277760, 1041203944, 2021145660, 3926827224
Offset: 0

Views

Author

Gus Wiseman, Feb 04 2019

Keywords

Comments

We define a toroidal necklace to be an equivalence class of matrices under all possible rotations of the sequence of rows and the sequence of columns. An n X k matrix is aperiodic if all n * k rotations of its sequence of rows and its sequence of columns are distinct.

Examples

			Inequivalent representatives of the a(6) = 36 aperiodic necklaces:
  000001  000011  000101  000111  001011  001101  001111  010111  011111
.
  000  000  001  001  001  001  001  011  011
  001  011  010  011  101  110  111  101  111
.
  00  00  00  00  00  01  01  01  01
  00  01  01  01  11  01  01  10  11
  01  01  10  11  01  10  11  11  11
.
  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  1  1
  0  0  0  0  1  1  1  0  1
  0  0  1  1  0  1  1  1  1
  0  1  0  1  1  0  1  1  1
  1  1  1  1  1  1  1  1  1
		

Crossrefs

Programs

  • Mathematica
    apermatQ[m_]:=UnsameQ@@Join@@Table[RotateLeft[m,{i,j}],{i,Length[m]},{j,Length[First[m]]}];
    neckmatQ[m_]:=m==First[Union@@Table[RotateLeft[m,{i,j}],{i,Length[m]},{j,Length[First[m]]}]];
    zaz[n_]:=Join@@(Table[Partition[#,d],{d,Divisors[n]}]&/@Tuples[{0,1},n]);
    Table[If[n==0,1,Length[Union[First/@matcyc/@Select[zaz[n],And[apermatQ[#],neckmatQ[#]]&]]]],{n,0,10}]

Formula

a(n) = Sum_{d|n} A323861(d, n/d) for n > 0. - Andrew Howroyd, Aug 21 2019

Extensions

Terms a(19) and beyond from Andrew Howroyd, Aug 21 2019

A323860 Table read by antidiagonals where A(n,k) is the number of n X k aperiodic binary arrays.

Original entry on oeis.org

2, 2, 2, 6, 8, 6, 12, 54, 54, 12, 30, 216, 486, 216, 30, 54, 990, 4020, 4020, 990, 54, 126, 3912, 32730, 64800, 32730, 3912, 126, 240, 16254, 261414, 1047540, 1047540, 261414, 16254, 240, 504, 64800, 2097018, 16764840, 33554250, 16764840, 2097018, 64800, 504
Offset: 1

Views

Author

Gus Wiseman, Feb 04 2019

Keywords

Comments

The 1-dimensional case is A027375.
An n X k matrix is aperiodic if all n * k rotations of its sequence of rows and its sequence of columns are distinct.

Examples

			Table begins:
       1     2     3     4
    ------------------------
  1: |  2     2     6    12
  2: |  2     8    54   216
  3: |  6    54   486  4020
  4: | 12   216  4020 64800
The A(2,2) = 8 arrays:
  [0 0] [0 0] [0 1] [0 1] [1 0] [1 0] [1 1] [1 1]
  [0 1] [1 0] [0 0] [1 1] [0 0] [1 1] [0 1] [1 0]
Note that the following are not aperiodic even though their row and column sequences are independently aperiodic:
  [1 0] [0 1]
  [0 1] [1 0]
		

Crossrefs

First and last columns are A027375. Main diagonal is A323863.

Programs

  • GAP
    # See A323861 for code.
    for n in [1..8] do for k in [1..8] do Print(n*k*A323861(n,k), ", "); od; Print("\n"); od; # Andrew Howroyd, Aug 21 2019
  • Mathematica
    apermatQ[m_]:=UnsameQ@@Join@@Table[RotateLeft[m,{i,j}],{i,Length[m]},{j,Length[First[m]]}];
    Table[Length[Select[Partition[#,n-k]&/@Tuples[{0,1},(n-k)*k],apermatQ]],{n,8},{k,n-1}]

Formula

T(n,k) = n*k*A323861(n,k). - Andrew Howroyd, Aug 21 2019

Extensions

Terms a(29) and beyond from Andrew Howroyd, Aug 21 2019

A323867 Number of aperiodic arrays of positive integers summing to n.

Original entry on oeis.org

1, 1, 1, 5, 11, 33, 57, 157, 303, 683, 1358, 2974, 5932, 12560, 25328, 52400, 106256, 217875, 441278, 899955, 1822703, 3701401, 7491173, 15178253, 30691135, 62085846, 125435689, 253414326, 511547323, 1032427635, 2082551931, 4199956099, 8466869525, 17064777665
Offset: 0

Views

Author

Gus Wiseman, Feb 04 2019

Keywords

Comments

The 1-dimensional case is A000740.
An n X k matrix is aperiodic if all n * k rotations of its sequence of rows and its sequence of columns are distinct.

Examples

			The a(5) = 33 arrays:
  5  14  23  32  41  113  122  131  212  221  311  1112  1121  1211  2111
.
  1  2  3  4  11  11  12  21
  4  3  2  1  12  21  11  11
.
  1  1  1  2  2  3
  1  2  3  1  2  1
  3  2  1  2  1  1
.
  1  1  1  2
  1  1  2  1
  1  2  1  1
  2  1  1  1
		

Crossrefs

Programs

  • GAP
    List([0..30], A323867); # See A323861 for code; Andrew Howroyd, Aug 21 2019
  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    ptnmats[n_]:=Union@@Permutations/@Select[Union@@(Tuples[Permutations/@#]&/@Map[primeMS,facs[n],{2}]),SameQ@@Length/@#&];
    apermatQ[m_]:=UnsameQ@@Join@@Table[RotateLeft[m,{i,j}],{i,Length[m]},{j,Length[First[m]]}];
    Table[Length[Union@@Table[Select[ptnmats[k],apermatQ],{k,Times@@Prime/@#&/@IntegerPartitions[n]}]],{n,15}]

Extensions

Terms a(16) and beyond from Andrew Howroyd, Aug 21 2019

A323871 Number of aperiodic toroidal necklaces of size n whose entries cover an initial interval of positive integers.

Original entry on oeis.org

1, 2, 8, 53, 216, 3112, 13512, 272844, 2362412, 40898808, 295024104, 14045779864, 81055130520, 3040383692328, 61408850927280, 1661142087743940, 15337737297545400, 1128511554416582908, 9768588138876674856, 803306338873264137240, 15452347618762680730384
Offset: 1

Views

Author

Gus Wiseman, Feb 04 2019

Keywords

Comments

The 1-dimensional (Lyndon word) case is A060223.
We define a toroidal necklace to be an equivalence class of matrices under all possible rotations of the sequence of rows and the sequence of columns. An n X k matrix is aperiodic if all n * k rotations of its sequence of rows and its sequence of columns are distinct.

Examples

			The a(3) = 8 aperiodic toroidal necklaces:
  [1 2 3] [1 3 2] [1 2 2] [1 1 2]
.
  [1] [1] [1] [1]
  [2] [3] [2] [1]
  [3] [2] [2] [2]
		

Crossrefs

Programs

  • GAP
    List([1..30], A323871); # See A323861 for code; Andrew Howroyd, Aug 21 2019
  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    nrmmats[n_]:=Join@@Table[Table[Table[Position[stn,{i,j}][[1,1]],{i,d},{j,n/d}],{stn,Join@@Permutations/@sps[Tuples[{Range[d],Range[n/d]}]]}],{d,Divisors[n]}];
    apermatQ[m_]:=UnsameQ@@Join@@Table[RotateLeft[m,{i,j}],{i,Length[m]},{j,Length[First[m]]}];
    neckmatQ[m_]:=m==First[Union@@Table[RotateLeft[m,{i,j}],{i,Length[m]},{j,Length[First[m]]}]];
    Table[Length[Select[nrmmats[n],neckmatQ[#]&&apermatQ[#]&]],{n,6}]

Extensions

Terms a(9) and beyond from Andrew Howroyd, Aug 21 2019

A323866 Number of aperiodic toroidal necklaces of positive integers summing to n.

Original entry on oeis.org

1, 1, 1, 3, 5, 12, 18, 42, 72, 145, 262, 522, 960, 1879, 3531, 6831, 13013, 25148, 48177, 93186, 179507, 347509, 671955, 1303257, 2527162, 4910681, 9545176, 18579471, 36183505, 70540861, 137603801, 268655547, 524842088, 1026067205, 2007118657, 3928564113
Offset: 0

Views

Author

Gus Wiseman, Feb 04 2019

Keywords

Comments

The 1-dimensional (Lyndon word) case is A059966.
We define a toroidal necklace to be an equivalence class of matrices under all possible rotations of the sequence of rows and the sequence of columns. An n X k matrix is aperiodic if all n * k rotations of its sequence of rows and its sequence of columns are distinct.

Examples

			Inequivalent representatives of the a(6) = 18 toroidal necklaces:
  [6] [1 5] [2 4] [1 1 4] [1 2 3] [1 3 2] [1 1 1 3] [1 1 2 2] [1 1 1 1 2]
.
  [1] [2] [1 1]
  [5] [4] [1 3]
.
  [1] [1] [1]
  [1] [2] [3]
  [4] [3] [2]
.
  [1] [1]
  [1] [1]
  [1] [2]
  [3] [2]
.
  [1]
  [1]
  [1]
  [1]
  [2]
		

Crossrefs

Programs

  • GAP
    List([0..30], A323866); # See A323861 for code; Andrew Howroyd, Aug 21 2019
  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    ptnmats[n_]:=Union@@Permutations/@Select[Union@@(Tuples[Permutations/@#]&/@Map[primeMS,facs[n],{2}]),SameQ@@Length/@#&];
    apermatQ[m_]:=UnsameQ@@Join@@Table[RotateLeft[m,{i,j}],{i,Length[m]},{j,Length[First[m]]}];
    neckmatQ[m_]:=m==First[Union@@Table[RotateLeft[m,{i,j}],{i,Length[m]},{j,Length[First[m]]}]];
    Table[If[n==0,1,Length[Union@@Table[Select[ptnmats[k],And[apermatQ[#],neckmatQ[#]]&],{k,Times@@Prime/@#&/@IntegerPartitions[n]}]]],{n,0,10}]

Extensions

Terms a(16) and beyond from Andrew Howroyd, Aug 21 2019

A323869 Number of aperiodic matrices of size n whose entries cover an initial interval of positive integers.

Original entry on oeis.org

1, 4, 24, 212, 1080, 18672, 94584, 2182752, 21261708, 408988080, 3245265144, 168549358368, 1053716696760, 42565371692592, 921132763909200, 26578273403903040, 260741534058271800, 20313207979498492344, 185603174638656822264, 16066126777465282744800, 324499299994016295338064
Offset: 1

Views

Author

Gus Wiseman, Feb 04 2019

Keywords

Comments

An n X k matrix is aperiodic if all n * k rotations of its sequence of rows and its sequence of columns are distinct.

Examples

			The a(3) = 24 matrices:
  [123][132][213][312][231][321][122][211][112][221][121][212]
.
  [1][1][2][3][2][3][1][2][1][2][1][2]
  [2][3][1][1][3][2][2][1][1][2][2][1]
  [3][2][3][2][1][1][2][1][2][1][1][2]
		

Crossrefs

Programs

  • GAP
    List([1..30], A323869); # See A323861 for code; Andrew Howroyd, Aug 21 2019
  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    nrmmats[n_]:=Join@@Table[Table[Table[Position[stn,{i,j}][[1,1]],{i,d},{j,n/d}],{stn,Join@@Permutations/@sps[Tuples[{Range[d],Range[n/d]}]]}],{d,Divisors[n]}];
    apermatQ[m_]:=UnsameQ@@Join@@Table[RotateLeft[m,{i,j}],{i,Length[m]},{j,Length[First[m]]}];
    Table[Length[Select[nrmmats[n],apermatQ]],{n,6}]

Formula

a(n) = n*A323871(n). - Andrew Howroyd, Aug 21 2019

Extensions

Terms a(9) and beyond from Andrew Howroyd, Aug 21 2019

A306669 Number of aperiodic permutation necklaces of weight n.

Original entry on oeis.org

1, 0, 1, 4, 23, 110, 719, 4992, 40302, 362492, 3628799, 39912804, 479001599, 6226974714, 87178289207, 1307673722880, 20922789887999, 355687417744992, 6402373705727999, 121645100223036700, 2432902008176115023, 51090942167993548790, 1124000727777607679999
Offset: 1

Views

Author

Gus Wiseman, Mar 04 2019

Keywords

Comments

A permutation is aperiodic if every rotation of {1...n} acts on the vertices of the cycle decomposition to produce a different digraph. A permutation necklace is an equivalence class of permutations under the action of rotation of vertices in the cycle decomposition. The corresponding action on words applies m -> m + 1 for m < n and n -> 1, and rotates once to the right. For example, (24531) first becomes (35142) under the application of cyclic rotation, and then is rotated right to give (23514).

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Permutations[Range[n]],UnsameQ@@NestList[RotateRight[#/.k_Integer:>If[k==n,1,k+1]]&,#,n-1]&]]/n,{n,6}]
  • PARI
    a(n) = (1/n)*sumdiv(n, d, moebius(n/d)*(n/d)^d*d!); \\ Andrew Howroyd, Aug 19 2019

Formula

a(n) = A324514(n)/n.
a(n) = (1/n)*Sum_{d|n} mu(n/d)*(n/d)^d*d!. - Andrew Howroyd, Aug 19 2019

Extensions

Terms a(10) and beyond from Andrew Howroyd, Aug 19 2019
Showing 1-10 of 13 results. Next