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 14 results. Next

A049311 Number of (0,1) matrices with n ones and no zero rows or columns, up to row and column permutations.

Original entry on oeis.org

1, 3, 6, 16, 34, 90, 211, 558, 1430, 3908, 10725, 30825, 90156, 273234, 848355, 2714399, 8909057, 30042866, 103859678, 368075596, 1335537312, 4958599228, 18820993913, 72980867400, 288885080660, 1166541823566, 4802259167367, 20141650236664
Offset: 1

Views

Author

Keywords

Comments

Also the number of bipartite graphs with n edges, no isolated vertices and a distinguished bipartite block, up to isomorphism.
The EULERi transform (A056156) is also interesting.
a(n) is also the number of non-isomorphic set multipartitions (multisets of sets) of weight n. - Gus Wiseman, Mar 17 2017

Examples

			E.g. a(2) = 3: two ones in same row, two ones in same column, or neither.
a(3) = 6 is coefficient of x^3 in (1/36)*((1 + x)^9 + 6*(1 + x)^3*(1 + x^2)^3 + 8*(1 + x^3)^3 + 9*(1 + x)*(1 + x^2)^4 + 12*(1 + x^3)*(1 + x^6))=1 + x + 3*x^2 + 6*x^3 + 7*x^4 + 7*x^5 + 6*x^6 + 3*x^7 + x^8 + x^9.
There are a(3) = 6 binary matrices with 3 ones, with no zero rows or columns, up to row and column permutation:
  [1 0 0] [1 1 0] [1 0] [1 1] [1 1 1] [1]
  [0 1 0] [0 0 1] [1 0] [1 0] ....... [1].
  [0 0 1] ....... [0 1] ............. [1]
Non-isomorphic representatives of the a(3)=6 set multipartitions are: ((123)), ((1)(23)), ((2)(12)), ((1)(1)(1)), ((1)(2)(2)), ((1)(2)(3)). - _Gus Wiseman_, Mar 17 2017
		

Crossrefs

Programs

  • PARI
    WeighT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v,n,(-1)^(n-1)/n))))-1,-#v)}
    permcount(v) = {my(m=1, s=0, k=0, t); for(i=1, #v, t=v[i]; k=if(i>1&&t==v[i-1], k+1, 1); m*=t*k; s+=t); s!/m}
    K(q, t, k)={WeighT(Vec(sum(j=1, #q, gcd(t, q[j])*x^lcm(t, q[j])) + O(x*x^k), -k))}
    a(n)={my(s=0); forpart(q=n, s+=permcount(q)*polcoef(exp(x*Ser(sum(t=1, n, K(q, t, n)/t))), n)); s/n!} \\ Andrew Howroyd, Jan 16 2023

Formula

Calculate number of connected bipartite graphs + number of connected bipartite graphs with no duality automorphism, then apply EULER transform.
a(n) is the coefficient of x^n in the cycle index Z(S_n X S_n; 1+x, 1+x^2, ...), where S_n X S_n is Cartesian product of symmetric groups S_n of degree n.

Extensions

More terms and formula from Vladeta Jovovic, Jul 29 2000
a(19)-a(28) from Max Alekseyev, Jul 22 2009
a(29)-a(102) from Aliaksandr Siarhei, Dec 13 2013
Name edited by Gus Wiseman, Dec 18 2018

A138178 Number of symmetric matrices with nonnegative integer entries and without zero rows or columns such that sum of all entries is equal to n.

Original entry on oeis.org

1, 1, 3, 9, 33, 125, 531, 2349, 11205, 55589, 291423, 1583485, 8985813, 52661609, 319898103, 2000390153, 12898434825, 85374842121, 580479540219, 4041838056561, 28824970996809, 210092964771637, 1564766851282299, 11890096357039749, 92151199272181629
Offset: 0

Views

Author

Vladeta Jovovic, Mar 03 2008

Keywords

Comments

Number of normal semistandard Young tableaux of size n, where a tableau is normal if its entries span an initial interval of positive integers. - Gus Wiseman, Feb 23 2018

Examples

			a(4) = 33 because there are 1 such matrix of type 1 X 1, 7 matrices of type 2 X 2, 15 of type 3 X 3 and 10 of type 4 X 4, cf. A138177.
From _Gus Wiseman_, Feb 23 2018: (Start)
The a(3) = 9 normal semistandard Young tableaux:
1   1 2   1 3   1 2   1 1   1 2 3   1 2 2   1 1 2   1 1 1
2   3     2     2     2
3
(End)
From _Gus Wiseman_, Nov 14 2018: (Start)
The a(4) = 33 matrices:
[4]
.
[30][21][20][11][10][02][01]
[01][10][02][11][03][20][12]
.
[200][200][110][101][100][100][100][100][011][010][010][010][001][001][001]
[010][001][100][010][020][011][010][001][100][110][101][100][020][010][001]
[001][010][001][100][001][010][002][011][100][001][010][002][100][101][110]
.
[1000][1000][1000][1000][0100][0100][0010][0010][0001][0001]
[0100][0100][0010][0001][1000][1000][0100][0001][0100][0010]
[0010][0001][0100][0010][0010][0001][1000][1000][0010][0100]
[0001][0010][0001][0100][0001][0010][0001][0100][1000][1000]
(End)
		

Crossrefs

Programs

  • Maple
    gf:= proc(j) local k, n; add(add((-1)^(n-k) *binomial(n, k) *(1-x)^(-k) *(1-x^2)^(-binomial(k, 2)), k=0..n), n=0..j) end: a:= n-> coeftayl(gf(n+1), x=0, n): seq(a(n), n=0..25); # Alois P. Heinz, Sep 25 2008
  • Mathematica
    Table[Sum[SeriesCoefficient[1/(2^(k+1)*(1-x)^k*(1-x^2)^(k*(k-1)/2)),{x,0,n}],{k,0,Infinity}],{n,0,20}]  (* Vaclav Kotesovec, Jul 03 2014 *)
    multsubs[set_,k_]:=If[k==0,{{}},Join@@Table[Prepend[#,set[[i]]]&/@multsubs[Drop[set,i-1],k-1],{i,Length[set]}]]; Table[Length[Select[multsubs[Tuples[Range[n],2],n],And[Union[First/@#]==Range[Max@@First/@#],Union[Last/@#]==Range[Max@@Last/@#],Sort[Reverse/@#]==#]&]],{n,5}] (* Gus Wiseman, Nov 14 2018 *)

Formula

G.f.: Sum_{n>=0} Sum_{k=0..n} (-1)^(n-k)*C(n,k)*(1-x)^(-k)*(1-x^2)^(-C(k,2)).
G.f.: Sum_{n>=0} 2^(-n-1)*(1-x)^(-n)*(1-x^2)^(-C(n,2)). - Vladeta Jovovic, Dec 09 2009

Extensions

More terms from Alois P. Heinz, Sep 25 2008

A120732 Number of square matrices with nonnegative integer entries and without zero rows or columns such that sum of all entries is equal to n.

Original entry on oeis.org

1, 1, 3, 15, 107, 991, 11267, 151721, 2360375, 41650861, 821881709, 17932031225, 428630422697, 11138928977049, 312680873171465, 9428701154866535, 303957777464447449, 10431949496859168189, 379755239311735494421
Offset: 0

Views

Author

Vladeta Jovovic, Aug 18 2006

Keywords

Examples

			From _Gus Wiseman_, Nov 14 2018: (Start)
The a(3) = 15 matrices:
  [3]
.
  [2 0] [1 1] [1 1] [1 0] [1 0] [0 2] [0 1] [0 1]
  [0 1] [1 0] [0 1] [1 1] [0 2] [1 0] [2 0] [1 1]
.
  [1 0 0] [1 0 0] [0 1 0] [0 1 0] [0 0 1] [0 0 1]
  [0 1 0] [0 0 1] [1 0 0] [0 0 1] [1 0 0] [0 1 0]
  [0 0 1] [0 1 0] [0 0 1] [1 0 0] [0 1 0] [1 0 0]
(End)
		

Crossrefs

Programs

  • Mathematica
    Table[1/n!*Sum[(-1)^(n-k)*StirlingS1[n,k]*Sum[(m!)^2*StirlingS2[k,m]^2,{m,0,k}],{k,0,n}],{n,0,20}] (* Vaclav Kotesovec, May 07 2014 *)
    multsubs[set_,k_]:=If[k==0,{{}},Join@@Table[Prepend[#,set[[i]]]&/@multsubs[Drop[set,i-1],k-1],{i,Length[set]}]]; Table[Length[Select[multsubs[Tuples[Range[n],2],n],Union[First/@#]==Union[Last/@#]==Range[Max@@First/@#]&]],{n,5}] (* Gus Wiseman, Nov 14 2018 *)

Formula

a(n) = (1/n!)*Sum_{k=0..n} (-1)^(n-k)*Stirling1(n,k)*A048144(k).
G.f.: Sum_{n>=0} Sum_{j=0..n} (-1)^(n-j)*binomial(n,j)*((1-x)^(-j)-1)^n.
a(n) ~ c * n! / (sqrt(n) * (log(2))^(2*n)), where c = 0.4670932578797312973586879293426... . - Vaclav Kotesovec, May 07 2014
In closed form, c = 2^(log(2)/2-2) / (log(2) * sqrt(Pi*(1-log(2)))). - Vaclav Kotesovec, May 03 2015
G.f.: Sum_{n>=0} (1-x)^n * (1 - (1-x)^n)^n. - Paul D. Hanna, Mar 26 2018

A104602 Number of square (0,1)-matrices with exactly n entries equal to 1 and no zero row or columns.

Original entry on oeis.org

1, 1, 2, 10, 70, 642, 7246, 97052, 1503700, 26448872, 520556146, 11333475922, 270422904986, 7016943483450, 196717253145470, 5925211960335162, 190825629733950454, 6543503207678564364, 238019066600097607402, 9153956822981328930170, 371126108428565106918404
Offset: 0

Views

Author

Ralf Stephan, Mar 27 2005

Keywords

Comments

Number of square (0,1)-matrices with exactly n entries equal to 1 and no zero row or columns, up to row and column permutation, is A057151(n). - Vladeta Jovovic, Mar 25 2006

Examples

			From _Gus Wiseman_, Nov 14 2018: (Start)
The a(3) = 10 matrices:
  [1 1] [1 1] [1 0] [0 1]
  [1 0] [0 1] [1 1] [1 1]
.
  [1 0 0] [1 0 0] [0 1 0] [0 1 0] [0 0 1] [0 0 1]
  [0 1 0] [0 0 1] [1 0 0] [0 0 1] [1 0 0] [0 1 0]
  [0 0 1] [0 1 0] [0 0 1] [1 0 0] [0 1 0] [1 0 0]
(End)
		

Crossrefs

Programs

  • Mathematica
    Table[1/n!*Sum[StirlingS1[n,k]*Sum[(m!)^2*StirlingS2[k, m]^2, {m, 0, k}],{k,0,n}],{n,1,20}] (* Vaclav Kotesovec, May 07 2014 *)
    Table[Length[Select[Subsets[Tuples[Range[n],2],{n}],Union[First/@#]==Union[Last/@#]==Range[Max@@First/@#]&]],{n,5}] (* Gus Wiseman, Nov 14 2018 *)

Formula

a(n) = (1/n!)*Sum_{k=0..n} Stirling1(n,k)*A048144(k). - Vladeta Jovovic, Mar 25 2006
G.f.: Sum_{n>=0} Sum_{j=0..n} (-1)^(n-j)*binomial(n,j)*((1+x)^j-1)^n. - Vladeta Jovovic, Mar 25 2006
a(n) ~ c * n! / (sqrt(n) * (log(2))^(2*n)), where c = 0.28889864564457451375789435201798... . - Vaclav Kotesovec, May 07 2014
In closed form, c = 1 / (log(2) * 2^(log(2)/2+2) * sqrt(Pi*(1-log(2)))). - Vaclav Kotesovec, May 03 2015
G.f.: Sum_{n>=0} ((1+x)^n - 1)^n / (1+x)^(n*(n+1)). - Paul D. Hanna, Mar 26 2018

Extensions

More terms from Vladeta Jovovic, Mar 25 2006
a(0)=1 prepended by Alois P. Heinz, Jan 14 2015

A054976 Number of binary n X n matrices with no zero rows or columns, up to row and column permutation.

Original entry on oeis.org

1, 3, 17, 179, 3835, 200082, 29610804, 13702979132, 20677458750966, 103609939177198046, 1745061194503344181714, 99860890306900024150675406, 19611238933283757244479826044874, 13340750149227624084760722122669739026, 31706433098827528779057124372265863803044450
Offset: 1

Views

Author

Vladeta Jovovic, May 27 2000

Keywords

Comments

Also the number of non-isomorphic set multipartitions (multisets of sets) with n parts and n vertices. - Gus Wiseman, Nov 18 2018

Examples

			From _Gus Wiseman_, Nov 18 2018: (Start)
Inequivalent representatives of the a(3) = 17 matrices:
  100 100 100 100 100 010 010 001 001 001 001 110 101 101 011 011 111
  100 010 001 011 011 001 101 001 101 011 111 101 011 011 011 111 111
  011 001 011 011 111 111 011 111 011 111 111 011 011 111 111 111 111
Non-isomorphic representatives of the a(1) = 1 through a(3) = 17 set multipartitions:
  {{1}}  {{1},{2}}      {{1},{2},{3}}
         {{2},{1,2}}    {{1},{1},{2,3}}
         {{1,2},{1,2}}  {{1},{3},{2,3}}
                        {{1},{2,3},{2,3}}
                        {{2},{1,3},{2,3}}
                        {{2},{3},{1,2,3}}
                        {{3},{1,3},{2,3}}
                        {{3},{3},{1,2,3}}
                        {{1,2},{1,3},{2,3}}
                        {{1},{2,3},{1,2,3}}
                        {{1,3},{2,3},{2,3}}
                        {{3},{2,3},{1,2,3}}
                        {{1,3},{2,3},{1,2,3}}
                        {{2,3},{2,3},{1,2,3}}
                        {{3},{1,2,3},{1,2,3}}
                        {{2,3},{1,2,3},{1,2,3}}
                        {{1,2,3},{1,2,3},{1,2,3}}
(End)
		

Crossrefs

Column sums of A057150.

Programs

Formula

a(n) = A002724(n) - 2*A002725(n-1) + A002724(n-1).

Extensions

More terms from David Wasserman, Mar 06 2002
Terms a(14) and beyond from Andrew Howroyd, Apr 11 2020

A319899 Numbers whose number of prime factors with multiplicity (A001222) is the number of distinct prime factors (A001221) in the product of the prime indices (A003963).

Original entry on oeis.org

1, 3, 5, 7, 11, 15, 17, 19, 23, 26, 31, 33, 35, 39, 41, 51, 53, 55, 58, 59, 65, 67, 69, 74, 77, 83, 85, 86, 87, 91, 93, 94, 95, 97, 103, 109, 111, 119, 122, 123, 127, 129, 131, 142, 146, 155, 157, 158, 161, 165, 169, 177, 178, 179, 183, 185, 187, 191, 201, 202
Offset: 1

Views

Author

Gus Wiseman, Dec 17 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798. The multiset multisystem with MM-number n is formed by taking the multiset of prime indices of each part of the multiset of prime indices of n. For example, the prime indices of 78 are {1,2,6}, so the multiset multisystem with MM-number 78 is {{},{1},{1,2}}. This sequence lists all MM-numbers of square multiset multisystems, meaning the number of edges is equal to the number of distinct vertices.

Examples

			The sequence of multiset multisystems whose MM-numbers belong to the sequence begins:
   1: {}
   3: {{1}}
   5: {{2}}
   7: {{1,1}}
  11: {{3}}
  15: {{1},{2}}
  17: {{4}}
  19: {{1,1,1}}
  23: {{2,2}}
  26: {{},{1,2}}
  31: {{5}}
  33: {{1},{3}}
  35: {{2},{1,1}}
  39: {{1},{1,2}}
  41: {{6}}
  51: {{1},{4}}
  53: {{1,1,1,1}}
  55: {{2},{3}}
  58: {{},{1,3}}
  59: {{7}}
  65: {{2},{1,2}}
  67: {{8}}
  69: {{1},{2,2}}
  74: {{},{1,1,2}}
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],PrimeOmega[#]==PrimeNu[Times@@primeMS[#]]&]

A057150 Triangle read by rows: T(n,k) = number of k X k binary matrices with n ones, with no zero rows or columns, up to row and column permutation.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 0, 5, 2, 1, 0, 0, 4, 11, 2, 1, 0, 0, 3, 21, 14, 2, 1, 0, 0, 1, 34, 49, 15, 2, 1, 0, 0, 1, 33, 131, 69, 15, 2, 1, 0, 0, 0, 33, 248, 288, 79, 15, 2, 1, 0, 0, 0, 19, 410, 840, 420, 82, 15, 2, 1, 0, 0, 0, 14, 531, 2144, 1744, 497, 83, 15, 2, 1
Offset: 1

Views

Author

Vladeta Jovovic, Aug 14 2000

Keywords

Comments

Also the number of non-isomorphic set multipartitions (multisets of sets) of weight n with k parts and k vertices. - Gus Wiseman, Nov 14 2018

Examples

			[1], [0,1], [0,1,1], [0,1,2,1], [0,0,5,2,1], [0,0,4,11,2,1], ...;
There are 8 square binary matrices with 5 ones, with no zero rows or columns, up to row and column permutation: 5 of size 3 X 3:
[0 0 1] [0 0 1] [0 0 1] [0 0 1] [0 0 1]
[0 0 1] [0 1 0] [0 1 1] [0 1 1] [1 1 0]
[1 1 1] [1 1 1] [1 0 1] [1 1 0] [1 1 0]
2 of size 4 X 4:
[0 0 0 1] [0 0 0 1]
[0 0 0 1] [0 0 1 0]
[0 0 1 0] [0 1 0 0]
[1 1 0 0] [1 0 0 1]
and 1 of size 5 X 5:
[0 0 0 0 1]
[0 0 0 1 0]
[0 0 1 0 0]
[0 1 0 0 0]
[1 0 0 0 0].
From _Gus Wiseman_, Nov 14 2018: (Start)
Triangle begins:
   1
   0   1
   0   1   1
   0   1   2   1
   0   0   5   2   1
   0   0   4  11   2   1
   0   0   3  21  14   2   1
   0   0   1  34  49  15   2   1
   0   0   1  33 131  69  15   2   1
   0   0   0  33 248 288  79  15   2   1
Non-isomorphic representatives of the multiset partitions counted in row 6 {0,0,4,11,2,1} are:
  {{12}{13}{23}}  {{1}{1}{1}{234}}  {{1}{2}{3}{3}{45}}  {{1}{2}{3}{4}{5}{6}}
  {{1}{23}{123}}  {{1}{1}{24}{34}}  {{1}{2}{3}{5}{45}}
  {{13}{23}{23}}  {{1}{1}{4}{234}}
  {{3}{23}{123}}  {{1}{2}{34}{34}}
                  {{1}{3}{24}{34}}
                  {{1}{3}{4}{234}}
                  {{1}{4}{24}{34}}
                  {{1}{4}{4}{234}}
                  {{2}{4}{12}{34}}
                  {{3}{4}{12}{34}}
                  {{4}{4}{12}{34}}
(End)
		

Crossrefs

Programs

  • Mathematica
    permcount[v_List] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
    c[p_List, q_List, k_] := SeriesCoefficient[Product[Product[(1 + O[x]^(k + 1) + x^LCM[p[[i]], q[[j]]])^GCD[p[[i]], q[[j]]], {j, 1, Length[q]}], {i, 1, Length[p]}], {x, 0, k}];
    M[m_, n_, k_] := M[m, n, k] = Module[{s = 0}, Do[Do[s += permcount[p]* permcount[q]*c[p, q, k], {q, IntegerPartitions[n]}], {p, IntegerPartitions[m]}]; s/(m!*n!)];
    T[n_, k_] := M[k, k, n] - 2*M[k, k - 1, n] + M[k - 1, k - 1, n];
    Table[T[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 10 2019, after Andrew Howroyd *)
  • PARI
    \\ See A321609 for M.
    T(n,k) = M(k,k,n) - 2*M(k,k-1,n) + M(k-1,k-1,n); \\ Andrew Howroyd, Nov 14 2018

Extensions

Duplicate seventh row removed by Gus Wiseman, Nov 14 2018

A104601 Triangle T(r,n) read by rows: number of n X n (0,1)-matrices with exactly r entries equal to 1 and no zero row or columns.

Original entry on oeis.org

1, 0, 2, 0, 4, 6, 0, 1, 45, 24, 0, 0, 90, 432, 120, 0, 0, 78, 2248, 4200, 720, 0, 0, 36, 5776, 43000, 43200, 5040, 0, 0, 9, 9066, 222925, 755100, 476280, 40320, 0, 0, 1, 9696, 727375, 6700500, 13003620, 5644800, 362880, 0, 0, 0, 7480, 1674840
Offset: 1

Views

Author

Ralf Stephan, Mar 27 2005

Keywords

Examples

			1
0,2
0,4,6
0,1,45,24
0,0,90,432,120
0,0,78,2248,4200,720
0,0,36,5776,43000,43200,5040
0,0,9,9066,222925,755100,476280,40320
0,0,1,9696,727375,6700500,13003620,5644800,362880
0,0,0,7480,1674840,37638036,179494350,226262400,71850240,3628800
		

Crossrefs

Right-edge diagonals include A000142, A055602, A055603. Row sums are in A104602.
Column sums are in A048291. The triangle read by columns = A055599.

Programs

  • Mathematica
    t[r_, n_] := Sum[ Sum[ (-1)^(2n - d - k/d)*Binomial[n, d]*Binomial[n, k/d]*Binomial[k, r], {d, Divisors[k]}], {k, r, n^2}]; Flatten[ Table[t[r, n], {r, 1, 10}, {n, 1, r}]] (* Jean-François Alcover, Jun 27 2012, from formula *)
    Table[Length[Select[Subsets[Tuples[Range[n],2],{n}],Union[First/@#]==Union[Last/@#]==Range[k]&]],{n,6},{k,n}] (* Gus Wiseman, Nov 14 2018 *)

Formula

T(r, n) = Sum{l>=r, Sum{d|l, (-1)^(2n-d-l/d)*C(n, d)*C(n, l/d)*C(l, r) }}.
E.g.f.: Sum(((1+x)^n-1)^n*exp((1-(1+x)^n)*y)*y^n/n!,n=0..infinity). - Vladeta Jovovic, Feb 24 2008

A321720 Number of non-normal (0,1) semi-magic squares with sum of entries equal to n.

Original entry on oeis.org

1, 1, 2, 6, 25, 120, 726, 5040, 40410, 362881, 3630840, 39916800, 479069574, 6227020800, 87181402140, 1307674370040, 20922977418841, 355687428096000, 6402388104196400, 121645100408832000, 2432903379962038320, 51090942171778378800, 1124000886592995642000, 25852016738884976640000
Offset: 0

Views

Author

Gus Wiseman, Nov 18 2018

Keywords

Comments

A non-normal semi-magic square is a nonnegative integer matrix with row sums and column sums all equal to d, for some d|n.

Crossrefs

Programs

  • Mathematica
    prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}];
    Table[Length[Select[Subsets[Tuples[Range[n],2],{n}],And[Union[First/@#]==Union[Last/@#]==Range[Max@@First/@#],SameQ@@Total/@prs2mat[#],SameQ@@Total/@Transpose[prs2mat[#]]]&]],{n,5}]

Formula

a(p) = p! for p prime as the squares are all permutation matrices of order p and a(n) >= n! for n > 1 (see comments in A321717 and A321719). - Chai Wah Wu, Jan 13 2019
a(n) = Sum_{d|n, d<=n/d} A008300(n/d, d) for n > 0. - Andrew Howroyd, Apr 11 2020

Extensions

a(7) from Chai Wah Wu, Jan 13 2019
a(8)-a(15) from Chai Wah Wu, Jan 14 2019
a(16)-a(21) from Chai Wah Wu, Jan 16 2019
Terms a(22) and beyond from Andrew Howroyd, Apr 11 2020

A321723 Number of non-normal magic squares whose entries are all 0 or 1 and sum to n.

Original entry on oeis.org

1, 1, 0, 0, 9, 20, 96, 656, 5584, 48913, 494264, 5383552, 65103875, 840566080, 11834159652, 176621049784, 2838040416201, 48060623405312
Offset: 0

Views

Author

Gus Wiseman, Nov 18 2018

Keywords

Comments

A non-normal magic square is a square matrix with row sums, column sums, and both diagonals all equal to d, for some d|n.

Examples

			The a(4) = 9 magic squares:
  [1 1]
  [1 1]
.
  [1 0 0 0][1 0 0 0][0 1 0 0][0 1 0 0][0 0 1 0][0 0 1 0][0 0 0 1][0 0 0 1]
  [0 0 1 0][0 0 0 1][0 0 1 0][0 0 0 1][1 0 0 0][0 1 0 0][1 0 0 0][0 1 0 0]
  [0 0 0 1][0 1 0 0][1 0 0 0][0 0 1 0][0 1 0 0][0 0 0 1][0 0 1 0][1 0 0 0]
  [0 1 0 0][0 0 1 0][0 0 0 1][1 0 0 0][0 0 0 1][1 0 0 0][0 1 0 0][0 0 1 0]
		

Crossrefs

Programs

  • Mathematica
    prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}];
    multsubs[set_,k_]:=If[k==0,{{}},Join@@Table[Prepend[#,set[[i]]]&/@multsubs[Drop[set,i-1],k-1],{i,Length[set]}]];
    Table[Length[Select[Subsets[Tuples[Range[n],2],{n}],And[Union[First/@#]==Range[Max@@First/@#]==Union[Last/@#],SameQ@@Join[{Tr[prs2mat[#]],Tr[Reverse[prs2mat[#]]]},Total/@prs2mat[#],Total/@Transpose[prs2mat[#]]]]&]],{n,5}]

Formula

a(n) >= A007016(n) with equality if n is prime. - Chai Wah Wu, Jan 15 2019

Extensions

a(7)-a(15) from Chai Wah Wu, Jan 15 2019
a(16)-a(17) from Chai Wah Wu, Jan 16 2019
Showing 1-10 of 14 results. Next