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-9 of 9 results.

A204459 Square array A(n,k), n>=0, k>=0, read by antidiagonals: A(n,k) is the number of k-element subsets that can be chosen from {1,2,...,k*n} having element sum k*(k*n+1)/2.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 2, 1, 1, 0, 1, 0, 3, 0, 1, 0, 1, 8, 8, 4, 1, 1, 0, 1, 0, 33, 0, 5, 0, 1, 0, 1, 58, 141, 86, 25, 6, 1, 1, 0, 1, 0, 676, 0, 177, 0, 7, 0, 1, 0, 1, 526, 3370, 3486, 1394, 318, 50, 8, 1, 1, 0, 1, 0, 17575, 0, 11963, 0, 519, 0, 9, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Jan 15 2012

Keywords

Comments

A(n,k) is the number of partitions of k*(k*n+1)/2 into k distinct parts <=k*n.
A(n,k) = 0 if k>0 and (n = 0 or k*(k*n+1) mod 2 = 1).

Examples

			A(0,0) = 1: {}.
A(1,1) = 1: {1}.
A(5,1) = 1: {3}.
A(1,5) = 1: {1,2,3,4,5}.
A(2,2) = 2: {1,4}, {2,3}.
A(3,2) = 3: {1,6}, {2,5}, {3,4}.
A(2,3) = 0: no subset of {1,2,3,4,5,6} has element sum 3*(3*2+1)/2 = 21/2.
A(4,2) = 4: {1,8}, {2,7}, {3,6}, {4,5}.
A(3,3) = 8: {1,5,9}, {1,6,8}, {2,4,9}, {2,5,8}, {2,6,7}, {3,4,8}, {3,5,7}, {4,5,6}.
A(2,4) = 8: {1,2,7,8}, {1,3,6,8}, {1,4,5,8}, {1,4,6,7}, {2,3,5,8}, {2,3,6,7}, {2,4,5,7}, {3,4,5,6}.
Square array A(n,k) begins:
  1, 0, 0,  0,   0,    0,     0,      0, ...
  1, 1, 1,  1,   1,    1,     1,      1, ...
  1, 0, 2,  0,   8,    0,    58,      0, ...
  1, 1, 3,  8,  33,  141,   676,   3370, ...
  1, 0, 4,  0,  86,    0,  3486,      0, ...
  1, 1, 5, 25, 177, 1394, 11963, 108108, ...
  1, 0, 6,  0, 318,    0, 32134,      0, ...
  1, 1, 7, 50, 519, 5910, 73294, 957332, ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember;
          `if`(it*(2*i-t+1)/2, 0,
          `if`(n=0, 1, b(n, i-1, t) +`if`(n
    				
  • Mathematica
    b[n_, i_, t_] /; it*((2*i-t+1)/2) = 0; b[0, , ] = 1; b[n_, i_, t_] := b[n, i, t] = b[n, i-1, t] + If[n, 0] = 1; a[0, ] = 0; a[n_, k_] := With[{s = k*(k*n+1)}, If[Mod[s, 2] == 1, 0, b[s/2, k*n, k]]]; Flatten[ Table[ a[n, d-n], {d, 0, 15}, {n, 0, d}]] (* Jean-François Alcover, Jun 15 2012, translated from Maple, after Alois P. Heinz *)

A067059 Square array read by antidiagonals of partitions which half fill an n*k box, i.e., partitions of floor(nk/2) or ceiling(nk/2) into up to n positive integers, each no more than k.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 3, 3, 1, 1, 1, 1, 3, 5, 5, 3, 1, 1, 1, 1, 4, 6, 8, 6, 4, 1, 1, 1, 1, 4, 8, 12, 12, 8, 4, 1, 1, 1, 1, 5, 10, 18, 20, 18, 10, 5, 1, 1, 1, 1, 5, 13, 24, 32, 32, 24, 13, 5, 1, 1, 1, 1, 6, 15, 33, 49, 58, 49, 33, 15, 6, 1, 1, 1, 1, 6
Offset: 0

Views

Author

Henry Bottomley, Feb 17 2002

Keywords

Comments

The number of partitions of m into up to n positive integers each no more than k is maximized for given n and k by m=floor(nk/2) or ceiling(nk/2) (and possibly some other values).

Examples

			Rows start:
1, 1, 1, 1, 1, 1, ...;
1, 1, 1, 1, 1, 1, ...;
1, 1, 2, 2, 3, 3, ...;
1, 1, 2, 3, 5, 6, ...;
1, 1, 3, 5, 8, 12, ...; etc.
T(4,5)=12 since 10 can be partitioned into
5+5, 5+4+1, 5+3+2, 5+3+1+1, 5+2+2+1, 4+4+2, 4+3+3,
4+4+1+1, 4+3+2+1, 4+2+2+2, 3+3+3+1, and 3+3+2+2.
		

Crossrefs

As this is symmetric, rows and columns each include A000012 twice, A008619, A001971, A001973, A001975, A001977, A001979 and A001981. Diagonal is A029895. T(n, n*(n-1)) is the magic series A052456.

Programs

  • Maple
    A067059 := proc(n,k)
        local m,a1,a2 ;
        a1 := 0 ;
        m := floor(n*k/2) ;
        for L in combinat[partition](m) do
            if nops(L) <= n then
                if max(op(L)) <= k then
                    a1 := a1+1 ;
                end if ;
            end if;
        end do:
        a2 := 0 ;
        m := ceil(n*k/2) ;
        for L in combinat[partition](m) do
            if nops(L) <= n then
                if max(op(L)) <= k then
                    a2 := a2+1 ;
                end if ;
            end if;
        end do:
        max(a1,a2) ;
    end proc:
    for d from 0 to 12 do
        for k from 0 to d do
            printf("%d,",A067059(d-k,k)) ;
        end do:
    end do: # R. J. Mathar, Nov 13 2016
  • Mathematica
    t[n_, k_] := Length[ IntegerPartitions[ Floor[n*k/2], n, Range[k]]]; Flatten[ Table[ t[n-k , k], {n, 0, 13}, {k, 0, n}]] (* Jean-François Alcover, Jan 02 2012 *)
  • Sage
    def A067059(n, k):
        return Partitions((n*k)//2, max_length=n, max_part=k).cardinality()
    for n in (0..9): [A067059(n,k) for k in (0..9)] # Peter Luschny, May 05 2014

A052457 Number of bimagic series for squares of order n.

Original entry on oeis.org

1, 0, 0, 2, 8, 98, 1844, 38039, 949738, 24643236, 947689757, 45828982764, 2151748695931, 123821075526032, 8131094055190149, 573957471153552576, 44010987379157415768, 3655486139293429450720, 333633403912637510806972
Offset: 1

Views

Author

Keywords

Crossrefs

Extensions

Extended Nov 08 2003, using the values of a(3) through a(11) from Christian Boyer's web site. - N. J. A. Sloane.
a(12) from Christian Boyer (cboyer(AT)club-internet.fr), Nov 05 2004
a(13)-a(15) computed by Lorenz Schlangen and later independently confirmed by Walter Trump. a(16) computed by Walter Trump. - Christian Boyer (cboyer(AT)club-internet.fr), Oct 04 2005
a(17) computed by Walter Trump and communicated by Christian Boyer (cboyer(AT)club-internet.fr), Apr 02 2007
a(18)-a(19) computed by Michael Quist Christian Boyer (cboyer(AT)club-internet.fr), Feb 06 2009

A052458 Number of trimagic series for squares of order n.

Original entry on oeis.org

1, 0, 0, 2, 2, 0, 0, 121, 126, 0, 31187, 2226896, 17265701, 0, 69303997733
Offset: 1

Views

Author

Keywords

Comments

Asymptotic results are presented in Quist for magic cube and hypercube series, bimagic series, and trimagic series. - Jonathan Vos Post, Jun 04 2013

References

  • M. Kraitchik, Mathematical Recreations, 1942, see Section 7.10.

Crossrefs

Extensions

Corrected and extended Nov 15 2003, using the values of a(3) through a(12) from Christian Boyer's web site. - N. J. A. Sloane
One more term from Christian Boyer (cboyer(AT)club-internet.fr), Nov 05 2004
One further term from Christian Boyer (cboyer(AT)club-internet.fr), May 30 2005
a(15) computed by Michael Quist, and communicated by Christian Boyer (cboyer(AT)club-internet.fr), Feb 06 2009

A090037 Number of tetramagic (4-multimagic) series for squares of order n.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 555, 0, 0, 235275
Offset: 1

Views

Author

Eric W. Weisstein, Nov 19 2003

Keywords

Crossrefs

Extensions

One more term from Christian Boyer (cboyer(AT)club-internet.fr), Nov 05 2004
One further term from Christian Boyer (cboyer(AT)club-internet.fr), May 30 2005
a(15)=0 proved by Robert Gerbitz and communicated by Christian Boyer (cboyer(AT)club-internet.fr), Apr 02 2007
a(16) computed by Michael Quist, and communicated by Christian Boyer (cboyer(AT)club-internet.fr), Feb 06 2009

A007785 Number of sets of positive integers <= n^2 whose sum is (n^3 + n)/2.

Original entry on oeis.org

1, 1, 2, 17, 306, 10828, 654857, 63019177, 9183937890, 1953896126383, 589909767142505, 247074213707554144, 140902072248206260266, 107704589610917073318533, 108877374411946899963718973, 143864444783939220165210185294, 245934054410000090878614435736720
Offset: 0

Views

Author

Hidetoshi MINO [ mino(AT)hep.esb.yamanashi.ac.jp, mino(AT)mino.scri.fsu.edu ]

Keywords

Examples

			a(2) = 2: {1,4}, {2,3}.
a(3) = 17: {6,9}, {7,8}, {1,5,9}, {1,6,8}, {2,4,9}, {2,5,8}, {2,6,7}, {3,4,8}, {3,5,7}, {4,5,6}, {1,2,3,9}, {1,2,4,8}, {1,2,5,7}, {1,3,4,7}, {1,3,5,6}, {2,3,4,6}, {1,2,3,4,5}.
		

Crossrefs

Cf. A052456.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i*(i+1)/2n, 0, b(n-i, min(n-i, i-1)))))
        end:
    a:= n-> (s-> b(n*(1+s)/2, s))(n^2):
    seq(a(n), n=0..16);  # Alois P. Heinz, Nov 02 2018
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i*(i + 1)/2 < n, 0, b[n, i - 1] + If[i > n, 0, b[n - i, Min[n - i, i - 1]]]]];
    a[n_] := With[{s = n^2}, b[n*(1 + s)/2, s]];
    Table[a[n], {n, 0, 16}] (* Jean-François Alcover, May 20 2022, after Alois P. Heinz *)

Extensions

Corrected and extended by David W. Wilson
a(12) corrected and more terms from Sean A. Irvine, Jan 27 2018
a(0)=1 prepended by Alois P. Heinz, Nov 02 2018

A100568 Number of compositions of n(n^2+1)/2 into n distinct parts each no more than n^2.

Original entry on oeis.org

1, 1, 4, 48, 2064, 167280, 23136480, 4824953280, 1417422988800, 557894688341760, 283527366696806400, 180770613278509900800, 141310830114906688051200, 132919668653581764822067200, 148111929489204170921816985600, 192952383265326280925512415232000
Offset: 0

Views

Author

Henry Bottomley, Nov 28 2004

Keywords

Comments

In an n X n magic square, each row and column is a composition of type described.

Examples

			a(2)=4 since 5 can be written 1+4, 2+3, 3+2 or 4+1.
		

Crossrefs

Programs

  • Maple
    b := proc(n, i, t) option remember;
    `if`(nt*(2*i-t+1)/2, 0,
    `if`(n=0, 1, b(n, i-1, t) + `if`(n `if`(n=0, 1, n!*b(n*(n^2+1)/2, n^2, n)): seq(a(n), n=0..12); # Peter Luschny, May 06 2014, after Alois P. Heinz
  • Mathematica
    RecursionLimit = 1000; b[n_, i_, t_] /; i < t || n < t*((t+1)/2) || n > t*((2*i-t+1)/2) = 0; b[0, , ] = 1; b[n_, i_, t_] :=  b[n, i, t] = b[n, i-1, t] + If[n < i, 0, b[n-i, i-1, t-1]]; a[, 0] = 1; a[0, ] = 0; a[n_, k_] :=  With[{s = k*(k*n+1)}, If[Mod[s, 2] == 1, 0, b[s/2, k*n, k]]]; a[n_] := a[n] = a[n, n]*n!; Table[Print[a[n]];  a[n], {n, 0,   14}] (* Jean-François Alcover, Aug 15 2013, after Alois P. Heinz *)

Formula

a(n) = A000142(n)*A052456(n). a(n) is close to n^(2n-5/2)*sqrt(6/(pi*e)) in the sense that the ratio between the two tends to 1 as n increases. Experimentally, something like n^(2n) * sqrt(6 / (pi * e * (n^5 - 1.366...n^4 + 1.146...n^3 - 0.826...n^2 + 0.413...n + 0.115...))) seems to be even closer.

A106646 Number of pentamagic (5-multimagic) series for squares of order n.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 0, 0, 13
Offset: 1

Views

Author

Christian Boyer (cboyer(AT)club-internet.fr), May 30 2005

Keywords

Crossrefs

Extensions

a(15)=0 proved by Robert Gerbitz and communicated by Christian Boyer (cboyer(AT)club-internet.fr), Apr 02 2007
a(16) computed by Michael Quist, and communicated by Christian Boyer (cboyer(AT)club-internet.fr), Feb 06 2009

A321230 Number of set partitions of [n^2] into n n-element subsets having the same sum.

Original entry on oeis.org

1, 1, 1, 2, 392, 3245664, 6534071578530
Offset: 0

Views

Author

Alois P. Heinz, Oct 31 2018

Keywords

Examples

			a(0) = 1: empty.
a(1) = 1: 1.
a(2) = 1: 14|23.
a(3) = 2: 168|249|357, 159|267|348.
		

Crossrefs

Main diagonal of A203986.

Formula

a(n) = A203986(n,n).
Showing 1-9 of 9 results.