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

A037032 Total number of prime parts in all partitions of n.

Original entry on oeis.org

0, 1, 2, 4, 7, 13, 20, 32, 48, 73, 105, 153, 214, 302, 415, 569, 767, 1034, 1371, 1817, 2380, 3110, 4025, 5199, 6659, 8512, 10806, 13684, 17229, 21645, 27049, 33728, 41872, 51863, 63988, 78779, 96645, 118322, 144406, 175884, 213617, 258957, 313094, 377867
Offset: 1

Views

Author

Keywords

Comments

a(n) is also the sum of the differences between the sum of p-th largest and the sum of (p+1)st largest elements in all partitions of n for all primes p. - Omar E. Pol, Oct 25 2012

Examples

			From _Omar E. Pol_, Nov 20 2011 (Start):
For n = 6 we have:
--------------------------------------
.                        Number of
Partitions              prime parts
--------------------------------------
6 .......................... 0
3 + 3 ...................... 2
4 + 2 ...................... 1
2 + 2 + 2 .................. 3
5 + 1 ...................... 1
3 + 2 + 1 .................. 2
4 + 1 + 1 .................. 0
2 + 2 + 1 + 1 .............. 2
3 + 1 + 1 + 1 .............. 1
2 + 1 + 1 + 1 + 1 .......... 1
1 + 1 + 1 + 1 + 1 + 1 ...... 0
------------------------------------
Total ..................... 13
So a(6) = 13.
(End)
		

Crossrefs

Programs

  • Maple
    with(combinat): a:=proc(n) local P,c,j,i: P:=partition(n): c:=0: for j from 1 to numbpart(n) do for i from 1 to nops(P[j]) do if isprime(P[j][i])=true then c:=c+1 else c:=c fi: od: od: c: end: seq(a(n),n=1..42); # Emeric Deutsch, Mar 30 2006
    # second Maple program
    b:= proc(n, i) option remember; local g;
          if n=0 or i=1 then [1, 0]
        else g:= `if`(i>n, [0$2], b(n-i, i));
             b(n, i-1) +g +[0, `if`(isprime(i), g[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 27 2012
  • Mathematica
    a[n_] := Sum[PrimeNu[k]*PartitionsP[n - k], {k, 1, n}]; Array[a, 100] (* Jean-François Alcover, Mar 16 2015, after Vladeta Jovovic *)
  • PARI
    a(n)={sum(k=1, n, omega(k)*numbpart(n-k))} \\ Andrew Howroyd, Dec 28 2017

Formula

a(n) = Sum_{k=1..n} A001221(k)*A000041(n-k). - Vladeta Jovovic, Aug 22 2002
a(n) = Sum_{k=1..floor(n/2)} k*A222656(n,k). - Alois P. Heinz, May 29 2013
G.f.: Sum_{i>=1} x^prime(i)/(1 - x^prime(i)) / Product_{j>=1} (1 - x^j). - Ilya Gutkovskiy, Jan 24 2017

Extensions

More terms from Naohiro Nomoto, Apr 19 2002

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

A309561 Total sum of prime parts in all compositions of n.

Original entry on oeis.org

0, 0, 2, 7, 16, 44, 102, 244, 554, 1247, 2772, 6111, 13334, 28916, 62302, 133557, 285020, 605869, 1283362, 2710008, 5706546, 11986171, 25118500, 52529339, 109643310, 228455907, 475250388, 987177924, 2047710144, 4242128909, 8777675002, 18142184432, 37458037658
Offset: 0

Views

Author

Alois P. Heinz, Aug 07 2019

Keywords

Examples

			a(4) = 16: 1111, (2)11, 1(2)1, 11(2), (2)(2), (3)1, 1(3), 4.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; add(a(n-j) +j*
          `if`(isprime(j), ceil(2^(n-j-1)), 0), j=1..n)
        end:
    seq(a(n), n=0..33);
  • Mathematica
    a[n_] := a[n] = Sum[a[n-j]+j*If[PrimeQ[j], Ceiling[2^(n-j-1)], 0], {j, 1, n}];
    a /@ Range[0, 33] (* Jean-François Alcover, Jan 03 2021, after Alois P. Heinz *)

Formula

G.f.: Sum_{k>=1} prime(k)*x^prime(k)*(1-x)^2/(1-2*x)^2.
a(n) ~ c * 2^n * n, where c = 0.27326606442562679135064648817419092073886899135... - Vaclav Kotesovec, Aug 18 2019

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).

A326958 Total sum of noncomposite parts in all partitions of n.

Original entry on oeis.org

0, 1, 4, 9, 16, 31, 52, 87, 132, 203, 303, 450, 641, 922, 1287, 1792, 2446, 3347, 4488, 6030, 7975, 10538, 13778, 17987, 23234, 29980, 38383, 49015, 62195, 78766, 99137, 124560, 155672, 194158, 241104, 298780, 368747, 454276, 557619, 683132, 834252, 1016955
Offset: 0

Views

Author

Omar E. Pol, Aug 08 2019

Keywords

Examples

			For n = 6 we have:
--------------------------------------
.                         Sum of
Partitions             noncomposite
of 6                       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 or i=1, [1, n], b(n, i-1)+
          (p-> p+[0, `if`(isprime(i), p[1]*i, 0)])(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
    b[n_, i_] := b[n, i] = If[n==0 || i==1, {1, n}, b[n, i-1] + # + {0, If[PrimeQ[i], #[[1]] i, 0]}&[b[n-i, Min[n-i, i]]]];
    a[n_] := b[n, n][[2]];
    a /@ Range[0, 50] (* Jean-François Alcover, Nov 17 2020, after Alois P. Heinz *)

Formula

a(n) = A073118(n) + A000070(n-1), n >= 1.
a(n) = A066186(n) - A326982(n).

A281904 Expansion of Sum_{i>=1} mu(i)^2*i*x^i/(1 - x^i) / Product_{j>=1} (1 - x^j), where mu() is the Moebius function (A008683).

Original entry on oeis.org

1, 4, 9, 16, 31, 58, 93, 144, 221, 343, 502, 733, 1048, 1495, 2089, 2881, 3947, 5357, 7205, 9618, 12758, 16812, 22001, 28623, 37037, 47720, 61121, 77973, 99029, 125322, 157874, 198205, 247954, 309203, 384260, 476116, 588149, 724613, 890175, 1090781, 1333193, 1625702, 1977505, 2400221, 2906800, 3513121
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 01 2017

Keywords

Comments

Total sum of squarefree parts in all partitions of n.
Convolution of the sequences A000041 and A048250.

Examples

			a(4) = 16 because we have [4], [3, 1], [2, 2], [2, 1, 1], [1, 1, 1, 1] and 3 + 1 + 2 + 2 + 2 + 1 + 1 + 1 + 1 + 1 + 1 = 16.
		

Crossrefs

Programs

  • Mathematica
    nmax = 46; Rest[CoefficientList[Series[Sum[MoebiusMu[i]^2 i x^i/(1 - x^i), {i, 1, nmax}] / Product[1 - x^j, {j, 1, nmax}], {x, 0, nmax}], x]]

Formula

G.f.: Sum_{i>=1} mu(i)^2*i*x^i/(1 - x^i) / Product_{j>=1} (1 - x^j).

A281905 Expansion of Sum_{i>=2} prime(i)*x^prime(i)/(1 - x^prime(i)) / Product_{j>=1} (1 - x^j).

Original entry on oeis.org

0, 0, 3, 3, 11, 17, 35, 49, 84, 124, 199, 280, 426, 594, 858, 1172, 1654, 2224, 3061, 4066, 5472, 7196, 9543, 12391, 16196, 20857, 26921, 34351, 43924, 55574, 70419, 88455, 111142, 138697, 173025, 214527, 265895, 327831, 403825, 495234, 606755, 740371, 902507, 1096215, 1329912, 1608445, 1942926, 2340203
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 01 2017

Keywords

Comments

Total sum of odd prime parts in all partitions of n.
Convolution of the sequences A000041 and A005069.

Examples

			a(5) = 11 because we have [5], [4, 1], [3, 2], [3, 1, 1], [2, 2, 1], [2, 1, 1, 1], [1, 1, 1, 1, 1] and 5 + 3 + 3 = 11.
		

Crossrefs

Programs

  • Mathematica
    nmax = 48; Rest[CoefficientList[Series[Sum[Prime[i] x^Prime[i]/(1 - x^Prime[i]), {i, 2, nmax}]/Product[1 - x^j, {j, 1, nmax}], {x, 0, nmax}], x]]

Formula

G.f.: Sum_{i>=2} prime(i)*x^prime(i)/(1 - x^prime(i)) / Product_{j>=1} (1 - x^j).

A281906 Expansion of Sum_{p prime, i>=1} p^i*x^(p^i)/(1 - x^(p^i)) / Product_{j>=1} (1 - x^j).

Original entry on oeis.org

0, 2, 5, 13, 23, 41, 69, 119, 185, 283, 425, 625, 903, 1285, 1799, 2517, 3450, 4699, 6340, 8490, 11264, 14870, 19485, 25390, 32897, 42395, 54372, 69408, 88210, 111612, 140717, 176738, 221135, 275776, 342790, 424743, 524765, 646420, 794109, 972967, 1189105, 1449577, 1763097, 2139394, 2590349, 3129633, 3773546, 4540645
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 01 2017

Keywords

Comments

Total sum of prime power parts (1 excluded) in all partitions of n.
Convolution of the sequences A000041 and A023889.

Examples

			a(5) = 23 because we have [5], [4, 1], [3, 2], [3, 1, 1], [2, 2, 1], [2, 1, 1, 1], [1, 1, 1, 1, 1] and 5 + 4 + 3 + 2 + 3 + 2 + 2 + 2 = 23.
		

Crossrefs

Programs

  • Mathematica
    nmax = 48; Rest[CoefficientList[Series[Sum[Floor[1/PrimeNu[i]] i x^i/(1 - x^i), {i, 2, nmax}]/Product[1 - x^j, {j, 1, nmax}], {x, 0, nmax}], x]]

Formula

G.f.: Sum_{p prime, i>=1} p^i*x^(p^i)/(1 - x^(p^i)) / Product_{j>=1} (1 - x^j).
Showing 1-9 of 9 results.