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

A226541 Number of unimodal compositions of n where the maximal part appears three times.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 1, 2, 3, 5, 7, 11, 16, 24, 34, 51, 71, 102, 143, 201, 276, 384, 522, 714, 964, 1301, 1739, 2328, 3084, 4085, 5377, 7064, 9226, 12036, 15616, 20228, 26092, 33584, 43067, 55125, 70308, 89502, 113598, 143889, 181755, 229160, 288186, 361750, 453046, 566346, 706464
Offset: 0

Views

Author

Joerg Arndt, Jun 10 2013

Keywords

Crossrefs

Cf. A006330 (max part appears once), A114921 (max part appears twice).
Cf. A188674 (max part m appears m times), A001522 (max part m appears at least m times).
Cf. A001523 (max part appears any number of times).
Cf. A000009 (symmetric, max part m appears once; also symmetric, max part appears an odd number of times).
Cf. A035363 (symmetric, max part m appears twice; also symmetric, max part appears an even number of times).
Cf. A087897 (symmetric, max part m appears 3 times).
Cf. A027349 (symmetric, max part m appears m times), A189357 (symmetric, max part m appears at least m times).
Column k=3 of A247255.

Programs

  • PARI
    N=66; x='x+O('x^N); Vec(sum(n=0,N, x^(3*n) / prod(k=1,n-1, 1-x^k )^2 ))

Formula

G.f.: sum(n>=0, x^(3*n) / prod(k=1..n-1, 1-x^k )^2 ); replace 3 by m to obtain g.f. for "... max part appears m times".
a(n) ~ Pi^2 * exp(2*Pi*sqrt(n/3)) / (16 * 3^(7/4) * n^(9/4)). - Vaclav Kotesovec, Oct 24 2018

A343943 Number of distinct possible alternating sums of permutations of the multiset of prime factors of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 1, 2, 2, 2, 3, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 4, 1, 2, 2, 1, 2, 3, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 4, 2, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Aug 19 2021

Keywords

Comments

First differs from A096825 at a(525) = 3, A096825(525) = 4.
First differs from A345926 at a(90) = 4, A345926(90) = 3.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. Of course, the alternating sum of prime factors is also the reverse-alternating sum of reversed prime factors.
Also the number of distinct "sums of prime factors" of divisors d|n such that bigomega(d) = bigomega(n)/2 rounded up.

Examples

			The divisors of 525 with 2 prime factors are: 15, 21, 25, 35, with prime factors {3,5}, {3,7}, {5,5}, {5,7}, with distinct sums {8,10,12}, so a(525) = 3.
		

Crossrefs

The half-length submultisets are counted by A114921.
Including all multisets of prime factors gives A305611(n) + 1.
The strict rounded version appears to be counted by A342343.
The version for prime indices instead of prime factors is A345926.
A000005 counts divisors, which add up to A000203.
A001414 adds up prime factors, row sums of A027746.
A056239 adds up prime indices, row sums of A112798.
A071321 gives the alternating sum of prime factors (reverse: A071322).
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A108917 counts knapsack partitions, ranked by A299702.
A276024 and A299701 count positive subset-sums of partitions.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A334968 counts subsequence-sums of standard compositions.

Programs

  • Mathematica
    prifac[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
    Table[Length[Union[Total/@Subsets[prifac[n],{Ceiling[PrimeOmega[n]/2]}]]],{n,100}]
  • Python
    from sympy import factorint
    from sympy.utilities.iterables import multiset_combinations
    def A343943(n):
        fs = factorint(n)
        return len(set(sum(d) for d in multiset_combinations(fs,(sum(fs.values())+1)//2))) # Chai Wah Wu, Aug 23 2021

A342194 Number of strict compositions of n with equal differences, or strict arithmetic progressions summing to n.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 7, 7, 7, 13, 11, 11, 17, 13, 15, 25, 17, 17, 29, 19, 23, 35, 25, 23, 39, 29, 29, 45, 33, 29, 55, 31, 35, 55, 39, 43, 65, 37, 43, 65, 51, 41, 77, 43, 51, 85, 53, 47, 85, 53, 65, 87, 61, 53, 99, 67, 67, 97, 67, 59, 119, 61, 71, 113, 75, 79, 123, 67, 79, 117
Offset: 0

Views

Author

Gus Wiseman, Apr 02 2021

Keywords

Examples

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

Crossrefs

Strict compositions in general are counted by A032020.
The unordered version is A049980.
The non-strict version is A175342.
A000203 adds up divisors.
A000726 counts partitions with alternating parts unequal.
A003242 counts anti-run compositions.
A224958 counts compositions with alternating parts unequal.
A342343 counts compositions with alternating parts strictly decreasing.
A342495 counts compositions with constant quotients.
A342527 counts compositions with alternating parts equal.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n],UnsameQ@@#&],SameQ@@Differences[#]&]],{n,0,30}]

Formula

a(n > 0) = A175342(n) - A000005(n) + 1.
a(n > 0) = 2*A049988(n) - 2*A000005(n) + 1 = 2*A049982(n) + 1.

A380108 Number of distinct partitions of length n binary strings into maximal constant substrings up to permutation.

Original entry on oeis.org

1, 2, 3, 6, 10, 18, 29, 48, 75, 118, 179, 272, 403, 596, 865, 1252, 1786, 2538, 3566, 4990, 6918, 9552, 13086, 17856, 24205, 32684, 43881, 58698, 78125, 103618, 136820, 180064, 236031, 308432, 401585, 521340, 674579, 870446, 1119786, 1436798, 1838405, 2346480, 2987204
Offset: 0

Views

Author

Yaroslav Deryavko, Jan 12 2025

Keywords

Comments

Equivalently, a(n) is the number of partitions of n into parts of two kinds where the number of parts of each kind differ by at most one.

Examples

			For n = 3, the partitions are (000), (111), (00, 1), (0, 11), (0, 0, 1), (0, 1, 1).
		

Crossrefs

Programs

  • Maple
    g:= (n, i, t)-> `if`(t>1+n, 0, `if`(n=0, 1, b(n, i, t))):
    b:= proc(n, i, t) option remember; add(add(g(n-i*j,
          min(n-i*j, i-1), abs(t+2*h-j)), h=0..j), j=`if`(i=1, n, 0..n/i))
        end:
    a:= n-> g(n$2, 0):
    seq(a(n), n=0..42);  # Alois P. Heinz, Jan 15 2025
  • Mathematica
    g[n_, i_, t_] := If[t > 1+n, 0, If[n == 0, 1, b[n, i, t]]];
    b[n_, i_, t_] := b[n, i, t] = Sum[Sum[g[n-i*j,
       Min[n-i*j, i-1], Abs[t+2*h-j]], {h, 0, j}], {j, If[i == 1, n, 0], n/i}];
    a[n_] := g[n, n, 0];
    Table[a[n], {n, 0, 42}] (* Jean-François Alcover, Feb 02 2025, after Alois P. Heinz *)
  • PARI
    seq(n)={my(p=1/prod(k=1, n, 1-y*x^k + O(x*x^n))); Vec(sum(k=0, n\2, polcoef(p, k, y)*(2*polcoef(p, k+1, y) + polcoef(p, k, y))))} \\ Andrew Howroyd, Jan 12 2025
  • Python
    n = 0
    while True:
        m = set()
        for i in range(2**n):
            t = bin(i)[2:]
            t = '0' * (n - len(t)) + t + '2'
            l = []
            s = 0
            for j in range(1, n + 1):
                if t[j] != t[j - 1]:
                    l.append(t[s:j])
                    s = j
            l.sort()
            l = tuple(l)
            m.add(l)
        print(len(m), end=' ')
        n += 1
    

Formula

G.f.: Sum_{k>=0} ([y^k] P(x,y))*([y^k] (1 + 2*y)*P(x,y)), where P(x,y) = Product_{k>=1} 1/(1 - y*x^k). - Andrew Howroyd, Jan 12 2025
Previous Showing 11-14 of 14 results.