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.

A302347 a(n) = Sum of (Y(2,p)^2) over the partitions p of n, Y(2,p) = number of part sizes with multiplicity 2 or greater in p.

Original entry on oeis.org

0, 0, 1, 1, 3, 4, 10, 13, 25, 34, 59, 80, 127, 172, 260, 349, 505, 673, 946, 1248, 1711, 2238, 3010, 3902, 5162, 6637, 8663, 11051, 14253, 18051, 23047, 28988, 36677, 45840, 57538, 71485, 89082, 110062, 136269, 167487, 206138, 252132, 308640, 375777, 457698
Offset: 0

Views

Author

Emily Anible, Apr 05 2018

Keywords

Comments

This sequence is part of the contribution to the b^2 term of C_{1-b,2}(q) for(1-b,2)-colored partitions - partitions in which we can label parts any of an indeterminate 1-b colors, but are restricted to using only 2 of the colors per part size. This formula is known to match the Han/Nekrasov-Okounkov hooklength formula truncated at hooks of size two up to the linear term in b.
It is of interest to enumerate and determine specific characteristics of partitions of n, considering each partition individually.

Examples

			For a(6), we sum over partitions of six. For each partition, we count 1 for each part which appears more than once, then square the total in each partition.
6............0^2 = 0
5,1..........0^2 = 0
4,2..........0^2 = 0
4,1,1........1^2 = 1
3,3..........1^2 = 1
3,2,1........0^2 = 0
3,1,1,1......1^2 = 1
2,2,2........1^2 = 1
2,2,1,1......2^2 = 4
2,1,1,1,1....1^2 = 1
1,1,1,1,1,1..1^2 = 1
--------------------
Total.............10
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0 or i=1, (
          `if`(n>1, 1, 0)+p)^2, add(b(n-i*j, i-1,
          `if`(j>1, 1, 0)+p), j=0..n/i))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Apr 05 2018
  • Mathematica
    Array[Total[Count[Split@ #, ?(Length@ # > 1 &)]^2 & /@ IntegerPartitions[#]] &, 44] (* _Michael De Vlieger, Apr 07 2018 *)
    b[n_, i_, p_] := b[n, i, p] = If[n == 0 || i == 1, (
         If[n > 1, 1, 0] + p)^2, Sum[b[n - i*j, i - 1,
         If[j > 1, 1, 0] + p], {j, 0, n/i}]];
    a[n_] := b[n, n, 0];
    a /@ Range[0, 60] (* Jean-François Alcover, Jun 06 2021, after Alois P. Heinz *)
  • Python
    def sum_square_freqs_greater_one(freq_list):
        tot = 0
        for f in freq_list:
            count = 0
            for i in f:
                if i > 1:
                    count += 1
            tot += count*count
        return tot
    def frequencies(partition, n):
        tot = 0
        freq_list = []
        i = 0
        for p in partition:
            freq = [0 for i in range(n+1)]
            for i in p:
                freq[i] += 1
            for f in freq:
                if f == 0:
                    tot += 1
            freq_list.append(freq)
        return freq_list

Formula

a(n) = Sum_{p in P(n)} (H(2,p)^2 + 2*A024786 - 2*A024788), where P(n) is the set of partitions of n, and H(2,p) is the hooks of length 2 in partition p.
G.f: (q^2*(1+q^4))/((1-q^2)*(1-q^4))*Product_{j>=1} 1/(1-q^j).
a(n) ~ sqrt(3) * exp(Pi*sqrt(2*n/3)) / (8*Pi^2). - Vaclav Kotesovec, May 22 2018

A179385 The n-th term is the sum of all the 1's generated from all the combinations of prime numbers and ones possible, that add to n, when each prime is only allowed once and any number of ones are allowed.

Original entry on oeis.org

1, 2, 4, 7, 10, 15, 20, 27, 35, 44, 55, 67, 81, 97, 115, 135, 158, 183, 212, 244, 280, 320, 364, 413, 467, 526, 591, 661, 737, 820, 909, 1007, 1112, 1226, 1349, 1481, 1624, 1778, 1943, 2121, 2311, 2515, 2734, 2968, 3219, 3486, 3771, 4075, 4399, 4744, 5112, 5502
Offset: 1

Views

Author

Joseph Foley, Jul 12 2010

Keywords

Examples

			n=7 gives 11111 11, 2111 11, 311 11, 5 11, 5 2, 32 11. (Grouped in 5's) no. of 1's: 7, 5, 4, 2, 0, 2. Sum is 20, therefore a(7) = 20.
n=12 gives 11111 11111 11, 11111 11111 2, 11111 311 11, 11111 32 11, 11111 5 11, 5 2111 11, 5 311 11, 5 32 11, 7111 11, 721 11, 73 11, 73 2, 75, eleven 1, no. of 1's: 12, 10, 9, 7, 7, 5, 4, 2, 5, 3, 2, 0, 0, 1. Sum is 67, therefore a(12) = 67.
1: 1 => 1 2: 11, 2 => 2 3: 111, 21 => 4 4: 1111, 211, 22, 31 => 7 5: 11111, 2111, 311, 23 => 10 6: 11111 1, 2111 1, 311 1, 23 1, 5 1 => 15 and so on.
		

Crossrefs

Programs

  • Maple
    b:= proc(n,i) option remember; if n<=0 then 0 elif i=0 then n else b(n, i-1) +b(n-ithprime(i), i-1) fi end: # R. J. Mathar, Jul 14 2010
    a:= n-> b(n, numtheory[pi](n)): seq(a(n), n=1..80); # Alois P. Heinz
  • Mathematica
    fQ[lst_List] := Sort@ Flatten@ Most@ Split@ lst == Rest@ Union@ lst; f[n_] := Sum[ Count[ Select[ IntegerPartitions[n, {k}, Join[{1}, Prime@ Range@ PrimePi@n]], fQ@# &], 1, 2], {k, n}]; Array[f, 50] (* improved by Robert G. Wilson v, Jul 20 2010 *)
    (* second program: *)
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, b[n, i - 1] + If[Prime[i] > n, 0, b[n - Prime[i], i - 1]]]];
    a[n_] := Sum[k*b[n - k, PrimePi[n - k]], {k, 1, n}];
    Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Aug 29 2016, after Alois P. Heinz *)
  • PARI
    a(n) = my(r); r = x/(1-x)^2 + O(x^(n+1)); forprime(p=2,n,r*=1+x^p); polcoeff(r,n) \\ Max Alekseyev, Jul 14 2010

Formula

a(n) = Sum_{k=1..n} k * A000586(n-k). - Max Alekseyev, Jul 14 2010

Extensions

Corrected and extended by R. J. Mathar, Jul 14 2010

A141450 Upper right triangle of the number of m's in all partitions of n.

Original entry on oeis.org

1, 1, 2, 1, 1, 4, 1, 1, 3, 7, 1, 1, 2, 4, 12, 1, 1, 2, 4, 8, 19, 1, 1, 2, 3, 6, 11, 30, 1, 1, 2, 3, 6, 9, 19, 45, 1, 1, 2, 3, 5, 8, 15, 26, 67, 1, 1, 2, 3, 5, 8, 13, 21, 41, 97, 1, 1, 2, 3, 5, 7, 12, 18, 31, 56, 139, 1, 1, 2, 3, 5, 7, 12, 17, 28, 45, 83, 195, 1, 1, 2, 3, 5, 7, 11, 16, 25, 38, 63
Offset: 1

Views

Author

Robert G. Wilson v, Aug 07 2008

Keywords

Comments

The "last" column read from the bottom is A000041.
Mirror of triangle A066633. - Omar E. Pol, May 01 2012

Examples

			A000070: 1, 2, 4, 7, 12, 19, 30, 45, 67, 97, 139, 195, 272, 373, 508, ...,
A024786: 0, 1, 1, 3, 4, 8, 11, 19, 26, 41, 56, 83, 112, 160, 213, ...,
A024787: 0, 0, 1, 1, 2, 4, 6, 9, 15, 21, 31, 45, 63, 87, 122, ...,
A024788: 0, 0, 0, 1, 1, 2, 3, 6, 8, 13, 18, 28, 38, 55, 74, ...,
A024789: 0, 0, 0, 0, 1, 1, 2, 3, 5, 8, 12, 17, 25, 35, 50, ...,
A024790: 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 12, 16, 24, 33, ...,
A024791: 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 11, 16, 23, ...,
A024792: 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 11, 15, ...,
A024793: 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 11, ...,
A024794: 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, ...
		

Crossrefs

Programs

  • Mathematica
    (* First do ) Needs["Combinatorica`"] (* then *) f[n_, m_] := Count[Flatten@ Partitions@ n, m]; Table[ f[n, m], {n, 13}, {m, n, 1, -1}]

A304825 Sum of binomial(Y(2,p), 2) over the partitions p of n, where Y(2,p) is the number of part sizes with multiplicity 2 or greater in p.

Original entry on oeis.org

1, 1, 3, 4, 9, 12, 22, 30, 50, 68, 105, 142, 210, 281, 400, 531, 736, 967, 1311, 1707, 2274, 2935, 3851, 4930, 6389, 8116, 10402, 13121, 16658, 20872, 26275, 32719, 40880, 50613, 62807, 77343, 95389, 116874, 143331, 174789, 213251, 258903, 314367, 380079, 459462
Offset: 6

Views

Author

Emily Anible, May 19 2018

Keywords

Examples

			For a(8), we sum over the partitions of eight. For each partition p, we take binomial(Y(2,p),2): that is, the number of parts with multiplicity at least two choose 2.
8................B(0,2) = 0
7,1..............B(0,2) = 0
6,2..............B(0,2) = 0
6,1,1............B(1,2) = 0
5,3..............B(0,2) = 0
5,2,1............B(0,2) = 0
5,1,1,1..........B(1,2) = 0
4,4..............B(1,2) = 0
4,3,1............B(0,2) = 0
4,2,2............B(1,2) = 0
4,2,1,1..........B(1,2) = 0
4,1,1,1,1........B(1,2) = 0
3,3,2............B(1,2) = 0
3,3,1,1..........B(2,2) = 1
3,2,2,1..........B(1,2) = 0
3,2,1,1,1........B(1,2) = 0
3,1,1,1,1,1......B(1,2) = 0
2,2,2,2..........B(1,2) = 0
2,2,2,1,1........B(2,2) = 1
2,2,1,1,1,1......B(2,2) = 1
2,1,1,1,1,1,1....B(1,2) = 0
1,1,1,1,1,1,1,1..B(1,2) = 0
---------------------------
Total.....................3
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0 or i=1,
          binomial(`if`(n>1, 1, 0)+p, 2), add(
          b(n-i*j, i-1, `if`(j>1, 1, 0)+p), j=0..n/i))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=6..60);  # Alois P. Heinz, May 19 2018
  • Mathematica
    Array[Total[Binomial[Count[Split@#, _?(Length@# >= 2 &)], 2] & /@IntegerPartitions[#]] &, 50]
    (* Second program: *)
    b[n_, i_, p_] := b[n, i, p] = If[n == 0 || i == 1,
         Binomial[If[n > 1, 1, 0] + p, 2], Sum[
         b[n-i*j, i-1, If[j>1, 1, 0]+p], {j, 0, n/i}]];
    a[n_] := b[n, n, 0];
    a /@ Range[6, 60] (* Jean-François Alcover, May 30 2021, after Alois P. Heinz *)

Formula

a(n) = (A301313(n) - A024788(n))/4.
G.f.: q^6 /((1-q^2)*(1-q^4))*Product_{j>=1} 1/(1-q^j).
Previous Showing 11-14 of 14 results.