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.

Previous Showing 11-20 of 30 results. Next

A365921 Triangle read by rows where T(n,k) is the number of integer partitions y of n such that k is the greatest member of {0..n} that is not the sum of any nonempty submultiset of y.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 0, 1, 0, 2, 0, 1, 2, 0, 4, 0, 0, 1, 2, 0, 5, 0, 0, 1, 1, 4, 0, 8, 0, 0, 0, 1, 2, 4, 0, 10, 0, 0, 0, 2, 1, 2, 7, 0, 16, 0, 0, 0, 0, 2, 1, 3, 8, 0, 20, 0, 0, 0, 0, 2, 2, 2, 4, 12, 0, 31, 0, 0, 0, 0, 0, 2, 2, 2, 5, 14, 0
Offset: 0

Views

Author

Gus Wiseman, Sep 30 2023

Keywords

Examples

			The partition (6,2,1,1) has subset-sums 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 so is counted under T(10,5).
Triangle begins:
   1
   1  0
   1  1  0
   2  0  1  0
   2  0  1  2  0
   4  0  0  1  2  0
   5  0  0  1  1  4  0
   8  0  0  0  1  2  4  0
  10  0  0  0  2  1  2  7  0
  16  0  0  0  0  2  1  3  8  0
  20  0  0  0  0  2  2  2  4 12  0
  31  0  0  0  0  0  2  2  2  5 14  0
  39  0  0  0  0  0  4  2  2  3  6 21  0
  55  0  0  0  0  0  0  4  2  4  3  9 24  0
  71  0  0  0  0  0  0  5  4  2  4  5 10 34  0
Row n = 8 counts the following partitions:
  (4211)      .  .  .  (521)   (611)  (71)   (8)     .
  (41111)              (5111)         (431)  (62)
  (3311)                                     (53)
  (3221)                                     (44)
  (32111)                                    (422)
  (311111)                                   (332)
  (22211)                                    (2222)
  (221111)
  (2111111)
  (11111111)
		

Crossrefs

Row sums are A000041.
Diagonal k = n-1 is A002865.
Column k = 1 is A126796 (complete partitions), ranks A325781.
Central diagonal n = 2k is A126796 also.
For parts instead of sums we have A339737, rank stat A339662, min A257993.
This is the triangle for the rank statistic A365920.
Latter row sums are A365924 (incomplete partitions), ranks A365830.
Column sums are A366127.
A055932 lists numbers whose prime indices cover an initial interval.
A056239 adds up prime indices, row sums of A112798.
A073491 lists numbers with gap-free prime indices.
A238709/A238710 count partitions by least/greatest difference.
A342050/A342051 have prime indices with odd/even least gap.
A366128 gives the least non-subset-sum of prime indices.

Programs

  • Mathematica
    nmz[y_]:=Complement[Range[Total[y]],Total/@Subsets[y]];
    Table[Length[Select[IntegerPartitions[n],Max@@Prepend[nmz[#],0]==k&]],{n,0,10},{k,0,n}]

A343347 Number of strict integer partitions of n with a part divisible by all the others.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 6, 5, 4, 6, 6, 6, 8, 7, 7, 10, 9, 9, 12, 10, 8, 11, 11, 10, 14, 13, 11, 13, 12, 15, 20, 17, 15, 19, 19, 19, 22, 18, 17, 23, 22, 22, 28, 25, 24, 31, 28, 26, 32, 32, 30, 34, 32, 29, 37, 33, 27, 36, 33, 34, 44, 38, 36, 45, 45
Offset: 0

Views

Author

Gus Wiseman, Apr 16 2021

Keywords

Comments

Alternative name: Number of strict integer partitions of n that are empty or have greatest part divisible by all the others.

Examples

			The a(1) = 1 through a(15) = 6 partitions (A..F = 10..15):
  1  2  3   4   5   6   7    8   9    A    B    C     D    E    F
        21  31  41  42  61   62  63   82   A1   84    C1   C2   A5
                    51  421  71  81   91   632  93    841  D1   C3
                                 621  631  821  A2    931  842  E1
                                                B1    A21       C21
                                                6321            8421
		

Crossrefs

The dual version is A097986 (non-strict: A083710).
The non-strict version is A130689 (Heinz numbers: complement of A343337).
The strict complement is counted by A343377.
The case with smallest part divisible by all the others is A343378.
The case with smallest part not divisible by all the others is A343380.
A000005 counts divisors.
A000009 counts strict partitions.
A000070 counts partitions with a selected part.
A015723 counts strict partitions with a selected part.
A018818 counts partitions into divisors (strict: A033630).
A167865 counts strict chains of divisors > 1 summing to n.
A339564 counts factorizations with a selected factor.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],#=={}||UnsameQ@@#&&And@@IntegerQ/@(Max@@#/#)&]],{n,0,30}]
  • PARI
    seq(n)={Vec(1 + sum(m=1, n, my(u=divisors(m)); x^m*prod(i=1, #u-1, 1 + x^u[i] + O(x^(n-m+1)))))} \\ Andrew Howroyd, Apr 17 2021

Formula

G.f.: 1 + Sum_{k>0} (x^k/(1 + x^k))*Product_{d|k} (1 + x^d). - Andrew Howroyd, Apr 17 2021

A057562 Number of partitions of n into parts all relatively prime to n.

Original entry on oeis.org

1, 1, 2, 2, 6, 2, 14, 6, 16, 7, 55, 6, 100, 17, 44, 32, 296, 14, 489, 35, 178, 77, 1254, 30, 1156, 147, 731, 142, 4564, 25, 6841, 390, 1668, 474, 4780, 114, 21636, 810, 4362, 432, 44582, 103, 63260, 1357, 4186, 2200, 124753, 364, 105604, 1232, 24482, 3583
Offset: 1

Views

Author

Leroy Quet, Oct 03 2000

Keywords

Comments

p is prime iff a(p) = A000041(p)-1. - Lior Manor, Feb 04 2005

Examples

			The unrestricted partitions of 4 are 1+1+1+1, 1+1+2, 1+3, 2+2 and 4. Of these, only 1+1+1+1 and 1+3 contain parts which are all relatively prime to 4. So a(4) = 2.
		

Crossrefs

See also A098743 (parts don't divide n).

Programs

  • Haskell
    a057562 n = p (a038566_row n) n where
       p _          0 = 1
       p []         _ = 0
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Jul 05 2013
  • Mathematica
    Table[Count[IntegerPartitions@ n, k_ /; AllTrue[k, CoprimeQ[#, n] &]], {n, 52}] (* Michael De Vlieger, Aug 01 2017 *)
  • PARI
    R(n, v)=if(#v<2 || n=0, sum(i=1, #v, R(n-v[i], v[1..i])))
    a(n)=if(isprime(n), return(numbpart(n)-1)); R(n, select(k->gcd(k, n)==1, vector(n, i, i))) \\ Charles R Greathouse IV, Sep 13 2012
    
  • PARI
    a(n)=polcoeff(1/prod(k=1,n,if(gcd(k,n)==1,1-x^k,1), O(x^(n+1))+1), n) \\ Charles R Greathouse IV, Sep 13 2012
    

Formula

Coefficient of x^n in expansion of 1/Product_{d : gcd(d, n)=1} (1-x^d). - Vladeta Jovovic, Dec 23 2004

Extensions

More terms from Naohiro Nomoto, Feb 28 2002
Corrected by Vladeta Jovovic, Dec 23 2004

A339662 Greatest gap in the partition with Heinz number n.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 0, 1, 2, 4, 0, 5, 3, 1, 0, 6, 0, 7, 2, 3, 4, 8, 0, 2, 5, 1, 3, 9, 0, 10, 0, 4, 6, 2, 0, 11, 7, 5, 2, 12, 3, 13, 4, 1, 8, 14, 0, 3, 2, 6, 5, 15, 0, 4, 3, 7, 9, 16, 0, 17, 10, 3, 0, 5, 4, 18, 6, 8, 2, 19, 0, 20, 11, 1, 7, 3, 5, 21, 2, 1, 12
Offset: 1

Views

Author

Gus Wiseman, Apr 20 2021

Keywords

Comments

We define the greatest gap of a partition to be the greatest nonnegative integer less than the greatest part and not in the partition.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
Also the index of the greatest prime, up to the greatest prime index of n, not dividing n. A prime index of n is a number m such that prime(m) divides n.

Crossrefs

Positions of first appearances are A000040.
Positions of 0's are A055932.
The version for positions of 1's in reversed binary expansion is A063250.
The prime itself (not just the index) is A079068.
The version for crank is A257989.
The minimal instead of maximal version is A257993.
The version for greatest difference is A286469 or A286470.
Positive integers by Heinz weight and image are counted by A339737.
Positions of 1's are A339886.
A000070 counts partitions with a selected part.
A006128 counts partitions with a selected position.
A015723 counts strict partitions with a selected part.
A056239 adds up prime indices, row sums of A112798.
A073491 lists numbers with gap-free prime indices.
A238709/A238710 count partitions by least/greatest difference.
A342050/A342051 have prime indices with odd/even least gap.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    maxgap[q_]:=Max@@Complement[Range[0,If[q=={},0,Max[q]]],q];
    Table[maxgap[primeMS[n]],{n,100}]

Formula

a(n) = A000720(A079068(n)).

A343345 Number of integer partitions of n that are empty, or have smallest part dividing all the others, but do not have greatest part divisible by all the others.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 1, 1, 4, 6, 11, 16, 29, 36, 59, 79, 115, 149, 216, 270, 379, 473, 634, 793, 1063, 1292, 1689, 2079, 2667, 3241, 4142, 4982, 6291, 7582, 9434, 11321, 14049, 16709, 20545, 24490, 29860, 35380, 43004, 50741, 61282, 72284, 86680, 101906, 121990
Offset: 0

Views

Author

Gus Wiseman, Apr 15 2021

Keywords

Comments

First differs from A343346 at a(14) = 79, A343346(14) = 80.
Alternative name: Number of integer partitions of n with a part dividing all the others, but with no part divisible by all the others.

Examples

			The a(6) = 1 through a(11) = 16 partitions:
  (321)  (3211)  (431)    (531)     (541)      (641)
                 (521)    (3321)    (721)      (731)
                 (3221)   (4311)    (4321)     (4331)
                 (32111)  (5211)    (5221)     (5321)
                          (32211)   (5311)     (5411)
                          (321111)  (32221)    (7211)
                                    (33211)    (33221)
                                    (43111)    (43211)
                                    (52111)    (52211)
                                    (322111)   (53111)
                                    (3211111)  (322211)
                                               (332111)
                                               (431111)
                                               (521111)
                                               (3221111)
                                               (32111111)
		

Crossrefs

The first condition alone gives A083710.
The half-opposite versions are A130714 and A343342.
The Heinz numbers of these partitions are 1 and A343340.
The second condition alone gives A343341.
The opposite version is A343344.
The strict case is A343381.
A000009 counts strict partitions.
A000041 counts partitions.
A000070 counts partitions with a selected part.
A006128 counts partitions with a selected position.
A015723 counts strict partitions with a selected part.
A018818 counts partitions into divisors (strict: A033630).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],#=={}||And@@IntegerQ/@(#/Min@@#)&&!And@@IntegerQ/@(Max@@#/#)&]],{n,0,30}]

A365920 Greatest non-subset-sum of the prime indices of n, or 0 if there is none.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 0, 3, 2, 4, 0, 5, 3, 4, 0, 6, 0, 7, 0, 5, 4, 8, 0, 5, 5, 5, 3, 9, 0, 10, 0, 6, 6, 6, 0, 11, 7, 7, 0, 12, 0, 13, 4, 6, 8, 14, 0, 7, 5, 8, 5, 15, 0, 7, 0, 9, 9, 16, 0, 17, 10, 7, 0, 8, 4, 18, 6, 10, 6, 19, 0, 20, 11, 7, 7, 8, 5, 21, 0, 7, 12
Offset: 1

Views

Author

Gus Wiseman, Sep 30 2023

Keywords

Comments

This is the greatest element of {0,...,A056239(n)} that is not equal to A056239(d) for any divisor d|n, d>1. This definition is analogous to the Frobenius number of a numerical semigroup (see link), but it looks only at submultisets of a finite multiset, not all multisets of elements of a set.
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.

Examples

			The prime indices of 156 are {1,1,2,6}, with subset-sums 0, 1, 2, 3, 4, 6, 7, 8, 9, 10, so a(156) = 5.
		

Crossrefs

For binary indices instead of sums we have A063250.
Positions of first appearances > 2 are A065091.
Zeros are A325781, nonzeros A325798.
For prime indices instead of sums we have A339662, minimum A257993.
For least instead of greatest non-subset-sum we have A366128.
A055932 lists numbers whose prime indices cover an initial interval.
A056239 adds up prime indices, row sums of A112798.
A073491 lists numbers with gap-free prime indices.
A238709/A238710 count partitions by least/greatest difference.
A342050/A342051 have prime indices with odd/even least gap.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    nmz[y_]:=Complement[Range[Total[y]],Total/@Subsets[y]];
    Table[Max@@Prepend[nmz[prix[n]],0],{n,100}]

A339737 Triangle read by rows where T(n,k) is the number of integer partitions of n with greatest gap k.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 0, 1, 0, 2, 1, 1, 1, 0, 3, 1, 1, 1, 1, 0, 4, 1, 2, 2, 1, 1, 0, 5, 1, 3, 2, 2, 1, 1, 0, 6, 2, 3, 4, 3, 2, 1, 1, 0, 8, 2, 4, 5, 4, 3, 2, 1, 1, 0, 10, 2, 5, 7, 6, 5, 3, 2, 1, 1, 0, 12, 3, 6, 8, 9, 6, 5, 3, 2, 1, 1, 0, 15, 3, 8, 11, 11, 10, 7, 5, 3, 2, 1, 1, 0
Offset: 0

Views

Author

Gus Wiseman, Apr 20 2021

Keywords

Comments

We define the greatest gap of a partition to be the greatest nonnegative integer less than the greatest part and not in the partition.

Examples

			Triangle begins:
   1
   1   0
   1   1   0
   2   0   1   0
   2   1   1   1   0
   3   1   1   1   1   0
   4   1   2   2   1   1   0
   5   1   3   2   2   1   1   0
   6   2   3   4   3   2   1   1   0
   8   2   4   5   4   3   2   1   1   0
  10   2   5   7   6   5   3   2   1   1   0
  12   3   6   8   9   6   5   3   2   1   1   0
  15   3   8  11  11  10   7   5   3   2   1   1   0
  18   4   9  13  15  13  10   7   5   3   2   1   1   0
  22   5  10  17  19  18  14  11   7   5   3   2   1   1   0
  27   5  13  20  24  23  20  14  11   7   5   3   2   1   1   0
For example, row n = 9 counts the following partitions:
  (3321)       (432)   (333)      (54)      (522)    (63)    (72)   (81)  (9)
  (22221)      (3222)  (4311)     (441)     (531)    (621)   (711)
  (32211)              (33111)    (4221)    (5211)   (6111)
  (222111)             (3111111)  (42111)   (51111)
  (321111)                        (411111)
  (2211111)
  (21111111)
  (111111111)
		

Crossrefs

Column k = 0 is A000009.
Row sums are A000041.
Central diagonal is A000041.
Column k = 1 is A087897.
The version for least gap is A264401, with Heinz number encoding A257993.
The version for greatest difference is A286469 or A286470.
An encoding (of greatest gap) using Heinz numbers is A339662.
A000070 counts partitions with a selected part.
A006128 counts partitions with a selected position.
A015723 counts strict partitions with a selected part.
A048004 counts compositions by greatest part.
A056239 adds up prime indices, row sums of A112798.
A064391 is the version for crank.
A064428 counts partitions of nonnegative crank.
A073491 list numbers with gap-free prime indices.
A107428 counts gap-free compositions.
A238709/A238710 counts partitions by least/greatest difference.
A342050/A342051 have prime indices with odd/even least gap.

Programs

  • Mathematica
    maxgap[q_]:=Max@@Complement[Range[0,If[q=={},0,Max[q]]],q];
    Table[Length[Select[IntegerPartitions[n],maxgap[#]==k&]],{n,0,15},{k,0,n}]
  • PARI
    S(n,k)={if(k>n, O(x*x^n), x^k*(S(n-k,k+1) + 1)/(1 - x^k))}
    ColGf(k,n) = {(k==0) + S(n,k+1)/prod(j=1, k-1, 1 - x^j + O(x^max(1,n-k)))}
    A(n,m=n)={Mat(vector(m+1, k, Col(ColGf(k-1,n), -(n+1))))}
    { my(M=A(10)); for(i=1, #M, print(M[i,1..i])) } \\ Andrew Howroyd, Jan 13 2024

Extensions

Offset corrected by Andrew Howroyd, Jan 13 2024

A300702 Number of compositions (ordered partitions) of n into parts that do not divide n.

Original entry on oeis.org

1, 0, 0, 0, 0, 2, 0, 7, 2, 7, 7, 54, 2, 143, 33, 47, 30, 986, 23, 2583, 58, 1018, 828, 17710, 32, 23866, 3917, 14586, 1368, 317810, 248, 832039, 5902, 188953, 85038, 1505979, 602, 14930351, 393663, 2350986, 13524, 102334154, 16401, 267914295, 431711, 4438212, 8400611, 1836311902
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 11 2018

Keywords

Examples

			a(7) = 7 because we have [5, 2], [4, 3], [3, 4], [3, 2, 2], [2, 5], [2, 3, 2] and [2, 2, 3].
		

Crossrefs

Programs

  • Maple
    a:= proc(m) option remember; local b; b:= proc(n)
          option remember; `if`(n=0, 1, add(`if`(
          irem(m, j)=0, 0, b(n-j)), j=2..n)) end; b(m)
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 11 2018
  • Mathematica
    Table[SeriesCoefficient[1/(1 - Sum[Boole[Mod[n, k] != 0] x^k, {k, 1, n}]), {x, 0, n}], {n, 0, 47}]

A260797 Number of partitions of n! into aliquant parts (i.e., parts that do not divide n!).

Original entry on oeis.org

0, 0, 0, 10, 48474, 58200700681501904, 575117027557118268946825316636815769400417697019505807
Offset: 1

Views

Author

Marc LeBrun and N. J. A. Sloane, Aug 07 2015

Keywords

Crossrefs

This is A098743(n!). Cf. A260798.

Programs

Extensions

a(6) and a(7) by Reinhard Zumkeller, Aug 08 2015

A260798 Number of partitions of p=prime(n) into aliquant parts (i.e., parts that do not divide p, meaning any part except 1 and p).

Original entry on oeis.org

0, 0, 1, 3, 13, 23, 65, 104, 252, 846, 1237, 3659, 7244, 10086, 19195, 48341, 116599, 155037, 356168, 609236, 792905, 1716485, 2832213, 5887815, 15116625, 23911833, 29983570, 46873052, 58443395, 90374471, 394641602, 593224103, 1082063335, 1318608063, 3477935702, 4207389268, 7398721009, 12885091292, 18555597522, 31831360281, 54145147464, 64517020844
Offset: 1

Views

Author

Marc LeBrun and N. J. A. Sloane, Aug 07 2015

Keywords

Examples

			For n=4, the fourth prime is 7, and we see the three partitions 7=2+5=2+2+3=3+4, so a(4)=3.
		

Crossrefs

This is A098743(prime(n)). Cf. A260797.

Programs

  • Haskell
    import Data.MemoCombinators (memo2, integral)
    a260798 n = a260798_list !! (n-1)
    a260798_list = map (subtract 1 . pMemo 2) a000040_list where
       pMemo = memo2 integral integral p
       p _ 0 = 1
       p k m | m < k     = 0
             | otherwise = pMemo k (m - k) + pMemo (k + 1) m
    -- Reinhard Zumkeller, Aug 09 2015
  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=2, 1-irem(n, 2),
          `if`(i<2, 0, b(n, i-1)+b(n-i, min(i, n-i))))
        end:
    a:= n-> (p-> b(p, p-1))(ithprime(n)):
    seq(a(n), n=1..45);  # Alois P. Heinz, Mar 11 2018
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0 || i == 2, 1 - Mod[n, 2], If[i < 2, 0, b[n, i - 1] + b[n - i, Min[i, n - i]]]];
    a[n_] := b[#, # - 1]&[Prime[n]];
    Table[a[n], {n, 1, 45}] (* Jean-François Alcover, May 20 2018, after Alois P. Heinz *)
Previous Showing 11-20 of 30 results. Next