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

A067538 Number of partitions of n in which the number of parts divides n.

Original entry on oeis.org

1, 2, 2, 4, 2, 8, 2, 11, 9, 14, 2, 46, 2, 24, 51, 66, 2, 126, 2, 202, 144, 69, 2, 632, 194, 116, 381, 756, 2, 1707, 2, 1417, 956, 316, 2043, 5295, 2, 511, 2293, 9151, 2, 10278, 2, 8409, 14671, 1280, 2, 36901, 8035, 21524, 11614, 25639, 2, 53138, 39810, 85004
Offset: 1

Views

Author

Naohiro Nomoto, Jan 27 2002

Keywords

Comments

Also sum of p(n,d) over the divisors d of n, where p(n,m) is the count of partitions of n in exactly m parts. - Wouter Meeussen, Jun 07 2009
From Gus Wiseman, Sep 24 2019: (Start)
Also the number of integer partitions of n whose maximum part divides n. The Heinz numbers of these partitions are given by A326836. For example, the a(1) = 1 through a(8) = 11 partitions are:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (111) (22) (11111) (33) (1111111) (44)
(211) (222) (422)
(1111) (321) (431)
(2211) (2222)
(3111) (4211)
(21111) (22211)
(111111) (41111)
(221111)
(2111111)
(11111111)
(End)

Examples

			a(3)=2 because 3 is a prime; a(4)=4 because the five partitions of 4 are {4}, {3, 1}, {2, 2}, {2, 1, 1}, {1, 1, 1, 1}, and the number of parts in each of them divides 4 except for {2, 1, 1}.
From _Gus Wiseman_, Sep 24 2019: (Start)
The a(1) = 1 through a(8) = 11 partitions whose length divides their sum are the following. The Heinz numbers of these partitions are given by A316413.
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (11111)  (33)      (1111111)  (44)
                    (31)             (42)                 (53)
                    (1111)           (51)                 (62)
                                     (222)                (71)
                                     (321)                (2222)
                                     (411)                (3221)
                                     (111111)             (3311)
                                                          (4211)
                                                          (5111)
                                                          (11111111)
(End)
		

Crossrefs

The strict case is A102627.
Partitions with integer geometric mean are A067539.

Programs

  • Mathematica
    Do[p = IntegerPartitions[n]; l = Length[p]; c = 0; k = 1; While[k < l + 1, If[ IntegerQ[ n/Length[ p[[k]] ]], c++ ]; k++ ]; Print[c], {n, 1, 57}, All]
    p[n_,k_]:=p[n,k]=p[n-1,k-1]+p[n-k,k];p[n_,k_]:=0/;k>n;p[n_,n_]:=1;p[n_,0]:=0
    Table[Plus @@ (p[n,# ]&/ @ Divisors[n]),{n,36}] (* Wouter Meeussen, Jun 07 2009 *)
    Table[Count[IntegerPartitions[n], q_ /; IntegerQ[Mean[q]]], {n, 50}]  (*Clark Kimberling, Apr 23 2019 *)
  • PARI
    a(n) = {my(nb = 0); forpart(p=n, if ((vecsum(Vec(p)) % #p) == 0, nb++);); nb;} \\ Michel Marcus, Jul 03 2018
    
  • Python
    # uses A008284_T
    from sympy import divisors
    def A067538(n): return sum(A008284_T(n,d) for d in divisors(n,generator=True)) # Chai Wah Wu, Sep 21 2023

Formula

a(p) = 2 for all primes p.

Extensions

Extended by Robert G. Wilson v, Oct 16 2002

A359893 Triangle read by rows where T(n,k) is the number of integer partitions of n with median k, where k ranges from 1 to n in steps of 1/2.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 0, 0, 1, 2, 0, 2, 0, 0, 0, 1, 3, 0, 1, 2, 0, 0, 0, 0, 1, 4, 1, 2, 0, 3, 0, 0, 0, 0, 0, 1, 6, 1, 3, 0, 1, 3, 0, 0, 0, 0, 0, 0, 1, 8, 1, 6, 0, 2, 0, 4, 0, 0, 0, 0, 0, 0, 0, 1, 11, 2, 7, 1, 3, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gus Wiseman, Jan 21 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			Triangle begins:
  1
  1  0  1
  1  1  0  0  1
  2  0  2  0  0  0  1
  3  0  1  2  0  0  0  0  1
  4  1  2  0  3  0  0  0  0  0  1
  6  1  3  0  1  3  0  0  0  0  0  0  1
  8  1  6  0  2  0  4  0  0  0  0  0  0  0  1
 11  2  7  1  3  0  1  4  0  0  0  0  0  0  0  0  1
 15  2 10  3  4  0  2  0  5  0  0  0  0  0  0  0  0  0  1
 20  3 13  3  7  0  3  0  1  5  0  0  0  0  0  0  0  0  0  0  1
 26  4 19  3 11  1  4  0  2  0  6  0  0  0  0  0  0  0  0  0  0  0  1
For example, row n = 8 counts the following partitions:
  611       4211  422    .  332  .  44  .  .  .  .  .  .  .  8
  5111            521       431     53
  32111           2222              62
  41111           3221              71
  221111          3311
  311111          22211
  2111111
  11111111
		

Crossrefs

Row sums are A000041.
Row lengths are 2n-1 = A005408(n-1).
Column k=1 is A027336(n+1).
For mean instead of median we have A058398, see also A008284, A327482.
The mean statistic is ranked by A326567/A326568.
Omitting half-steps gives A359901.
The odd-length case is A359902.
The median statistic is ranked by A360005(n)/2.
First appearances of medians are ranked by A360006, A360007.
A027193 counts odd-length partitions, strict A067659, ranked by A026424.
A067538 counts partitions w/ integer mean, strict A102627, ranked by A316413.
A240219 counts partitions w/ the same mean as median, complement A359894.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Median[#]==k&]],{n,1,10},{k,1,n,1/2}]

A326568 Denominator of the average of the multiset of prime indices of n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 2, 2, 1, 1, 3, 1, 3, 1, 1, 1, 4, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 3, 1, 3, 3, 1, 1, 5, 1, 3, 2, 3, 1, 4, 1, 4, 1, 2, 1, 4, 1, 1, 3, 1, 2, 3, 1, 1, 2, 3, 1, 5, 1, 2, 3, 3, 2, 1, 1, 5, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 2, 1, 2, 6, 1, 1, 1, 1, 1, 3, 1, 4, 1, 2, 1, 5
Offset: 2

Views

Author

Gus Wiseman, Jul 13 2019

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.

Examples

			The prime indices of 12 are {1,1,2}, with average 4/3, so a(12) = 3.
		

Crossrefs

a(n) is a divisor of Omega(n) = A001222(n).
Positions of 1's are A316413.

Programs

  • Mathematica
    Table[Denominator[Sum[q[[2]]*PrimePi[q[[1]]],{q,FactorInteger[n]}]/PrimeOmega[n]],{n,2,100}]
  • PARI
    A326568(n) = { my(f=factor(n)); denominator(sum(i=1,#f~,f[i,2]*primepi(f[i,1]))/bigomega(n)); }; \\ Antti Karttunen, Jan 28 2025

Extensions

Starting offset corrected from 0 to 2 and data section extended to a(108) by Antti Karttunen, Jan 28 2025

A326567 Numerator of the average of the multiset of prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 13 2019

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.

Examples

			The prime indices of 12 are {1,1,2}, with average 4/3, so a(12) = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[Numerator[Sum[q[[2]]*PrimePi[q[[1]]],{q,FactorInteger[n]}]/PrimeOmega[n]],{n,2,100}]

A360005 Two times the median of the multiset of prime indices of n.

Original entry on oeis.org

2, 4, 2, 6, 3, 8, 2, 4, 4, 10, 2, 12, 5, 5, 2, 14, 4, 16, 2, 6, 6, 18, 2, 6, 7, 4, 2, 20, 4, 22, 2, 7, 8, 7, 3, 24, 9, 8, 2, 26, 4, 28, 2, 4, 10, 30, 2, 8, 6, 9, 2, 32, 4, 8, 2, 10, 11, 34, 3, 36, 12, 4, 2, 9, 4, 38, 2, 11, 6, 40, 2, 42, 13, 6, 2, 9, 4, 44, 2
Offset: 2

Views

Author

Gus Wiseman, Jan 23 2023

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 median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The prime indices of 360 are {1,1,1,2,2,3}, with median 3/2, so a(360) = 3.
		

Crossrefs

The triangle for this statistic is A359893, cf. A359901, A359902.
Positions of even terms are A359908, odd A359912.
Positions of first appearances are A360006, sorted A360007.
A112798 lists prime indices, length A001222, sum A056239.
A316413 lists numbers whose prime indices have integer mean.
A325347 = partitions w/ integer median, strict A359907, complement A307683.
A326567/A326568 gives mean of prime indices.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[2*Median[prix[n]],{n,2,100}]

A359901 Triangle read by rows where T(n,k) is the number of integer partitions of n with median k = 1..n.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 2, 2, 0, 1, 3, 1, 0, 0, 1, 4, 2, 3, 0, 0, 1, 6, 3, 1, 0, 0, 0, 1, 8, 6, 2, 4, 0, 0, 0, 1, 11, 7, 3, 1, 0, 0, 0, 0, 1, 15, 10, 4, 2, 5, 0, 0, 0, 0, 1, 20, 13, 7, 3, 1, 0, 0, 0, 0, 0, 1, 26, 19, 11, 4, 2, 6, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gus Wiseman, Jan 21 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			Triangle begins:
   1
   1  1
   1  0  1
   2  2  0  1
   3  1  0  0  1
   4  2  3  0  0  1
   6  3  1  0  0  0  1
   8  6  2  4  0  0  0  1
  11  7  3  1  0  0  0  0  1
  15 10  4  2  5  0  0  0  0  1
  20 13  7  3  1  0  0  0  0  0  1
  26 19 11  4  2  6  0  0  0  0  0  1
  35 24 14  5  3  1  0  0  0  0  0  0  1
  45 34 17  8  4  2  7  0  0  0  0  0  0  1
  58 42 23 12  5  3  1  0  0  0  0  0  0  0  1
For example, row n = 9 counts the following partitions:
  (7,1,1)              (5,2,2)      (3,3,3)  (4,4,1)  .  .  .  .  (9)
  (6,1,1,1)            (6,2,1)      (4,3,2)
  (3,3,1,1,1)          (3,2,2,2)    (5,3,1)
  (4,2,1,1,1)          (4,2,2,1)
  (5,1,1,1,1)          (4,3,1,1)
  (3,2,1,1,1,1)        (2,2,2,2,1)
  (4,1,1,1,1,1)        (3,2,2,1,1)
  (2,2,1,1,1,1,1)
  (3,1,1,1,1,1,1)
  (2,1,1,1,1,1,1,1)
  (1,1,1,1,1,1,1,1,1)
		

Crossrefs

Column k=1 is A027336(n+1).
For mean instead of median we have A058398, see also A008284, A327482.
Row sums are A325347.
The mean statistic is ranked by A326567/A326568.
Including half-steps gives A359893.
The odd-length case is A359902.
The median statistic is ranked by A360005(n)/2.
First appearances of medians are ranked by A360006, A360007.
A000041 counts partitions, strict A000009.
A027193 counts odd-length partitions, strict A067659, ranked by A026424.
A067538 counts partitions w/ integer mean, strict A102627, ranks A316413.
A240219 counts partitions w/ the same mean as median, complement A359894.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Median[#]==k&]],{n,15},{k,n}]

A237984 Number of partitions of n whose mean is a part.

Original entry on oeis.org

1, 2, 2, 3, 2, 5, 2, 6, 5, 8, 2, 21, 2, 14, 22, 30, 2, 61, 2, 86, 67, 45, 2, 283, 66, 80, 197, 340, 2, 766, 2, 663, 543, 234, 703, 2532, 2, 388, 1395, 4029, 2, 4688, 2, 4476, 7032, 1005, 2, 17883, 2434, 9713, 7684, 14472, 2, 25348, 17562, 37829, 16786, 3721
Offset: 1

Views

Author

Clark Kimberling, Feb 27 2014

Keywords

Comments

a(n) = 2 if and only if n is a prime.

Examples

			a(6) counts these partitions:  6, 33, 321, 222, 111111.
From _Gus Wiseman_, Sep 14 2019: (Start)
The a(1) = 1 through a(10) = 8 partitions (A = 10):
  1  2   3    4     5      6       7        8         9          A
     11  111  22    11111  33      1111111  44        333        55
              1111         222              2222      432        22222
                           321              3221      531        32221
                           111111           4211      111111111  33211
                                            11111111             42211
                                                                 52111
                                                                 1111111111
(End)
		

Crossrefs

Cf. A238478.
The Heinz numbers of these partitions are A327473.
A similar sequence for subsets is A065795.
Dominated by A067538.
The strict case is A240850.
Partitions without their mean are A327472.

Programs

  • Mathematica
    Table[Count[IntegerPartitions[n], p_ /; MemberQ[p, Mean[p]]], {n, 40}]
  • Python
    from sympy.utilities.iterables import partitions
    def A237984(n): return sum(1 for s,p in partitions(n,size=True) if not n%s and n//s in p) # Chai Wah Wu, Sep 21 2023

Formula

a(n) = A000041(n) - A327472(n). - Gus Wiseman, Sep 14 2019

A102627 Number of partitions of n into distinct parts in which the number of parts divides n.

Original entry on oeis.org

1, 1, 1, 2, 1, 4, 1, 4, 4, 5, 1, 15, 1, 7, 14, 17, 1, 28, 1, 40, 28, 11, 1, 99, 31, 13, 49, 99, 1, 186, 1, 152, 76, 17, 208, 425, 1, 19, 109, 699, 1, 584, 1, 433, 823, 23, 1, 1625, 437, 1140, 193, 746, 1, 2003, 1748, 2749, 244, 29, 1, 7404, 1, 31, 4158, 3258, 3766, 6307, 1
Offset: 1

Views

Author

Vladeta Jovovic, Feb 01 2005

Keywords

Examples

			From _Gus Wiseman_, Sep 24 2019: (Start)
The a(1) = 1 through a(12) = 15 strict integer partitions whose average is an integer (A = 10, B = 11, C = 12):
  (1)  (2)  (3)  (4)   (5)  (6)    (7)  (8)   (9)    (A)   (B)  (C)
                 (31)       (42)        (53)  (432)  (64)       (75)
                            (51)        (62)  (531)  (73)       (84)
                            (321)       (71)  (621)  (82)       (93)
                                                     (91)       (A2)
                                                                (B1)
                                                                (543)
                                                                (642)
                                                                (651)
                                                                (732)
                                                                (741)
                                                                (831)
                                                                (921)
                                                                (5421)
                                                                (6321)
(End)
		

Crossrefs

The BI-numbers of these partitions are given by A326669 (numbers whose binary indices have integer mean).
The non-strict case is A067538.
Strict partitions with integer geometric mean are A326625.
Strict partitions whose maximum divides their sum are A326850.

Programs

  • Maple
    a:= proc(m) option remember; local b; b:=
          proc(n, i, t) option remember; `if`(i*(i+1)/2Alois P. Heinz, Sep 25 2019
  • Mathematica
    npdp[n_]:=Count[Select[IntegerPartitions[n],Length[#]==Length[ Union[ #]]&], ?(Divisible[n,Length[#]]&)]; Array[npdp,70] (* _Harvey P. Dale, Feb 12 2016 *)
    a[m_] := a[m] = Module[{b}, b[n_, i_, t_] := b[n, i, t] = If[i(i+1)/2 < n, 0, If[n == 0, If[Mod[m, t] == 0, 1, 0], b[n, i - 1, t] + b[n - i, Min[n - i, i - 1], t + 1]]]; If[PrimeQ[m], 1, b[m, m, 0]]];
    Array[a, 100] (* Jean-François Alcover, May 21 2021, after Alois P. Heinz *)

A359908 Numbers whose prime indices have integer median.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 34, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 59, 61, 62, 63, 64, 66, 67, 68, 70, 71, 72, 73, 75, 76, 78, 79, 80, 81, 82, 83
Offset: 1

Views

Author

Gus Wiseman, Jan 23 2023

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 median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The prime indices of 180 are {1,1,2,2,3}, with median 2, so 180 is in the sequence.
The prime indices of 360 are {1,1,1,2,2,3}, with median 3/2, so 360 is not in the sequence.
		

Crossrefs

The odd-length case is A027193.
For mean instead of median we have A316413.
These partitions are counted by A325347, strict A359907.
The complement is A359912, counted by A307683.
The median of prime indices is given by A360005/2.
The case of integer mean also is A360009.
A112798 lists prime indices, length A001222, sum A056239.
A359893 and A359901 count partitions by median, odd-length A359902.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],IntegerQ[Median[prix[#]]]&]

A327473 Heinz numbers of integer partitions whose mean A326567/A326568 is a part.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 30, 31, 32, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 84, 89, 90, 97, 101, 103, 105, 107, 109, 110, 113, 121, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181
Offset: 1

Views

Author

Gus Wiseman, Sep 13 2019

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The sequence of terms together with their prime indices begins:
   2: {1}
   3: {2}
   4: {1,1}
   5: {3}
   7: {4}
   8: {1,1,1}
   9: {2,2}
  11: {5}
  13: {6}
  16: {1,1,1,1}
  17: {7}
  19: {8}
  23: {9}
  25: {3,3}
  27: {2,2,2}
  29: {10}
  30: {1,2,3}
  31: {11}
  32: {1,1,1,1,1}
  37: {12}
		

Crossrefs

A subsequence of A316413.
Complement of A327476.
The enumeration of these partitions by sum is given by A237984.
Subsets whose mean is a part are A065795.
Numbers whose binary indices include their mean are A327478.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],MemberQ[primeMS[#],Mean[primeMS[#]]]&]
Showing 1-10 of 196 results. Next