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

A147767 Triangle read by rows, square of A116598.

Original entry on oeis.org

1, 0, 1, 2, 0, 1, 2, 2, 0, 1, 5, 2, 2, 0, 1, 6, 5, 2, 2, 0, 1, 6, 5, 2, 2, 0, 1, 13, 6, 5, 2, 2, 0, 1, 16, 13, 6, 5, 2, 2, 0, 1, 30, 16, 13, 6, 5, 2, 2, 0, 1, 40, 30, 16, 13, 6, 5, 2, 2, 0, 1, 40, 30, 16, 13, 6, 5, 2, 2, 0, 1
Offset: 0

Views

Author

Gary W. Adamson, Nov 11 2008

Keywords

Comments

Row sums = A000990: (1, 1, 3, 5, 10, 16, 29, 45, ...).

Examples

			First few rows of the triangle:
   1;
   0,  1;
   2,  0, 1;
   2,  2, 0, 1;
   5,  2, 2, 0, 1;
   6,  5, 2, 2, 0, 1;
  13,  6, 5, 2, 2, 0, 1;
  16, 13, 6, 5, 2, 2, 0, 1;
  ...
		

Crossrefs

Formula

Triangle read by rows, A116598^2. A147766 in every column.

Extensions

Typo in formula corrected by Olivier Gérard, Jul 25 2016

A087787 a(n) = Sum_{k=0..n} (-1)^(n-k)*A000041(k).

Original entry on oeis.org

1, 0, 2, 1, 4, 3, 8, 7, 15, 15, 27, 29, 48, 53, 82, 94, 137, 160, 225, 265, 362, 430, 572, 683, 892, 1066, 1370, 1640, 2078, 2487, 3117, 3725, 4624, 5519, 6791, 8092, 9885, 11752, 14263, 16922, 20416, 24167, 29007, 34254, 40921, 48213, 57345, 67409
Offset: 0

Views

Author

Vladeta Jovovic, Oct 07 2003

Keywords

Comments

Essentially first differences of A024786 (see the formula). Also, a(n) is the number of 2's in the last section of the set of partitions of n+2 (see A135010). - Omar E. Pol, Sep 10 2008
From Gus Wiseman, May 20 2024: (Start)
Also the number of integer partitions of n containing an even number of ones, ranked by A003159. The a(0) = 1 through a(8) = 15 partitions are:
() . (2) (3) (4) (5) (6) (7) (8)
(11) (22) (32) (33) (43) (44)
(211) (311) (42) (52) (53)
(1111) (222) (322) (62)
(411) (511) (332)
(2211) (3211) (422)
(21111) (31111) (611)
(111111) (2222)
(3311)
(4211)
(22211)
(41111)
(221111)
(2111111)
(11111111)
Also the number of integer partitions of n + 1 containing an odd number of ones, ranked by A036554.
(End)

Crossrefs

The unsigned version is A000070, strict A036469.
For powers of 2 instead number of partitions we have A001045.
The strict or odd version is A025147 or A096765.
The ordered version (compositions instead of partitions) is A078008.
For powers of 2 instead of -1 we have A259401, cf. A259400.
A002865 counts partitions with no ones, column k=0 of A116598.
A072233 counts partitions by sum and length.

Programs

  • Mathematica
    Table[Sum[(-1)^(n-k)*PartitionsP[k], {k,0,n}], {n,0,50}] (* Vaclav Kotesovec, Aug 16 2015 *)
    (* more efficient program *) sig = 1; su = 1; Flatten[{1, Table[sig = -sig; su = su + sig*PartitionsP[n]; Abs[su], {n, 1, 50}]}] (* Vaclav Kotesovec, Nov 06 2016 *)
    Table[Length[Select[IntegerPartitions[n], EvenQ[Count[#,1]]&]],{n,0,30}] (* Gus Wiseman, May 20 2024 *)
  • Python
    from sympy import npartitions
    def A087787(n): return sum(-npartitions(k) if n-k&1 else npartitions(k) for k in range(n+1)) # Chai Wah Wu, Oct 25 2023

Formula

G.f.: 1/(1+x)*1/Product_{k>0} (1-x^k).
a(n) = 1/n*Sum_{k=1..n} (sigma(k)+(-1)^k)*a(n-k).
a(n) = A024786(n+2)-A024786(n+1). - Omar E. Pol, Sep 10 2008
a(n) ~ exp(Pi*sqrt(2*n/3)) / (8*sqrt(3)*n) * (1 + (11*Pi/(24*sqrt(6)) - sqrt(3/2)/Pi)/sqrt(n) - (11/16 + (23*Pi^2)/6912)/n). - Vaclav Kotesovec, Nov 05 2016
a(n) = A000041(n) - a(n-1). - Jon Maiga, Aug 29 2019
Alternating partial sums of A000041. - Gus Wiseman, May 20 2024

A366842 Number of integer partitions of n whose odd parts have a common divisor > 1.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 1, 4, 1, 8, 3, 13, 6, 21, 10, 36, 15, 53, 28, 80, 41, 122, 63, 174, 97, 250, 140, 359, 201, 496, 299, 685, 410, 949, 575, 1284, 804, 1726, 1093, 2327, 1482, 3076, 2023, 4060, 2684, 5358, 3572, 6970, 4745, 9050, 6221, 11734, 8115, 15060, 10609
Offset: 0

Views

Author

Gus Wiseman, Oct 28 2023

Keywords

Examples

			The a(3) = 1 through a(11) = 13 partitions:
  (3)  .  (5)    (3,3)  (7)      (3,3,2)  (9)        (5,5)      (11)
          (3,2)         (4,3)             (5,4)      (4,3,3)    (6,5)
                        (5,2)             (6,3)      (3,3,2,2)  (7,4)
                        (3,2,2)           (7,2)                 (8,3)
                                          (3,3,3)               (9,2)
                                          (4,3,2)               (4,4,3)
                                          (5,2,2)               (5,4,2)
                                          (3,2,2,2)             (6,3,2)
                                                                (7,2,2)
                                                                (3,3,3,2)
                                                                (4,3,2,2)
                                                                (5,2,2,2)
                                                                (3,2,2,2,2)
		

Crossrefs

This is the odd case of A018783, complement A000837.
The even version is A047967.
The complement is counted by A366850, ranks A366846.
A000041 counts integer partitions, strict A000009.
A000740 counts relatively prime compositions.
A113685 counts partitions by sum of odds, stat A366528, w/o zeros A365067.
A168532 counts partitions by gcd.
A239261 counts partitions with (sum of odd parts) = (sum of even parts).
A289508 gives gcd of prime indices, positions of ones A289509.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], GCD@@Select[#,OddQ]>1&]], {n,0,30}]
  • Python
    from math import gcd
    from sympy.utilities.iterables import partitions
    def A366842(n): return sum(1 for p in partitions(n) if gcd(*(q for q in p if q&1))>1) # Chai Wah Wu, Oct 28 2023

A366843 Number of integer partitions of n into odd, relatively prime parts.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 4, 6, 6, 9, 11, 13, 17, 21, 23, 32, 37, 42, 53, 62, 70, 88, 103, 116, 139, 164, 184, 220, 255, 283, 339, 390, 435, 511, 578, 653, 759, 863, 963, 1107, 1259, 1401, 1609, 1814, 2015, 2303, 2589, 2878, 3259, 3648, 4058, 4580, 5119, 5672, 6364
Offset: 0

Views

Author

Gus Wiseman, Oct 28 2023

Keywords

Examples

			The a(1) = 1 through a(8) = 6 partitions:
  (1)  (11)  (111)  (31)    (311)    (51)      (331)      (53)
                    (1111)  (11111)  (3111)    (511)      (71)
                                     (111111)  (31111)    (3311)
                                               (1111111)  (5111)
                                                          (311111)
                                                          (11111111)
		

Crossrefs

Allowing even parts gives A000837.
The strict case is A366844, with evens A078374.
The complement is counted by A366852, with evens A018783.
The pairwise coprime version is A366853, with evens A051424.
A000041 counts integer partitions, strict A000009 (also into odds).
A000740 counts relatively prime compositions.
A168532 counts partitions by gcd.
A366842 counts partitions whose odd parts have a common divisor > 1.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],#=={}||And@@OddQ/@#&&GCD@@#==1&]],{n,0,30}]
  • Python
    from math import gcd
    from sympy.utilities.iterables import partitions
    def A366843(n): return sum(1 for p in partitions(n) if all(d&1 for d in p) and gcd(*p)==1) # Chai Wah Wu, Oct 30 2023

A366844 Number of strict integer partitions of n into odd relatively prime parts.

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 1, 0, 2, 1, 2, 1, 2, 2, 3, 3, 5, 4, 4, 5, 6, 7, 8, 8, 9, 11, 12, 12, 15, 16, 15, 19, 23, 23, 26, 28, 30, 34, 37, 38, 44, 48, 48, 56, 62, 63, 72, 77, 82, 92, 96, 102, 116, 124, 128, 142, 155, 162, 178, 191, 200, 222, 236, 246, 276, 291, 303, 334
Offset: 0

Views

Author

Gus Wiseman, Oct 29 2023

Keywords

Examples

			The a(n) partitions for n = 1, 8, 14, 17, 16, 20, 21:
  (1)  (5,3)  (9,5)   (9,5,3)   (9,7)      (11,9)      (9,7,5)
       (7,1)  (11,3)  (9,7,1)   (11,5)     (13,7)      (11,7,3)
              (13,1)  (11,5,1)  (13,3)     (17,3)      (11,9,1)
                      (13,3,1)  (15,1)     (19,1)      (13,5,3)
                                (7,5,3,1)  (9,7,3,1)   (13,7,1)
                                           (11,5,3,1)  (15,5,1)
                                                       (17,3,1)
		

Crossrefs

This is the relatively prime case of A000700.
The pairwise coprime version is the odd-part case of A007360.
Allowing even parts gives A078374.
The halved even version is A078374 aerated.
The non-strict version is A366843, with evens A000837.
The complement is counted by the strict case of A366852, with evens A018783.
A000041 counts integer partitions, strict A000009 (also into odds).
A051424 counts pairwise coprime partitions, for odd parts A366853.
A113685 counts partitions by sum of odd parts, rank statistic A366528.
A168532 counts partitions by gcd.
A366842 counts partitions whose odd parts have a common divisor > 1.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], And@@OddQ/@#&&UnsameQ@@#&&GCD@@#==1&]],{n,0,30}]
  • Python
    from math import gcd
    from sympy.utilities.iterables import partitions
    def A366844(n): return sum(1 for p in partitions(n) if all(d==1 for d in p.values()) and all(d&1 for d in p) and gcd(*p)==1) # Chai Wah Wu, Oct 30 2023

Extensions

More terms from Chai Wah Wu, Oct 30 2023

A366845 Number of integer partitions of n that contain at least one even part and whose halved even parts are relatively prime.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 5, 7, 11, 15, 23, 31, 43, 58, 82, 107, 144, 189, 250, 323, 420, 537, 695, 880, 1114, 1404, 1774, 2210, 2759, 3423, 4239, 5223, 6430, 7869, 9640, 11738, 14266, 17297, 20950, 25256, 30423, 36545, 43824, 52421, 62620, 74599, 88802, 105431
Offset: 0

Views

Author

Gus Wiseman, Oct 28 2023

Keywords

Examples

			The partition y = (6,4) has halved even parts (3,2) which are relatively prime, so y is counted under a(10).
The a(2) = 1 through a(9) = 15 partitions:
  (2)  (21)  (22)   (32)    (42)     (52)      (62)       (72)
             (211)  (221)   (222)    (322)     (332)      (432)
                    (2111)  (321)    (421)     (422)      (522)
                            (2211)   (2221)    (521)      (621)
                            (21111)  (3211)    (2222)     (3222)
                                     (22111)   (3221)     (3321)
                                     (211111)  (4211)     (4221)
                                               (22211)    (5211)
                                               (32111)    (22221)
                                               (221111)   (32211)
                                               (2111111)  (42111)
                                                          (222111)
                                                          (321111)
                                                          (2211111)
                                                          (21111111)
		

Crossrefs

For all parts we have A000837, complement A018783.
These partitions have ranks A366847.
For odd parts we have A366850, ranks A366846, complement A366842.
A000041 counts integer partitions, strict A000009, complement A047967.
A035363 counts partitions into all even parts, ranks A066207.
A078374 counts relatively prime strict partitions.
A168532 counts partitions by gcd.
A239261 counts partitions with (sum of odd parts) = (sum of even parts).
A366531 = 2*A366533 adds up even prime indices, triangle A113686/A174713.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], GCD@@Select[#,EvenQ]/2==1&]],{n,0,30}]

A366850 Number of integer partitions of n whose odd parts are relatively prime.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 7, 11, 16, 22, 32, 43, 60, 80, 110, 140, 194, 244, 327, 410, 544, 670, 883, 1081, 1401, 1708, 2195, 2651, 3382, 4069, 5129, 6157, 7708, 9194, 11438, 13599, 16788, 19911, 24432, 28858, 35229, 41507, 50359, 59201, 71489, 83776, 100731, 117784
Offset: 0

Views

Author

Gus Wiseman, Oct 28 2023

Keywords

Examples

			The a(1) = 1 through a(8) = 16 partitions:
  (1)  (11)  (21)   (31)    (41)     (51)      (61)       (53)
             (111)  (211)   (221)    (321)     (331)      (71)
                    (1111)  (311)    (411)     (421)      (431)
                            (2111)   (2211)    (511)      (521)
                            (11111)  (3111)    (2221)     (611)
                                     (21111)   (3211)     (3221)
                                     (111111)  (4111)     (3311)
                                               (22111)    (4211)
                                               (31111)    (5111)
                                               (211111)   (22211)
                                               (1111111)  (32111)
                                                          (41111)
                                                          (221111)
                                                          (311111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

For all parts (not just odd) we have A000837, complement A018783.
The complement is counted by A366842.
These partitions have ranks A366846.
A000041 counts integer partitions, strict A000009 (also into odds).
A000740 counts relatively prime compositions.
A078374 counts relatively prime strict partitions.
A113685 counts partitions by sum of odd parts, rank statistic A366528.
A168532 counts partitions by gcd.
A239261 counts partitions with (sum of odd parts) = (sum of even parts).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],GCD@@Select[#,OddQ]==1&]],{n,0,30}]

A382302 Number of integer partitions of n with greatest part, greatest multiplicity, and number of distinct parts all equal.

Original entry on oeis.org

0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, 3, 4, 4, 3, 6, 5, 8, 8, 13, 13, 16, 17, 21, 22, 25, 26, 32, 34, 37, 44, 47, 55, 62, 72, 78, 94, 103, 118, 132, 151, 163, 189, 205, 230, 251, 284, 307, 346, 377, 420, 462, 515, 562, 629, 690, 763
Offset: 0

Views

Author

Gus Wiseman, Mar 24 2025

Keywords

Examples

			The a(n) partitions for n = 1, 2, 10, 13, 14, 19, 20, 21:
  1  .  32221   332221   333221   4333321     43333211    43333221
        322111  333211   3322211  43322221    44322221    433332111
                3322111  3332111  433321111   433222211   443222211
                4321111           443221111   443321111   444321111
                                  543211111   4332221111  4332222111
                                  4322221111              4333221111
                                                          4432221111
                                                          5432211111
		

Crossrefs

Without the middle statistic we have A000009, ranked by A055932.
Counting partitions by the LHS gives A008284 (strict A008289), rank statistic A061395.
Counting partitions by the middle statistic gives A091602, rank statistic A051903.
Counting partitions by the RHS gives A116608/A365676, rank statistic A001221.
Without the LHS we have A239964, ranked by A212166.
Without the RHS we have A240312, ranked by A381542.
The Heinz numbers of these partitions are listed by A381543.
A000041 counts integer partitions.
A047993 counts partitions with max part = length, ranks A106529.
A116598 counts ones in partitions, rank statistic A007814.
A381438 counts partitions by last part part of section-sum partition.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Max@@#==Max@@Length/@Split[#]==Length[Union[#]]&]],{n,0,30}]
  • PARI
    A_x(N) = {if(N<1,[0],my(x='x+O('x^(N+1))); concat([0],Vec(sum(i=1,N, prod(j=1,i, (x^j-x^((i+1)*j))/(1-x^j)) - prod(j=1,i, (x^j-x^(i*j))/(1-x^j))))))}
    A_x(60) \\ John Tyler Rascoe, Mar 25 2025

Formula

G.f.: Sum_{i>0} (B(i+1,i,x) - B(i,i,x)) where B(a,c,x) = Product_{j=1..c} (x^j - x^(a*j))/(1 - x^j). - John Tyler Rascoe, Mar 25 2025

A381544 Number of integer partitions of n not containing more ones than any other part.

Original entry on oeis.org

0, 0, 1, 2, 3, 4, 7, 8, 13, 17, 24, 30, 45, 54, 75, 97, 127, 160, 212, 263, 342, 427, 541, 672, 851, 1046, 1307, 1607, 1989, 2428, 2993, 3631, 4443, 5378, 6533, 7873, 9527, 11424, 13752, 16447, 19701, 23470, 28016, 33253, 39537, 46801, 55428, 65408, 77238
Offset: 0

Views

Author

Gus Wiseman, Mar 24 2025

Keywords

Examples

			The a(2) = 1 through a(9) = 17 partitions:
  (2)  (3)   (4)   (5)    (6)     (7)     (8)      (9)
       (21)  (22)  (32)   (33)    (43)    (44)     (54)
             (31)  (41)   (42)    (52)    (53)     (63)
                   (221)  (51)    (61)    (62)     (72)
                          (222)   (322)   (71)     (81)
                          (321)   (331)   (332)    (333)
                          (2211)  (421)   (422)    (432)
                                  (2221)  (431)    (441)
                                          (521)    (522)
                                          (2222)   (531)
                                          (3221)   (621)
                                          (3311)   (3222)
                                          (22211)  (3321)
                                                   (4221)
                                                   (22221)
                                                   (32211)
                                                   (222111)
		

Crossrefs

The complement is counted by A241131, ranks A360013 = 2*A360015 (if we prepend 1).
The Heinz numbers of these partitions are A381439.
The case of equality is A382303, ranks A360014.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A047993 counts partitions with max part = length, ranks A106529.
A091602 counts partitions by the greatest multiplicity, rank statistic A051903.
A116598 counts ones in partitions, rank statistic A007814.
A239964 counts partitions with max multiplicity = length, ranks A212166.
A240312 counts partitions with max part = max multiplicity, ranks A381542.
A382302 counts partitions with max = max multiplicity = distinct length, ranks A381543.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Count[#,1]<=Max@@Length/@Split[DeleteCases[#,1]]&]],{n,0,30}]

A366839 Sum of even prime factors of 2n, counted with multiplicity.

Original entry on oeis.org

2, 4, 2, 6, 2, 4, 2, 8, 2, 4, 2, 6, 2, 4, 2, 10, 2, 4, 2, 6, 2, 4, 2, 8, 2, 4, 2, 6, 2, 4, 2, 12, 2, 4, 2, 6, 2, 4, 2, 8, 2, 4, 2, 6, 2, 4, 2, 10, 2, 4, 2, 6, 2, 4, 2, 8, 2, 4, 2, 6, 2, 4, 2, 14, 2, 4, 2, 6, 2, 4, 2, 8, 2, 4, 2, 6, 2, 4, 2, 10, 2, 4, 2, 6, 2
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2023

Keywords

Examples

			The prime factors of 2*60 are {2,2,2,3,5}, of which the even factors are {2,2,2}, so a(60) = 6.
		

Crossrefs

A compound version is A001414, triangle A331416.
Dividing by 2 gives A001511.
Positions of 2's are A005408.
For count instead of sum we have A007814, odd version A087436.
The partition triangle for this statistic is A116598 aerated.
For indices we have A366531, halved A366533, triangle A113686/A174713.
The odd version is A366840.
A019507 lists numbers with (even factor sum) = (odd factor sum).
A066207 lists numbers with all even prime indices, counted by A035363.
A112798 lists prime indices, reverse A296150, length A001222, sum A056239.
A162641 counts even prime exponents, odd A162642.
A239261 counts partitions with (sum of odd parts) = (sum of even parts).
A257992 counts even prime indices, odd A257991.
A366528 adds up odd prime indices, triangle A113685 (without zeros A365067).

Programs

  • Mathematica
    Table[2*Length[NestWhileList[#/2&,n,EvenQ]],{n,100}]
  • PARI
    a(n) = 2 * valuation(n, 2) + 2; \\ Amiram Eldar, Sep 13 2024

Formula

a(n) = 2*A001511(n).
a(n) = A100006(n) - A366840(2n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 4. - Amiram Eldar, Sep 13 2024
Showing 1-10 of 19 results. Next