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

A317081 Number of integer partitions of n whose multiplicities cover an initial interval of positive integers.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 5, 9, 11, 16, 20, 30, 34, 50, 58, 79, 96, 129, 152, 203, 243, 307, 375, 474, 563, 707, 850, 1042, 1246, 1532, 1815, 2215, 2632, 3173, 3765, 4525, 5323, 6375, 7519, 8916, 10478, 12414, 14523, 17133, 20034, 23488, 27422, 32090, 37285, 43511, 50559
Offset: 0

Views

Author

Gus Wiseman, Jul 21 2018

Keywords

Comments

Also the number of integer partitions of n with distinct section-sums, where the k-th part of the section-sum partition is the sum of all (distinct) parts that appear at least k times. - Gus Wiseman, Apr 21 2025

Examples

			The a(1) = 1 through a(9) = 16 partitions:
 (1) (2) (3)  (4)   (5)   (6)   (7)    (8)    (9)
         (21) (31)  (32)  (42)  (43)   (53)   (54)
              (211) (41)  (51)  (52)   (62)   (63)
                    (221) (321) (61)   (71)   (72)
                    (311) (411) (322)  (332)  (81)
                                (331)  (422)  (432)
                                (421)  (431)  (441)
                                (511)  (521)  (522)
                                (3211) (611)  (531)
                                       (3221) (621)
                                       (4211) (711)
                                              (3321)
                                              (4221)
                                              (4311)
                                              (5211)
                                              (32211)
		

Crossrefs

The case with parts also covering an initial interval is A317088.
These partitions are ranked by A317090.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A047966 counts partitions with constant section-sums.
A048767 interchanges prime indices and prime multiplicities (Look-and-Say), see A048768.
A055932 lists numbers whose prime indices cover an initial interval.
A116540 counts normal set multipartitions.
A304442 counts partitions with equal run-sums, ranks A353833.
A381436 lists the section-sum partition of prime indices.
A381440 lists the Look-and-Say partition of prime indices.

Programs

  • Mathematica
    normalQ[m_]:=Union[m]==Range[Max[m]];
    Table[Length[Select[IntegerPartitions[n],normalQ[Length/@Split[#]]&]],{n,30}]
  • Python
    from sympy.utilities.iterables import partitions
    def A317081(n):
        if n == 0:
            return 1
        c = 0
        for d in partitions(n):
            s = set(d.values())
            if len(s) == max(s):
                c += 1
        return c # Chai Wah Wu, Jun 22 2020

A329395 Numbers whose binary expansion without the most significant (first) digit has Lyndon and co-Lyndon factorizations of equal lengths.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 10, 13, 15, 16, 22, 25, 31, 32, 36, 42, 46, 49, 53, 59, 63, 64, 76, 82, 94, 97, 109, 115, 127, 128, 136, 148, 156, 162, 166, 169, 170, 172, 181, 182, 190, 193, 201, 202, 211, 213, 214, 217, 221, 227, 235, 247, 255, 256, 280, 292, 306, 308
Offset: 1

Views

Author

Gus Wiseman, Nov 13 2019

Keywords

Comments

We define the Lyndon product of two or more finite sequences to be the lexicographically maximal sequence obtainable by shuffling the sequences together. For example, the Lyndon product of (231) with (213) is (232131), the product of (221) with (213) is (222131), and the product of (122) with (2121) is (2122121). A Lyndon word is a finite sequence that is prime with respect to the Lyndon product. Equivalently, a Lyndon word is a finite sequence that is lexicographically strictly less than all of its cyclic rotations. Every finite sequence has a unique (orderless) factorization into Lyndon words, and if these factors are arranged in lexicographically decreasing order, their concatenation is equal to their Lyndon product. For example, (1001) has sorted Lyndon factorization (001)(1).
Similarly, the co-Lyndon product is the lexicographically minimal sequence obtainable by shuffling the sequences together, and a co-Lyndon word is a finite sequence that is prime with respect to the co-Lyndon product, or, equivalently, a finite sequence that is lexicographically strictly greater than all of its cyclic rotations. For example, (1001) has sorted co-Lyndon factorization (1)(100).
Conjecture: also numbers k such that the k-th composition in standard order (A066099) is a palindrome, cf. A025065, A242414, A317085, A317086, A317087, A335373. - Gus Wiseman, Jun 06 2020

Examples

			The sequence of terms together with their trimmed binary expansions and their co-Lyndon and Lyndon factorizations begins:
   1:      () =               0 = 0
   2:     (0) =             (0) = (0)
   3:     (1) =             (1) = (1)
   4:    (00) =          (0)(0) = (0)(0)
   7:    (11) =          (1)(1) = (1)(1)
   8:   (000) =       (0)(0)(0) = (0)(0)(0)
  10:   (010) =         (0)(10) = (01)(0)
  13:   (101) =         (10)(1) = (1)(01)
  15:   (111) =       (1)(1)(1) = (1)(1)(1)
  16:  (0000) =    (0)(0)(0)(0) = (0)(0)(0)(0)
  22:  (0110) =        (0)(110) = (011)(0)
  25:  (1001) =        (100)(1) = (1)(001)
  31:  (1111) =    (1)(1)(1)(1) = (1)(1)(1)(1)
  32: (00000) = (0)(0)(0)(0)(0) = (0)(0)(0)(0)(0)
  36: (00100) =     (0)(0)(100) = (001)(0)(0)
  42: (01010) =     (0)(10)(10) = (01)(01)(0)
  46: (01110) =       (0)(1110) = (0111)(0)
  49: (10001) =       (1000)(1) = (1)(0001)
  53: (10101) =     (10)(10)(1) = (1)(01)(01)
  59: (11011) =     (110)(1)(1) = (1)(1)(011)
  63: (11111) = (1)(1)(1)(1)(1) = (1)(1)(1)(1)(1)
		

Crossrefs

Lyndon and co-Lyndon compositions are (both) counted by A059966.
Numbers whose reversed binary expansion is Lyndon are A328596.
Numbers whose binary expansion is co-Lyndon are A275692.

Programs

  • Mathematica
    lynQ[q_]:=Array[Union[{q, RotateRight[q, #]}]=={q, RotateRight[q, #]}&, Length[q]-1, 1, And];
    lynfac[q_]:=If[Length[q]==0, {}, Function[i, Prepend[lynfac[Drop[q, i]], Take[q, i]]][Last[Select[Range[Length[q]], lynQ[Take[q, #]]&]]]];
    colynQ[q_]:=Array[Union[{RotateRight[q, #], q}]=={RotateRight[q, #], q}&, Length[q]-1, 1, And];
    colynfac[q_]:=If[Length[q]==0, {}, Function[i, Prepend[colynfac[Drop[q, i]], Take[q, i]]]@Last[Select[Range[Length[q]], colynQ[Take[q, #]]&]]];
    Select[Range[100],Length[lynfac[Rest[IntegerDigits[#,2]]]]==Length[colynfac[Rest[IntegerDigits[#,2]]]]&]

A317087 Numbers whose prime factors span an initial interval of prime numbers and whose sequence of prime multiplicities is a palindrome.

Original entry on oeis.org

1, 2, 4, 6, 8, 16, 30, 32, 36, 64, 90, 128, 210, 216, 256, 270, 300, 512, 810, 900, 1024, 1296, 2048, 2310, 2430, 2700, 2940, 3000, 3150, 4096, 7290, 7776, 8100, 8192, 9000, 11550, 16384, 21870, 24300, 27000, 30000, 30030, 32768, 41160, 44100, 46656, 47250, 48510
Offset: 1

Views

Author

Gus Wiseman, Jul 21 2018

Keywords

Comments

3^m*10^k for k, m > 0 are terms of this sequence. - Chai Wah Wu, Jun 23 2020

Examples

			The sequence of rows of A296150 indexed by the terms of this sequence begins: (1), (11), (21), (111), (1111), (321), (11111), (2211), (111111), (3221), (1111111), (4321), (222111), (11111111), (32221), (33211), (111111111), (322221), (332211).
		

Crossrefs

Programs

  • Mathematica
    nrmpalQ[n_]:=With[{f=If[n==1,{},FactorInteger[n]]}, And[PrimePi/@ Sort[First/@f] == Range[ Length[f]], Reverse[Last/@f] == Last/@f]]; Select[Range[100],nrmpalQ]
    upto = 10^20; pL[n_] := Block[{p = Prime@Range@n, h = Ceiling[n/2]}, Take[p, h] Reverse@ If[n == 2 h, Take[p, -h], Prepend[ Take[p, 1-h], 1]]]; ric[v_, p_] := If[p == {}, AppendTo[L, v], Block[{w = v}, While[w <= upto, ric[w, Rest@ p]; w *= First@ p]]]; np = 1; L = {1}; While[(b = Times @@ Prime[Range@ np]) <= upto, ric[b, pL[np++]]]; Sort[L] (* Giovanni Resta, Jun 23 2020 *)
  • Python
    from sympy import factorint, primepi
    A317087_list = [1]
    for n in range(1,10**5):
        d = factorint(n)
        k, l = sorted(d.keys()), len(d)
        if l > 0 and l == primepi(max(d)):
            for i in range(l//2):
                if d[k[i]] != d[k[l-i-1]]:
                    break
            else:
                A317087_list.append(n) # Chai Wah Wu, Jun 23 2020

A317086 Number of normal integer partitions of n whose sequence of multiplicities is a palindrome.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 1, 2, 2, 4, 1, 4, 1, 4, 5, 4, 1, 7, 1, 8, 6, 6, 1, 10, 5, 7, 8, 11, 1, 20, 1, 9, 12, 9, 13, 25, 1, 10, 17, 21, 1, 37, 1, 21, 36, 12, 1, 44, 16, 23, 30, 33, 1, 53, 17, 55, 38, 15, 1, 103, 1, 16, 95, 51, 28, 69, 1, 73, 57, 82
Offset: 0

Views

Author

Gus Wiseman, Jul 21 2018

Keywords

Comments

A partition is normal if its parts span an initial interval of positive integers.
a(n) = 1 if and only if n = 0, 1, 2, 4 or a prime > 3. - Chai Wah Wu, Jun 22 2020
From David A. Corneth, Jul 08 2020: (Start)
Let [f_1, f_2, ,..., f_i, ..., f_m] be the multiplicities of parts i in a partition of Sum_{i=1..m} (f_i * i). Then, as the sequence of multiplicities is a palindrome, we have f_1 = f_m, ..., f_i = f_(m+1-i). So the sum is f_1 * (1 + m) + f_2 * (2 + m-1) + ... + f_(floor(m/2)) * m/2 (the last term depending on the parity of m.). This way it becomes a list of Diophantine equations for which we look for the number of solutions.
For example, for m = 4 we look for solutions to the Diophantine equation 5 * (c + d) = n where c, d are positive integers >= 1. A similar technique is used in A254524. (End)

Examples

			The a(20) = 8 partitions:
  (44432111), (44332211), (43332221),
  (3333221111), (3332222111), (3322222211), (3222222221),
  (11111111111111111111).
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And[Union[#]==Range[First[#]],Length/@Split[#]==Reverse[Length/@Split[#]]]&]],{n,30}]
  • Python
    from sympy.utilities.iterables import partitions
    from sympy import integer_nthroot, isprime
    def A317086(n):
        if n > 3 and isprime(n):
            return 1
        else:
            c = 1
            for d in partitions(n,k=integer_nthroot(2*n,2)[0],m=n*2//3):
                l = len(d)
                if l > 0:
                    k = max(d)
                    if l == k:
                        for i in range(k//2):
                            if d[i+1] != d[k-i]:
                                break
                        else:
                            c += 1
            return c # Chai Wah Wu, Jun 22 2020

A056503 Number of periodic palindromic structures of length n using a maximum of two different symbols.

Original entry on oeis.org

1, 2, 2, 4, 4, 7, 8, 14, 16, 26, 32, 51, 64, 100, 128, 198, 256, 392, 512, 778, 1024, 1552, 2048, 3091, 4096, 6176, 8192, 12324, 16384, 24640, 32768, 49222, 65536, 98432, 131072, 196744, 262144, 393472, 524288, 786698, 1048576, 1573376, 2097152, 3146256, 4194304
Offset: 1

Views

Author

Keywords

Comments

For example, aaabbb is not a (finite) palindrome but it is a periodic palindrome. Permuting the symbols will not change the structure.
A periodic palindrome is just a necklace that is equivalent to its reverse. The number of binary periodic palindromes of length n is given by A164090(n). A binary periodic palindrome can only be equivalent to its complement when there are an equal number of 0's and 1's. - Andrew Howroyd, Sep 29 2017
Number of cyclic compositions (necklaces of positive integers) summing to n that can be rotated to form a palindrome. - Gus Wiseman, Sep 16 2018

Examples

			From _Gus Wiseman_, Sep 16 2018: (Start)
The sequence of palindromic cyclic compositions begins:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (111)  (22)    (113)    (33)      (115)
                    (112)   (122)    (114)     (133)
                    (1111)  (11111)  (222)     (223)
                                     (1122)    (11113)
                                     (11112)   (11212)
                                     (111111)  (11122)
                                               (1111111)
(End)
		

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

Programs

  • Mathematica
    (* b = A164090, c = A045674 *)
    b[n_] := (1/4)*(7 - (-1)^n)*2^((1/4)*(2*n + (-1)^n - 1));
    c[0] = 1; c[n_] := c[n] = If[EvenQ[n], 2^(n/2-1) + c[n/2], 2^((n-1)/2)];
    a[n_?OddQ] := b[n]/2; a[n_?EvenQ] := (1/2)*(b[n] + c[n/2]);
    Array[a, 45] (* Jean-François Alcover, Oct 08 2017, after Andrew Howroyd *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Function[q,And[Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And],Array[SameQ[RotateRight[q,#],Reverse[RotateRight[q,#]]]&,Length[q],1,Or]]]]],{n,15}] (* Gus Wiseman, Sep 16 2018 *)

Formula

a(2n+1) = A164090(2n+1)/2 = 2^n, a(2n) = (A164090(2n) + A045674(n))/2. - Andrew Howroyd, Sep 29 2017

Extensions

a(17)-a(45) from Andrew Howroyd, Apr 07 2017

A319436 Number of palindromic plane trees with n nodes.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 35, 68, 122, 234, 426, 808, 1484, 2798, 5167, 9700, 17974, 33656, 62498, 116826, 217236, 405646, 754938, 1408736, 2623188, 4892848, 9114036, 16995110, 31664136, 59034488, 110004243, 205068892, 382156686, 712363344, 1327600346, 2474618434
Offset: 1

Views

Author

Gus Wiseman, Sep 18 2018

Keywords

Comments

A rooted plane tree is palindromic if the sequence of branches directly under any given node is a palindrome.

Examples

			The a(7) = 20 palindromic plane trees:
  ((((((o))))))  (((((oo)))))  ((((ooo))))  (((oooo)))  ((ooooo))  (oooooo)
                 ((((o)(o))))  (((o(o)o)))  ((o(oo)o))  (o(ooo)o)
                 (((o))((o)))  ((o((o))o))  (o((oo))o)  (oo(o)oo)
                               (((o)o(o)))  ((oo)(oo))
                               (o(((o)))o)  ((o)oo(o))
                               ((o)(o)(o))  (o(o)(o)o)
		

Crossrefs

Programs

  • Mathematica
    panplane[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[panplane/@c],#==Reverse[#]&],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[panplane[n]],{n,10}]
  • PARI
    PAL(p)={(1+p)/subst(1-p, x, x^2)}
    seq(n)={my(p=O(1));for(i=1, n, p=PAL(x*p)); Vec(p)} \\ Andrew Howroyd, Sep 19 2018

Formula

a(n) ~ c * d^n, where d = 1.86383559155190653688720443906758855085492625375... and c = 0.24457511051198663873739022949952908293770055... - Vaclav Kotesovec, Nov 16 2021

A056513 Number of primitive (period n) periodic palindromic structures using a maximum of two different symbols.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 4, 7, 10, 14, 21, 31, 42, 63, 91, 123, 184, 255, 371, 511, 750, 1015, 1519, 2047, 3030, 4092, 6111, 8176, 12222, 16383, 24486, 32767, 49024, 65503, 98175, 131061, 196308, 262143, 392959, 524223, 785910, 1048575, 1572256, 2097151, 3144702, 4194162
Offset: 0

Views

Author

Keywords

Comments

For example, aaabbb is not a (finite) palindrome but it is a periodic palindrome. Permuting the symbols will not change the structure.
Number of Lyndon compositions (aperiodic necklaces of positive integers) summing to n that can be rotated to form a palindrome. - Gus Wiseman, Sep 16 2018

Examples

			From _Gus Wiseman_, Sep 16 2018: (Start)
The sequence of palindromic Lyndon compositions begins:
  (1)  (2)  (3)  (4)    (5)    (6)      (7)
                 (112)  (113)  (114)    (115)
                        (122)  (1122)   (133)
                               (11112)  (223)
                                        (11113)
                                        (11212)
                                        (11122)
(End)
		

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

Programs

  • Mathematica
    (* b = A164090, c = A045674 *)
    b[n_] := (1/4)*(7 - (-1)^n)*2^((1/4)*(2*n + (-1)^n - 1));
    c[0] = 1;
    c[n_] := c[n] = If[EvenQ[n], 2^(n/2 - 1) + c[n/2], 2^((n - 1)/2)];
    a56503[n_] := If[OddQ[n], b[n]/2, (1/2)*(b[n] + c[n/2])];
    a[n_] := DivisorSum[n, MoebiusMu[#] a56503[n/#]&];
    Array[a, 45] (* Jean-François Alcover, Jun 29 2018, after Andrew Howroyd *)
  • PARI
    a(n) = {if(n < 1, n==0, sumdiv(n, d, moebius(d)*(2 + d%2)*(2^(n/d\2)))/(4 - n%2))} \\ Andrew Howroyd, Sep 26 2019
    
  • PARI
    seq(n) = Vec(1 + (1/2)*sum(k=1, n, moebius(k)*x^k*(2 + 3*x^k)/(1 - 2*x^(2*k)) - moebius(2*k)*x^(2*k)*(1 + x^(2*k))/(1 - 2*x^(4*k)) + O(x*x^n))) \\ Andrew Howroyd, Sep 27 2019

Formula

a(n) = Sum_{d|n} mu(d)*A056503(n/d) for n > 0.
a(n) = Sum_{k=1..2} A285037(n, k). - Andrew Howroyd, Apr 08 2017
G.f.: 1 + (1/2)*Sum_{k>=1} mu(k)*x^k*(2 + 3*x^k)/(1 - 2*x^(2*k)) - mu(2*k)*x^(2*k)*(1 + x^(2*k))/(1 - 2*x^(4*k)). - Andrew Howroyd, Sep 27 2019

Extensions

a(17)-a(45) from Andrew Howroyd, Apr 08 2017
a(0)=1 prepended by Andrew Howroyd, Sep 27 2019

A317082 Number of integer partitions of n whose multiplicities are weakly decreasing and span an initial interval of positive integers.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 5, 8, 9, 13, 17, 22, 26, 35, 42, 53, 66, 81, 96, 122, 143, 174, 210, 251, 293, 358, 417, 493, 582, 686, 793, 941, 1087, 1267, 1471, 1709, 1961, 2285, 2615, 3013, 3460, 3976, 4523, 5204, 5914, 6747, 7681, 8745, 9884, 11262, 12714, 14393, 16261
Offset: 0

Views

Author

Gus Wiseman, Jul 21 2018

Keywords

Examples

			The a(7) = 8 integer partitions are (7), (61), (52), (511), (43), (421), (322), (3211).
		

Crossrefs

Programs

  • Mathematica
    normalQ[m_]:=Union[m]==Range[Max[m]];
    Table[Length[Select[IntegerPartitions[n],And[normalQ[Length/@Split[#]],OrderedQ[Length/@Split[#]]]&]],{n,60}]

A317084 Number of integer partitions of n whose multiplicities are weakly increasing and span an initial interval of positive integers.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 4, 6, 7, 10, 11, 16, 17, 23, 27, 34, 38, 50, 54, 70, 79, 97, 107, 135, 148, 180, 205, 243, 270, 328, 360, 429, 480, 561, 625, 738, 810, 949, 1057, 1219, 1349, 1571, 1723, 1986, 2206, 2515, 2776, 3188, 3496, 3983, 4408, 4980, 5485, 6228, 6826
Offset: 0

Views

Author

Gus Wiseman, Jul 21 2018

Keywords

Examples

			The a(7) = 6 integer partitions are (7), (61), (52), (43), (421), (331).
		

Crossrefs

Programs

  • Mathematica
    normalQ[m_]:=Union[m]==Range[Max[m]];
    Table[Length[Select[IntegerPartitions[n],And[normalQ[Length/@Split[#]],OrderedQ[Reverse[Length/@Split[#]]]]&]],{n,60}]

A319437 Number of series-reduced palindromic plane trees with n nodes.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 3, 4, 7, 10, 15, 23, 35, 52, 81, 121, 185, 280, 427, 645, 985, 1490, 2269, 3440, 5233, 7936, 12071, 18313, 27839, 42256, 64217, 97490, 148137, 224924, 341725, 518923, 788321, 1197178, 1818597, 2761926, 4195381, 6371808, 9678537, 14699771
Offset: 1

Views

Author

Gus Wiseman, Sep 18 2018

Keywords

Comments

A rooted plane tree is series-reduced if every non-leaf node has at least two branches, and palindromic if the sequence of branches directly under any given node is a palindrome.

Crossrefs

Programs

  • Mathematica
    srpanplane[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[srpanplane/@c],#==Reverse[#]&],{c,Join@@Permutations/@Select[IntegerPartitions[n-1],Length[#]>1&]}]];
    Table[Length[srpanplane[n]],{n,15}]
  • PARI
    PAL(p)={(1+p)/subst(1-p, x, x^2)}
    seq(n)={my(p=O(1));for(i=1, n, p=PAL(x*p)-x*p); Vec(p)} \\ Andrew Howroyd, Sep 19 2018

Extensions

Terms a(27) and beyond from Andrew Howroyd, Sep 19 2018
Showing 1-10 of 11 results. Next