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.

A103628 Total sum of parts of multiplicity 1 in all partitions of n.

Original entry on oeis.org

0, 1, 2, 6, 10, 21, 33, 59, 89, 145, 212, 325, 463, 680, 948, 1348, 1845, 2558, 3446, 4681, 6219, 8306, 10901, 14352, 18632, 24230, 31151, 40077, 51074, 65088, 82290, 103986, 130517, 163679, 204078, 254174, 314975, 389839, 480369, 591133, 724600, 886965
Offset: 0

Views

Author

Vladeta Jovovic, Mar 25 2005

Keywords

Comments

Total number of parts of multiplicity 1 in all partitions of n is A024786(n+1).
Equals A000041 convolved with A026741. - Gary W. Adamson, Jun 11 2009

Examples

			Partitions of 4 are [1,1,1,1], [1,1,2], [2,2], [1,3], [4] and a(4) = 0 + 2 + 0 + (1+3) + 4 = 10.
		

Crossrefs

Cf. A026741. - Gary W. Adamson, Jun 11 2009
Column k=1 of A222730. - Alois P. Heinz, Mar 03 2013

Programs

  • Maple
    gf:=x*(1+x+x^2)/(1-x^2)^2/product((1-x^k), k=1..500): s:=series(gf, x, 100): for n from 0 to 60 do printf(`%d,`,coeff(s, x, n)) od: # James Sellers, Apr 22 2005
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, [1, 0],
          `if`(i<1, [0, 0], add((l->`if`(j=1, [l[1],
           l[2]+l[1]*i], l))(b(n-i*j, i-1)), j=0..n/i)))
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Feb 03 2013
  • Mathematica
    b[n_, p_] := b[n, p] = If[n == 0 && p == 0, {1, 0}, If[p == 0, Array[0&, n+2], Sum[Function[l, ReplacePart[l, m+2 -> p*l[[1]] + l[[m+2]]]][Join[b[n-p*m, p-1], Array[0&, p*m]]], {m, 0, n/p}]]]; a[n_] := b[n, n][[3]]; a[0] = 0; Table[a[n], {n, 0, 50}]  (* Jean-François Alcover, Jan 24 2014, after Alois P. Heinz *)

Formula

G.f.: x*(1+x+x^2)/(1-x^2)^2 /Product_{k>0}(1-x^k).
a(n) = A066186(n) - A194544(n). - Omar E. Pol, Nov 20 2011
a(n) = 3*A014153(n)/4 - 3*A000070(n)/4 - A270143(n+1)/4 + A087787(n)/4. - Vaclav Kotesovec, Nov 05 2016
a(n) ~ 3^(3/2) * exp(Pi*sqrt(2*n/3)) / (8*Pi^2) * (1 - Pi/(24*sqrt(6*n))). - Vaclav Kotesovec, Nov 05 2016

Extensions

More terms from James Sellers, Apr 22 2005

A194452 Total number of repeated parts in all partitions of n.

Original entry on oeis.org

0, 0, 2, 3, 8, 12, 24, 35, 60, 87, 136, 192, 287, 396, 567, 773, 1074, 1439, 1958, 2587, 3454, 4514, 5931, 7666, 9951, 12736, 16341, 20743, 26354, 33184, 41807, 52262, 65329, 81144, 100721, 124344, 153390, 188303, 230940, 282063, 344100, 418242, 507762
Offset: 0

Views

Author

Omar E. Pol, Nov 19 2011

Keywords

Examples

			For n = 6 we have:
--------------------------------------
.                        Number of
Partitions             repeated parts
--------------------------------------
6 .......................... 0
3 + 3 ...................... 2
4 + 2 ...................... 0
2 + 2 + 2 .................. 3
5 + 1 ...................... 0
3 + 2 + 1 .................. 0
4 + 1 + 1 .................. 2
2 + 2 + 1 + 1 .............. 4
3 + 1 + 1 + 1 .............. 3
2 + 1 + 1 + 1 + 1 .......... 4
1 + 1 + 1 + 1 + 1 + 1 ...... 6
------------------------------------
Total ..................... 24
So a(6) = 24.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local h, j, t;
          if n<0 then [0, 0]
        elif n=0 then [1, 0]
        elif i<1 then [0, 0]
        else h:= [0, 0];
             for j from 0 to iquo(n, i) do
               t:= b(n-i*j, i-1);
               h:= [h[1]+t[1], h[2]+t[2]+`if`(j<2, 0, t[1]*j)]
             od; h
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Nov 20 2011
    g := add(x^(2*j)*(2-x^j)/(1-x^j), j = 1 .. 80)/mul(1-x^j, j = 1 .. 80): gser := series(g, x = 0, 50): seq(coeff(gser, x, n), n = 0 .. 45); # Emeric Deutsch, Feb 02 2016
  • Mathematica
    myCount[p_List] := Module[{t}, If[p == {}, 0, t = Transpose[Tally[p]][[2]]; Sum[If[t[[i]] == 1, 0, t[[i]]], {i, Length[t]}]]]; Table[Total[Table[myCount[p], {p, IntegerPartitions[i]}]], {i, 0, 20}] (* T. D. Noe, Nov 19 2011 *)
    b[n_, i_] := b[n, i] = Module[{h, j, t}, Which[n<0, {0, 0}, n==0, {1, 0}, i < 1, {0, 0}, True, h={0, 0}; For[j=0, j <= Quotient[n, i], j++, t = b[n - i*j, i-1]; h = {h[[1]]+t[[1]], h[[2]]+t[[2]] + If[j<2, 0, t[[1]]*j]}]; h] ]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Oct 25 2015, after Alois P. Heinz *)
    Table[Length[Flatten[Select[Flatten[Split[#]&/@IntegerPartitions[n],1],Length[#]>1&]]],{n,0,60}] (* Harvey P. Dale, Jun 12 2024 *)

Formula

a(n) = A006128(n) - A024786(n+1).
a(n) = Sum_{k=2..n} k*A264405(n,k). - Alois P. Heinz, Dec 07 2015
G.f.: g = Sum_{j>0} (x^{2*j}*(2 - x^j)/(1-x^j))/Product_{k>0}(1 - x^k) (obtained by logarithmic differentiation of the bivariate g.f. given in A264405). - Emeric Deutsch, Feb 02 2016

A194545 Total sum of nonprime parts in all partitions of n.

Original entry on oeis.org

0, 1, 2, 4, 11, 16, 33, 48, 89, 134, 214, 305, 478, 663, 976, 1356, 1934, 2617, 3654, 4877, 6652, 8808, 11772, 15386, 20329, 26308, 34249, 43987, 56651, 72079, 92008, 116171, 146967, 184381, 231399, 288398, 359581, 445426, 551721, 679868, 837238, 1026256
Offset: 0

Views

Author

Omar E. Pol, Nov 20 2011

Keywords

Examples

			For n = 6 we have:
--------------------------------------
.                          Sum of
Partitions             nonprime parts
--------------------------------------
6 .......................... 6
3 + 3 ...................... 0
4 + 2 ...................... 4
2 + 2 + 2 .................. 0
5 + 1 ...................... 1
3 + 2 + 1 .................. 1
4 + 1 + 1 .................. 6
2 + 2 + 1 + 1 .............. 2
3 + 1 + 1 + 1 .............. 3
2 + 1 + 1 + 1 + 1 .......... 4
1 + 1 + 1 + 1 + 1 + 1 ...... 6
--------------------------------------
Total ..................... 33
So a(6) = 33.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local h, j, t;
          if n<0 then [0, 0]
        elif n=0 then [1, 0]
        elif i<1 then [0, 0]
        else h:= [0, 0];
             for j from 0 to iquo(n, i) do
               t:= b(n-i*j, i-1);
               h:= [h[1]+t[1], h[2]+t[2]+`if`(isprime(i), 0, t[1]*i*j)]
             od; h
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Nov 20 2011
  • Mathematica
    b[n_, i_] := b[n, i] = Module[{h, j, t}, Which[n<0, {0, 0}, n==0, {1, 0}, i < 1, {0, 0}, True, h = {0, 0}; For[j = 0, j <= Quotient[n, i], j++, t = b[n-i*j, i-1]; h = {h[[1]] + t[[1]], h[[2]] + t[[2]] + If[PrimeQ[i], 0, t[[1]]*i*j]}]; h]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Nov 03 2015, after Alois P. Heinz *)

Formula

a(n) = A066186(n) - A073118(n).

Extensions

More terms from Alois P. Heinz, Nov 20 2011

A199936 Total sum of Fibonacci parts in all partitions of n.

Original entry on oeis.org

0, 1, 4, 9, 16, 31, 52, 80, 133, 197, 298, 428, 621, 879, 1230, 1696, 2329, 3142, 4231, 5619, 7447, 9781, 12771, 16553, 21391, 27440, 35089, 44600, 56510, 71232, 89538, 112011, 139759, 173679, 215279, 265840, 327527, 402162, 492703, 601830, 733550, 891634
Offset: 0

Views

Author

Omar E. Pol, Nov 21 2011

Keywords

Examples

			For n = 6 we have:
--------------------------------------
.                         Sum of
Partitions            Fibonacci parts
--------------------------------------
6 .......................... 0
3 + 3 ...................... 6
4 + 2 ...................... 2
2 + 2 + 2 .................. 6
5 + 1 ...................... 6
3 + 2 + 1 .................. 6
4 + 1 + 1 .................. 2
2 + 2 + 1 + 1 .............. 6
3 + 1 + 1 + 1 .............. 6
2 + 1 + 1 + 1 + 1 .......... 6
1 + 1 + 1 + 1 + 1 + 1 ...... 6
------------------------------------
Total ..................... 52
So a(6) = 52.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i<1, 0,
          `if`(i>n, 0, ((p, m)-> p +`if`(issqr(m+4) or issqr(m-4),
          [0, p[1]*i], 0))(b(n-i, i), 5*i^2)) +b(n, i-1)))
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Feb 01 2017
  • Mathematica
    max = 42; F = Fibonacci; gf = Sum[F[i]*x^F[i]/(1-x^F[i]), {i, 2, max}] / Product[1-x^j, {j, 1, max}] + O[x]^max; CoefficientList[gf, x] (* Jean-François Alcover, Feb 21 2017, after Ilya Gutkovskiy *)
    b[n_, i_] := b[n, i] = If[n==0, {1, 0}, If[i<1, 0, If[i>n, 0, Function[{p, m}, p+If[IntegerQ @ Sqrt[m+4] || IntegerQ @ Sqrt[m-4], {0, p[[1]]*i}, 0] ][b[n-i, i], 5*i^2]]+b[n, i-1]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 21 2017, after Alois P. Heinz *)

Formula

G.f.: Sum_{i>=2} Fibonacci(i)*x^Fibonacci(i)/(1 - x^Fibonacci(i)) / Product_{j>=1} (1 - x^j). - Ilya Gutkovskiy, Feb 01 2017

Extensions

More terms from Alois P. Heinz, Nov 21 2011

A326982 Total sum of composite parts in all partitions of n.

Original entry on oeis.org

0, 0, 0, 0, 4, 4, 14, 18, 44, 67, 117, 166, 283, 391, 603, 848, 1250, 1702, 2442, 3280, 4565, 6094, 8266, 10878, 14566, 18970, 24953, 32255, 41909, 53619, 68983, 87542, 111496, 140561, 177436, 222125, 278425, 346293, 430951, 533083, 659268, 810948, 997322
Offset: 0

Views

Author

Omar E. Pol, Aug 09 2019

Keywords

Examples

			For n = 6 we have:
--------------------------------------
Partitions                Sum of
of 6                  composite parts
--------------------------------------
6 .......................... 6
3 + 3 ...................... 0
4 + 2 ...................... 4
2 + 2 + 2 .................. 0
5 + 1 ...................... 0
3 + 2 + 1 .................. 0
4 + 1 + 1 .................. 4
2 + 2 + 1 + 1 .............. 0
3 + 1 + 1 + 1 .............. 0
2 + 1 + 1 + 1 + 1 .......... 0
1 + 1 + 1 + 1 + 1 + 1 ...... 0
--------------------------------------
Total ..................... 14
So a(6) = 14.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=1, [1, 0], b(n, i-1)+
          (p-> p+[0, `if`(isprime(i), 0, p[1]*i)])(b(n-i, min(n-i, i))))
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Aug 13 2019
  • Mathematica
    Table[Total[Select[Flatten[IntegerPartitions[n]],CompositeQ]],{n,0,50}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 19 2020 *)
    b[n_, i_] := b[n, i] = If[n == 0 || i == 1, {1, 0}, b[n, i - 1] +
         With[{p = b[n-i, Min[n-i, i]]}, p+{0, If[PrimeQ[i], 0, p[[1]]*i]}]];
    a[n_] := b[n, n][[2]];
    a /@ Range[0, 50] (* Jean-François Alcover, Jun 07 2021, after Alois P. Heinz *)

Formula

a(n) = A194545(n) - A000070(n-1), n >= 1.
a(n) = A066186(n) - A326958(n).
Showing 1-5 of 5 results.