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

A167934 a(n) = A000041(n) - A032741(n).

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 8, 14, 19, 28, 39, 55, 72, 100, 132, 173, 227, 296, 380, 489, 622, 789, 999, 1254, 1568, 1956, 2433, 3007, 3713, 4564, 5597, 6841, 8344, 10140, 12307, 14880, 17969, 21636, 26012, 31182, 37331, 44582, 53167, 63260, 75170
Offset: 0

Views

Author

Omar E. Pol, Nov 16 2009

Keywords

Comments

a(n) is also the number of partitions of n whose parts are not all equal, (including however the partition with a single part of size n). Note that the number of partitions of n whose parts are all equal gives the number of divisors of n, for n>0. (See also A144300.)

Examples

			The partitions of n = 6 are:
6 ....................... All parts are equal, but included .. (1).
5 + 1 ................... All parts are not equal ............ (2).
4 + 2 ................... All parts are not equal ............ (3).
4 + 1 + 1 ............... All parts are not equal ............ (4).
3 + 3 ................... All parts are equal, not included.
3 + 2 + 1 ............... All parts are not equal ............ (5).
3 + 1 + 1 + 1 ........... All parts are not equal ............ (6).
2 + 2 + 2 ............... All parts are equal, not included.
2 + 2 + 1 + 1 ........... All parts are not equal ............ (7).
2 + 1 + 1 + 1 + 1 ....... All parts are not equal ............ (8).
1 + 1 + 1 + 1 + 1 + 1 ... All parts are equal, not included.
Then a(6) = 8.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, k) option remember;
          if n<0 then 0
        elif n=0 then `if`(k=0, 1, 0)
        elif i=0 then 0
        else b(n, i-1, k)+
             b(n-i, i, `if`(k<0, i, `if`(k<>i, 0, k)))
          fi
        end:
    a:= n-> 1 +b(n, n-1, -1):
    seq(a(n), n=0..50);  #  Alois P. Heinz, Dec 01 2010
  • Mathematica
    a[0] = 1; a[n_] := PartitionsP[n] - DivisorSigma[0, n] + 1; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jan 08 2016 *)

Formula

a(n) = A000041(n) - A032741(n).

Extensions

More terms from Alois P. Heinz, Dec 01 2010

A195364 Number of partitions of n plus number of divisors of n.

Original entry on oeis.org

2, 4, 5, 8, 9, 15, 17, 26, 33, 46, 58, 83, 103, 139, 180, 236, 299, 391, 492, 633, 796, 1006, 1257, 1583, 1961, 2440, 3014, 3724, 4567, 5612, 6844, 8355, 10147, 12314, 14887, 17986, 21639, 26019, 31189, 37346, 44585, 53182, 63263, 75181, 89140, 105562, 124756
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[PartitionsP[n]+DivisorSigma[0,n],{n,50}] (* Harvey P. Dale, Feb 16 2025 *)
  • PARI
    al(n)=vector(n,k,numbpart(k)+numdiv(k))

Formula

a(n) = p(n) + d(n) = A000041(n) + A000005(n).

A338330 Numbers that are neither a power of a prime (A000961) nor is their set of distinct prime indices pairwise coprime.

Original entry on oeis.org

21, 39, 42, 57, 63, 65, 78, 84, 87, 91, 105, 111, 114, 115, 117, 126, 129, 130, 133, 147, 156, 159, 168, 171, 174, 182, 183, 185, 189, 195, 203, 210, 213, 222, 228, 230, 231, 234, 235, 237, 247, 252, 258, 259, 260, 261, 266, 267, 273, 285, 294, 299, 301
Offset: 1

Views

Author

Gus Wiseman, Nov 12 2020

Keywords

Comments

Also Heinz numbers of partitions that are neither constant (A144300) nor have pairwise coprime distinct parts (A304709), hence the formula. The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), giving a bijective correspondence between positive integers and integer partitions.

Examples

			The sequence of terms together with their prime indices begins:
     21: {2,4}        126: {1,2,2,4}      203: {4,10}
     39: {2,6}        129: {2,14}         210: {1,2,3,4}
     42: {1,2,4}      130: {1,3,6}        213: {2,20}
     57: {2,8}        133: {4,8}          222: {1,2,12}
     63: {2,2,4}      147: {2,4,4}        228: {1,1,2,8}
     65: {3,6}        156: {1,1,2,6}      230: {1,3,9}
     78: {1,2,6}      159: {2,16}         231: {2,4,5}
     84: {1,1,2,4}    168: {1,1,1,2,4}    234: {1,2,2,6}
     87: {2,10}       171: {2,2,8}        235: {3,15}
     91: {4,6}        174: {1,2,10}       237: {2,22}
    105: {2,3,4}      182: {1,4,6}        247: {6,8}
    111: {2,12}       183: {2,18}         252: {1,1,2,2,4}
    114: {1,2,8}      185: {3,12}         258: {1,2,14}
    115: {3,9}        189: {2,2,2,4}      259: {4,12}
    117: {2,2,6}      195: {2,3,6}        260: {1,1,3,6}
		

Crossrefs

A338331 is the complement.
A304713 is the complement of the version for divisibility.

Programs

  • Mathematica
    Select[Range[2,100],!PrimePowerQ[#]&&!CoprimeQ@@Union[PrimePi/@First/@FactorInteger[#]]&]

Formula

Equals A024619 \ A304711.

A352493 Number of non-constant integer partitions of n into prime parts with prime multiplicities.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 3, 0, 1, 4, 5, 3, 1, 3, 5, 7, 3, 5, 6, 8, 8, 11, 7, 6, 8, 15, 14, 14, 10, 15, 17, 21, 18, 23, 20, 28, 25, 31, 27, 35, 32, 33, 37, 46, 41, 50, 45, 58, 56, 63, 59, 78, 69, 76, 81, 85, 80, 103, 107, 111, 114, 127
Offset: 0

Views

Author

Gus Wiseman, Mar 24 2022

Keywords

Examples

			The a(n) partitions for selected n (B = 11):
n = 10    16       19        20         25          28
   ---------------------------------------------------------------
    3322  5533     55333     7733       77722       BB33
          55222    55522     77222      5533333     BB222
          3322222  3333322   553322     5553322     775522
                   33322222  5522222    55333222    55533322
                             332222222  55522222    772222222
                                        333333322   3322222222222
                                        3333322222
		

Crossrefs

Constant partitions are counted by A001221, ranked by A000961.
Non-constant partitions are counted by A144300, ranked A024619.
The constant version is A230595, ranked by A352519.
This is the non-constant case of A351982, ranked by A346068.
These partitions are ranked by A352518.
A000040 lists the primes.
A000607 counts partitions into primes, ranked by A076610.
A001597 lists perfect powers, complement A007916.
A038499 counts partitions of prime length.
A053810 lists primes to primes.
A055923 counts partitions with prime multiplicities, ranked by A056166.
A257994 counts prime indices that are themselves prime.
A339218 counts powerful partitions into prime parts, ranked by A352492.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], !SameQ@@#&&And@@PrimeQ/@#&& And@@PrimeQ/@Length/@Split[#]&]],{n,0,30}]

A353188 Number of partitions of n that contain at least one composite part.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 3, 4, 8, 12, 19, 27, 41, 56, 80, 109, 150, 199, 268, 350, 461, 596, 771, 984, 1258, 1589, 2007, 2514, 3145, 3905, 4846, 5973, 7356, 9010, 11020, 13418, 16315, 19756, 23890, 28788, 34639, 41548, 49767, 59441, 70899, 84354, 100221, 118803, 140645, 166153, 196035, 230853, 271512
Offset: 0

Views

Author

Omar E. Pol, Jun 22 2022

Keywords

Examples

			For n = 6 the partitions of 6 that contain at least one composite parts are [6], [4, 2] and [4, 1, 1]. There are three of these partitions so a(6) = 3.
		

Crossrefs

Programs

  • PARI
    a(n) = my(nb=0); forpart(p=n, if (#select(x->((x>1) && !isprime(x)), Vec(p)) >=1, nb++);); nb; \\ Michel Marcus, Jun 23 2022

Formula

a(n) = A000041(n) - A034891(n).

A182629 Total number of largest parts in all partitions of n that contain at least two distinct parts.

Original entry on oeis.org

0, 0, 0, 1, 2, 6, 8, 17, 23, 36, 51, 75, 95, 138, 181, 236, 310, 407, 516, 667, 840, 1062, 1344, 1678, 2080, 2589, 3212, 3942, 4851, 5937, 7246, 8824, 10724, 12971, 15705, 18895, 22749, 27296, 32734, 39083, 46668, 55553, 66086, 78389, 92937, 109857, 129850
Offset: 0

Views

Author

Omar E. Pol, Jul 14 2011

Keywords

Comments

a(n) is also the sum of smallest parts of all partitions of n minus the sum of divisors of n, for n >= 1.

Examples

			For n = 6 the partitions of 6 are
6 ....................... all parts are equal.
5 + 1 ................... contains only one largest part.
4 + 2 ................... contains only one largest part.
4 + 1 + 1 ............... contains only one largest part.
3 + 3 ................... all parts are equal.
3 + 2 + 1 ............... contains only one largest part.
3 + 1 + 1 + 1 ........... contains only one largest part.
2 + 2 + 2 ............... all parts are equal.
2 + 2 + 1 + 1 ........... contains two largest parts.
2 + 1 + 1 + 1 + 1 ....... contains only one largest part.
1 + 1 + 1 + 1 + 1 + 1 ... all parts are equal.
There are 8 largest parts, so a(6) = 8.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=i, n, 0)+
          `if`(i<1, 0, b(n, i-1) +`if`(n b(n, n) -numtheory[sigma](n):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jan 17 2013
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == i, n, 0] + If[i < 1, 0, b[n, i - 1] + If[n < i, 0, b[n - i, i]]]; a[n_] := b[n, n] - DivisorSigma[1, n]; a[0] = 0; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 06 2017, after Alois P. Heinz *)

Formula

a(n) = A046746(n) - A000203(n), for n >= 1. - Omar E. Pol, Jul 15 2011

Extensions

More terms a(13)-a(46) from David Scambler, Jul 15 2011

A261555 Triangle read by rows: T(n,k) is number of partitions of n having at least k distinct parts (n >= 1, k >= 1).

Original entry on oeis.org

1, 2, 3, 1, 5, 2, 7, 5, 11, 7, 1, 15, 13, 2, 22, 18, 5, 30, 27, 10, 42, 38, 16, 1, 56, 54, 27, 2, 77, 71, 42, 5, 101, 99, 62, 10, 135, 131, 87, 20, 176, 172, 128, 31, 1, 231, 226, 171, 54, 2, 297, 295, 236, 82, 5, 385, 379, 311, 127, 10, 490, 488, 417, 182, 20
Offset: 1

Views

Author

Michel Marcus, Aug 24 2015

Keywords

Comments

From Omar E. Pol, Sep 14 2016: (Start)
Row n has length A003056(n) hence the first element of column k is in row A000217(k).
Row sums give A000070.
Alternating row sums give A090794.
Column 1 is A000041, n >= 1. (End)
[0, 0] together with column 2 gives A144300. - Omar E. Pol, Sep 17 2016

Examples

			Triangle starts:
1;
2;
3,  1;
5,  2;
7,  5;
11, 7,  1;
15, 13, 2;
22, 18, 5;
30, 27, 10;
42, 38, 16, 1;
56, 54, 27, 2;
77, 71, 42, 5;
...
		

References

  • Jacques Barbot, Essai sur la structuration de l'analyse combinatoire, Paris, Dulac, 1973, Annexe 12A, p. 74.

Crossrefs

Programs

  • Mathematica
    Table[DeleteCases[Map[Count[Map[Length@ Union@ # &, IntegerPartitions@ n], k_ /; k >= #] &, Range@ n], 0], {n, 19}] // Flatten (* Michael De Vlieger, Sep 14 2016 *)

Formula

T(n,k) = Sum_{j>=k} A116608(n,j) assuming A116608(n,j)=0 when j>A003056(n).
T(n,1) - T(n,2) = A000005(n). - Omar E. Pol, Sep 17 2016

Extensions

More terms from Alois P. Heinz, Aug 24 2015

A141667 Number of partitions of n times number of divisors of n.

Original entry on oeis.org

1, 4, 6, 15, 14, 44, 30, 88, 90, 168, 112, 462, 202, 540, 704, 1155, 594, 2310, 980, 3762, 3168, 4008, 2510, 12600, 5874, 9744, 12040, 22308, 9130, 44832, 13684, 50094, 40572, 49240, 59532, 161793, 43274, 104060, 124740, 298704, 89166, 425392, 126522, 451050
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 06 2008

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] = DivisorSigma[0, n]*PartitionsP[n]; Table[f[n], {n, 1, 30}]
  • PARI
    al(n)=vector(n,k,numbpart(k)*numdiv(k))

Formula

a(n) = p(n) * d(n) = A000041(n) * A000005(n).

Extensions

Edited with more terms by Franklin T. Adams-Watters, Sep 16 2011

A167928 Number of partitions of n that do not contain 1 as a part and whose parts are not the same divisor of n.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 1, 3, 4, 6, 9, 13, 16, 23, 31, 38, 51, 65, 83, 104, 132, 162, 207, 252, 313, 381, 475, 571, 703, 846, 1032, 1237, 1502, 1791, 2164, 2570, 3086, 3659, 4375, 5167, 6146, 7244, 8584, 10086, 11909, 13954, 16421, 19195, 22510, 26250, 30696, 35714
Offset: 0

Views

Author

Omar E. Pol, Nov 17 2009

Keywords

Comments

Note that these partitions are located in the head of the last section of the set of partitions of n (see the shell model of partitions, here).

Examples

			The partitions of 6 are:
6 ....................... All parts are the same divisor of n.
5 + 1 ................... Contains 1 as a part.
4 + 2 ................... All parts are not the same divisor of n. <------(1)
4 + 1 + 1 ............... Contains 1 as a part.
3 + 3 ................... All parts are the same divisor of n.
3 + 2 + 1 ............... Contains 1 as a part.
3 + 1 + 1 + 1 ........... Contains 1 as a part.
2 + 2 + 2 ............... All parts are the same divisor of n.
2 + 2 + 1 + 1 ........... Contains 1 as a part.
2 + 1 + 1 + 1 + 1 ....... Contains 1 as a part.
1 + 1 + 1 + 1 + 1 + 1 ... Contains 1 as a part.
Then a(6) = 1.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember;
          `if`(n=0, `if`(t<>1, 1, 0), `if`(i<2, 0,
          add(b(n-i*j, i-1, `if`(j=0, t, max(0, t-1))), j=0..n/i)))
        end:
    a:= n-> b(n, n, 2):
    seq(a(n), n=0..60);  # Alois P. Heinz, May 24 2013
  • Mathematica
    Prepend[Array[ n \[Function] Length@Select[IntegerPartitions[n, All, Range[2, n - 1]], Length[Union[ # ]] > 1 &], 40], 1] (* J. Mulder (jasper.mulder(AT)planet.nl), Jan 25 2010 *)
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[t != 1, 1, 0], If[i < 2, 0, Sum[b[n - i*j, i - 1, If[j == 0, t, Max[0, t - 1]]], {j, 0, n/i}]]]; a[n_] := b[n, n, 2]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Aug 29 2016, after Alois P. Heinz *)

Formula

a(n) = A002865(n) - A032741(n).

Extensions

More terms from J. Mulder (jasper.mulder(AT)planet.nl), Jan 25 2010
More terms from Alois P. Heinz, May 24 2013

A298947 Number of integer partitions y of n such that exactly one permutation of y is a Lyndon word.

Original entry on oeis.org

1, 1, 2, 3, 6, 7, 11, 12, 15, 19, 22, 22, 29, 32, 32, 38, 42, 44, 49, 51, 54, 63, 63, 64, 71, 79, 76, 84, 87, 90, 96, 101, 101, 113, 108, 115, 122, 131, 125, 134, 138, 144, 147, 155, 150, 169, 163, 168, 173, 185, 180, 194, 191, 200, 198, 211, 209, 227, 218, 224, 231, 246
Offset: 1

Views

Author

Gus Wiseman, Jan 30 2018

Keywords

Examples

			The a(6) = 7 partitions are (6), (51), (42), (411), (3111), (2211), (21111). This list does not include (321) because there are two possible permutations that are Lyndon words, namely (123) and (132). The list does not include (33), (222), or (111111) because no permutation of these is a Lyndon word.
		

Crossrefs

Programs

  • Maple
    with(combinat): with(numtheory):
    g:= l-> (n-> `if`(n=0, 1, add(mobius(j)*multinomial(n/j,
            (l/j)[]), j=divisors(igcd(l[])))/n))(add(i, i=l)):
    b:= (n, i, l)-> `if`(n=0 or i=1, `if`(g([l[], n])=1, 1, 0),
                     add(b(n-i*j, i-1, [l[], j]), j=0..n/i)):
    a:= n-> b(n$2, []):
    seq(a(n), n=1..30);  # Alois P. Heinz, Feb 09 2018
  • Mathematica
    LyndonQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And]&&Array[RotateRight[q,#]&,Length[q],1,UnsameQ];
    Table[Length[Select[IntegerPartitions[n],Length[Select[Permutations[#],LyndonQ]]===1&]],{n,20}]
    (* Second program: *)
    multinomial[n_, k_List] := n!/Times @@ (k!);
    g[l_List] := With[{n = Total[l]}, If[n == 0, 1, Sum[MoebiusMu[j]*multinomial[n/j, l/j], {j, Divisors[GCD @@ l]}]/n]];
    b[n_, i_, l_List] := If[n == 0 || i == 1, If[g[Append[l, n]] == 1, 1, 0], Sum[b[n - i*j, i - 1, Append[l, j]], {j, 0, n/i}]];
    a[n_] := b[n, n, {}];
    Array[a, 30] (* Jean-François Alcover, May 20 2021, after Alois P. Heinz *)

Extensions

a(23)-a(62) from Alois P. Heinz, Feb 09 2018
Previous Showing 11-20 of 22 results. Next