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

A238628 Number of partitions p of n such that n - max(p) is a part of p.

Original entry on oeis.org

0, 1, 1, 3, 2, 5, 3, 8, 4, 11, 5, 16, 6, 21, 7, 29, 8, 38, 9, 51, 10, 66, 11, 88, 12, 113, 13, 148, 14, 190, 15, 246, 16, 313, 17, 402, 18, 508, 19, 646, 20, 812, 21, 1023, 22, 1277, 23, 1598, 24, 1982, 25, 2461, 26, 3036, 27, 3745, 28, 4593, 29, 5633
Offset: 1

Views

Author

Clark Kimberling, Mar 02 2014

Keywords

Comments

Also the number of integer partitions of n that are of length 2 or contain n/2. The first condition alone is A004526, complement A058984. The second condition alone is A035363, complement A086543, ranks A344415. - Gus Wiseman, Oct 07 2023

Examples

			a(6) counts these partitions:  51, 42, 33, 321, 3111.
		

Crossrefs

Cf. A238479.
The strict case is A365659, complement A365826.
The complement is counted by A365825.
These partitions are ranked by A366318.
A000041 counts integer partitions, strict A000009.
A140106 counts strict partitions of length 2, complement A365827.
A182616 counts partitions of 2n that do not contain n, strict A365828.

Programs

  • Mathematica
    Table[Count[IntegerPartitions[n], p_ /; MemberQ[p, n - Max[p]]], {n, 50}]
  • PARI
    a(n) = my(res = floor(n/2)); if(!bitand(n, 1), res+=(numbpart(n/2)-1)); res
  • Python
    from sympy.utilities.iterables import partitions
    def A238628(n): return sum(1 for p in partitions(n) if n-max(p,default=0) in p) # Chai Wah Wu, Sep 21 2023
    

A365828 Number of strict integer partitions of 2n not containing n.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 12, 18, 27, 39, 55, 78, 108, 148, 201, 270, 359, 475, 623, 811, 1050, 1351, 1728, 2201, 2789, 3517, 4418, 5527, 6887, 8553, 10585, 13055, 16055, 19685, 24065, 29343, 35685, 43287, 52387, 63253, 76200, 91605, 109897, 131575, 157231, 187539
Offset: 0

Views

Author

Gus Wiseman, Sep 20 2023

Keywords

Examples

			The a(0) = 1 through a(6) = 12 strict partitions:
  ()  (2)  (4)    (6)    (8)      (10)       (12)
           (3,1)  (4,2)  (5,3)    (6,4)      (7,5)
                  (5,1)  (6,2)    (7,3)      (8,4)
                         (7,1)    (8,2)      (9,3)
                         (5,2,1)  (9,1)      (10,2)
                                  (6,3,1)    (11,1)
                                  (7,2,1)    (5,4,3)
                                  (4,3,2,1)  (7,3,2)
                                             (7,4,1)
                                             (8,3,1)
                                             (9,2,1)
                                             (5,4,2,1)
		

Crossrefs

The complement is counted by A111133.
For non-strict partitions we have A182616, complement A000041.
A000009 counts strict integer partitions.
A046663 counts partitions with no submultiset summing to k, strict A365663.
A365827 counts strict partitions not of length 2, complement A140106.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[2n],UnsameQ@@#&&FreeQ[#,n]&]],{n,0,30}]

Formula

a(n) = A000009(2n) - A000009(n) + 1.

A365825 Number of integer partitions of n that are not of length 2 and do not contain n/2.

Original entry on oeis.org

1, 1, 1, 2, 2, 5, 6, 12, 14, 26, 31, 51, 61, 95, 114, 169, 202, 289, 347, 481, 576, 782, 936, 1244, 1487, 1946, 2323, 2997, 3570, 4551, 5414, 6827, 8103, 10127, 11997, 14866, 17575, 21619, 25507, 31166, 36692, 44563, 52362, 63240, 74152, 89112, 104281, 124731
Offset: 0

Views

Author

Gus Wiseman, Sep 19 2023

Keywords

Comments

Also the number of integer partitions of n with no two possibly equal parts summing to n.

Examples

			The a(1) = 1 through a(8) = 14 partitions:
  (1)  (2)  (3)    (4)     (5)      (6)       (7)        (8)
            (111)  (1111)  (221)    (222)     (322)      (332)
                           (311)    (411)     (331)      (521)
                           (2111)   (2211)    (421)      (611)
                           (11111)  (21111)   (511)      (2222)
                                    (111111)  (2221)     (3221)
                                              (3211)     (3311)
                                              (4111)     (5111)
                                              (22111)    (22211)
                                              (31111)    (32111)
                                              (211111)   (221111)
                                              (1111111)  (311111)
                                                         (2111111)
                                                         (11111111)
		

Crossrefs

First condition alone is A058984, complement A004526, ranks A100959.
Second condition alone is A086543, complement A035363, ranks !A344415.
The complement is counted by A238628.
The strict case is A365826, complement A365659.
A000041 counts integer partitions, strict A000009.
A046663 counts partitions with no submultiset summing to k, strict A365663.
A140106 counts strict partitions of length 2, complement A365827.
A182616 counts partitions of 2n that do not contain n, strict A365828.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Length[#]!=2&&FreeQ[#,n/2]&]],{n,0,15}]
  • Python
    from sympy import npartitions
    def A365825(n): return npartitions(n)-(m:=n>>1)-(0 if n&1 else npartitions(m)-1) # Chai Wah Wu, Sep 23 2023

Formula

Heinz numbers are A100959 /\ !A344415.
a(n) = A000041(n)-(n-1)/2 if n is odd. a(n) = A000041(n)-n/2-A000041(n/2)+1 if n is even. - Chai Wah Wu, Sep 23 2023

Extensions

a(31)-a(47) from Chai Wah Wu, Sep 23 2023

A365826 Number of strict integer partitions of n that are not of length 2 and do not contain n/2.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 7, 7, 12, 12, 20, 20, 30, 31, 45, 46, 66, 68, 93, 97, 130, 136, 179, 188, 242, 256, 325, 344, 432, 459, 568, 606, 742, 793, 963, 1031, 1240, 1331, 1589, 1707, 2026, 2179, 2567, 2766, 3240, 3493, 4072, 4393, 5094, 5501, 6351
Offset: 0

Views

Author

Gus Wiseman, Sep 20 2023

Keywords

Comments

Also the number of strict integer partitions of n without two parts (allowing parts to be re-used) summing to n.

Examples

			The a(6) = 1 through a(12) = 7 strict partitions:
  (6)  (7)      (8)      (9)      (10)       (11)       (12)
       (4,2,1)  (5,2,1)  (4,3,2)  (6,3,1)    (5,4,2)    (5,4,3)
                         (5,3,1)  (7,2,1)    (6,3,2)    (7,3,2)
                         (6,2,1)  (4,3,2,1)  (6,4,1)    (7,4,1)
                                             (7,3,1)    (8,3,1)
                                             (8,2,1)    (9,2,1)
                                             (5,3,2,1)  (5,4,2,1)
		

Crossrefs

The second condition alone has bisections A078408 and A365828.
The complement is counted by A365659.
The non-strict version is A365825, complement A238628.
The first condition alone is A365827, complement A140106.
A000041 counts integer partitions, strict A000009.
A182616 counts partitions of 2n that do not contain n, strict A365828.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&FreeQ[Total/@Tuples[#,2],n]&]], {n,0,30}]

A365829 Squarefree non-semiprimes.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 30, 31, 37, 41, 42, 43, 47, 53, 59, 61, 66, 67, 70, 71, 73, 78, 79, 83, 89, 97, 101, 102, 103, 105, 107, 109, 110, 113, 114, 127, 130, 131, 137, 138, 139, 149, 151, 154, 157, 163, 165, 167, 170, 173, 174, 179, 181, 182, 186
Offset: 1

Views

Author

Gus Wiseman, Oct 05 2023

Keywords

Comments

First differs from A030059 in having 210.

Examples

			The terms together with their prime indices begin:
     1: {}          43: {14}       102: {1,2,7}
     2: {1}         47: {15}       103: {27}
     3: {2}         53: {16}       105: {2,3,4}
     5: {3}         59: {17}       107: {28}
     7: {4}         61: {18}       109: {29}
    11: {5}         66: {1,2,5}    110: {1,3,5}
    13: {6}         67: {19}       113: {30}
    17: {7}         70: {1,3,4}    114: {1,2,8}
    19: {8}         71: {20}       127: {31}
    23: {9}         73: {21}       130: {1,3,6}
    29: {10}        78: {1,2,6}    131: {32}
    30: {1,2,3}     79: {22}       137: {33}
    31: {11}        83: {23}       138: {1,2,9}
    37: {12}        89: {24}       139: {34}
    41: {13}        97: {25}       149: {35}
    42: {1,2,4}    101: {26}       151: {36}
		

Crossrefs

First condition alone is A005117 (squarefree).
Second condition alone is A100959 (non-semiprime).
The nonprime case is 1 followed by A350352.
Partitions of this type are counted by A365827, non-strict A058984.
A001358 lists semiprimes, squarefree A006881.

Programs

  • Mathematica
    Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]!=2&]
  • PARI
    isok(k) = my(f=factor(k)); issquarefree(f) && (bigomega(f) != 2); \\ Michel Marcus, Oct 07 2023

Formula

Intersection of A005117 and A100959.
Complement of A001358 in A005117.
Showing 1-5 of 5 results.