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

A073118 Total sum of prime parts in all partitions of n.

Original entry on oeis.org

0, 2, 5, 9, 19, 33, 57, 87, 136, 206, 311, 446, 650, 914, 1284, 1762, 2432, 3276, 4433, 5888, 7824, 10272, 13479, 17471, 22642, 29087, 37283, 47453, 60306, 76112, 95931, 120201, 150338, 187141, 232507, 287591, 355143, 436849, 536347, 656282, 801647, 976095
Offset: 1

Views

Author

Vladeta Jovovic, Aug 24 2002

Keywords

Examples

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

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), t[1]*i*j, 0)]
             od; h
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..50);  # Alois P. Heinz, Nov 20 2011
  • Mathematica
    f[n_] := Apply[Plus, Select[ Flatten[ IntegerPartitions[n]], PrimeQ[ # ] & ]]; Table[ f[n], {n, 1, 41} ]
    a[n_] := Sum[Total[FactorInteger[k][[All, 1]]]*PartitionsP[n-k], {k, 1, n}] - PartitionsP[n-1]; Array[a, 50] (* Jean-François Alcover, Dec 27 2015 *)
  • PARI
    a(n)={sum(k=1, n, vecsum(factor(k)[, 1])*numbpart(n-k))} \\ Andrew Howroyd, Dec 28 2017

Formula

a(n) = Sum_{k=1..n} A008472(k)*A000041(n-k).
G.f.: Sum_{i>=1} prime(i)*x^prime(i)/(1 - x^prime(i)) / Product_{j>=1} (1 - x^j). - Ilya Gutkovskiy, Feb 01 2017

Extensions

Edited and extended by Robert G. Wilson v, Aug 26 2002

A102291 Total number of prime parts in all compositions of n.

Original entry on oeis.org

0, 0, 1, 3, 7, 18, 42, 98, 222, 497, 1100, 2413, 5250, 11350, 24398, 52193, 111180, 235949, 499074, 1052502, 2213710, 4644833, 9724492, 20318637, 42376578, 88231765, 183420748, 380755932, 789340736, 1634339217, 3379993922, 6982618822, 14410499598, 29711523105
Offset: 0

Views

Author

Vladeta Jovovic, Feb 19 2005

Keywords

Crossrefs

Programs

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

Formula

G.f.: Sum_{k>=1} x^prime(k)*(1-x)^2/(1-2*x)^2.
a(n) = Sum_{k=1..floor(n/2)} k * A224344(n,k). - Alois P. Heinz, Aug 06 2019

Extensions

More terms from Joshua Zucker, May 10 2006

A144115 Total number of Fibonacci parts in all partitions of n.

Original entry on oeis.org

1, 3, 6, 11, 19, 32, 49, 77, 114, 169, 241, 345, 480, 667, 910, 1237, 1656, 2213, 2918, 3840, 5003, 6497, 8368, 10751, 13711, 17441, 22052, 27806, 34879, 43645, 54355, 67535, 83571, 103171, 126907, 155766, 190554, 232629, 283158, 343969, 416716, 503900, 607807
Offset: 1

Views

Author

Omar E. Pol, Sep 11 2008

Keywords

Comments

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

Examples

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

Crossrefs

Programs

Formula

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

Extensions

More terms from Alois P. Heinz, Jun 24 2009

A222656 Number T(n,k) of partitions of n using exactly k primes; triangle T(n,k), n>=0, 0<=k<=floor(n/2), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 3, 2, 3, 4, 3, 1, 3, 6, 4, 2, 5, 7, 6, 3, 1, 6, 9, 8, 5, 2, 8, 11, 12, 7, 3, 1, 8, 17, 14, 10, 5, 2, 12, 20, 19, 14, 8, 3, 1, 13, 26, 25, 19, 11, 5, 2, 17, 31, 35, 24, 16, 8, 3, 1, 19, 41, 42, 34, 21, 12, 5, 2, 26, 47, 56, 44, 29
Offset: 0

Views

Author

Alois P. Heinz, May 29 2013

Keywords

Examples

			T(6,0) = 3: [6], [4,1,1], [1,1,1,1,1,1].
T(6,1) = 4: [5,1], [4,2], [3,1,1,1], [2,1,1,1,1].
T(6,2) = 3: [3,3], [3,2,1], [2,2,1,1].
T(6,3) = 1: [2,2,2].
Triangle T(n,k) begins:
  1;
  1;
  1,  1;
  1,  2;
  2,  2,  1;
  2,  3,  2;
  3,  4,  3,  1;
  3,  6,  4,  2;
  5,  7,  6,  3, 1;
  6,  9,  8,  5, 2;
  8, 11, 12,  7, 3, 1;
  8, 17, 14, 10, 5, 2;
  ...
		

Crossrefs

Column k=0 gives: A002095.
Row sums give: A000041.

Programs

  • Maple
    b:= proc(n, i) option remember; local j; if n=0 then 1 elif i<1 then 0
          else []; for j from 0 to n/i do zip((x, y)->x+y, %,
          [`if`(isprime(i), 0$j, NULL), b(n-i*j, i-1)], 0) od; %[] fi
        end:
    T:= n-> b(n$2):
    seq(T(n), n=0..16);
  • Mathematica
    zip[f_, x_List, y_List, z_] := With[{m = Max[Length[x], Length[y]]}, Thread[f[PadRight[x, m, z], PadRight[y, m, z]]]]; b[n_, i_] := b[n, i] = Module[{j, pc}, Which[n == 0, {1}, i<1, {0}, True, pc = {}; For[j = 0, j <= n/i, j++, pc = zip[Plus, pc, Join[If[PrimeQ[i], Array[0&, j], {}], b[n-i*j, i-1]], 0]]; pc]]; T[n_] := b[n, n]; Table[T[n], {n, 0, 16}] // Flatten (* Jean-François Alcover, Jan 29 2014, after Alois P. Heinz *)

Formula

Sum_{k=1..floor(n/2)} k * T(n,k) = A037032(n).
G.f.: G(t,x) = Product_{i>=1} (1 - x^prime(i))/((1 - x^i)*(1 - t*x^prime(i))). - Emeric Deutsch, Nov 11 2015

A073335 Total number of prime power parts in all partitions of n.

Original entry on oeis.org

0, 1, 2, 5, 8, 15, 23, 39, 58, 89, 128, 189, 264, 375, 515, 713, 960, 1301, 1726, 2298, 3011, 3948, 5113, 6625, 8492, 10880, 13825, 17545, 22108, 27823, 34800, 43465, 54003, 66983, 82709, 101960, 125180, 153432, 187397, 228490, 277707, 336972
Offset: 1

Views

Author

Vladeta Jovovic, Aug 22 2002

Keywords

Examples

			a(4)=5 because in all partitions of 4 we have 5 powers of primes (shown between parentheses): (4), (3)1, (2)(2), (2)11, 1111.
		

Crossrefs

Programs

  • Maple
    with(numtheory): with(combinat): a:= n-> add(bigomega(k)*numbpart(n-k), k=1..n): seq(a(n), n=1..46); # Emeric Deutsch, Feb 26 2005
  • Mathematica
    Table[Sum[PrimeOmega[k]*PartitionsP[n - k], {k, 1, n}], {n, 1, 50}] (* G. C. Greubel, May 05 2017 *)
  • PARI
    a(n) = sum(k=1, n, bigomega(k)*numbpart(n-k)); \\ Michel Marcus, May 05 2017

Formula

a(n) = Sum_{k=1..n} bigomega(k)*numbpart(n-k).
G.f.: Sum_{i>=2} floor(1/omega(i))*x^i/(1 - x^i) / Product_{j>=1} (1 - x^j), where omega() is the number of distinct prime factors (A001221). - Ilya Gutkovskiy, Jan 24 2017

Extensions

More terms from Emeric Deutsch, Feb 26 2005

A144119 Total number of nonprime parts in all partitions of n.

Original entry on oeis.org

1, 2, 4, 8, 13, 22, 34, 54, 80, 119, 170, 246, 342, 478, 653, 894, 1198, 1610, 2127, 2813, 3672, 4789, 6181, 7975, 10192, 13010, 16488, 20861, 26224, 32918, 41086, 51199, 63494, 78599, 96888, 119235, 146167, 178879, 218181, 265662, 322487, 390834, 472343
Offset: 1

Views

Author

Omar E. Pol, Sep 11 2008

Keywords

Comments

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

Examples

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

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local g;
          if n=0 then [1, 0]
        elif i<1 then [0, 0]
        else g:= `if`(i>n, [0$2], b(n-i, i));
             b(n, i-1) +g +[0, `if`(isprime(i), 0, g[1])]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 27 2012
  • Mathematica
    b[n_, i_] := b[n, i] = Module[{g}, If[n == 0, {1, 0}, If[i<1, {0, 0}, g = If[i>n, {0, 0}, b[n-i, i]]; b[n, i-1] + g + {0, If[PrimeQ[i], 0, g[[1]]]} ]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 29 2015, after Alois P. Heinz *)
  • PARI
    vector(100, n, sum(k=1, n, (numdiv(k)-omega(k))*numbpart(n-k))) \\ Altug Alkan, Oct 29 2015

Formula

a(n) = A006128(n)-A037032(n).

A144120 Number of prime parts in the last section of the set of partitions of n.

Original entry on oeis.org

0, 1, 1, 2, 3, 6, 7, 12, 16, 25, 32, 48, 61, 88, 113, 154, 198, 267, 337, 446, 563, 730, 915, 1174, 1460, 1853, 2294, 2878, 3545, 4416, 5404, 6679, 8144, 9991, 12125, 14791, 17866, 21677, 26084, 31478, 37733, 45340
Offset: 1

Views

Author

Omar E. Pol, Sep 11 2008

Keywords

Comments

First differences of A037032.

Crossrefs

Formula

a(n) = A037032(n)-A037032(n-1).

A183088 Total number of parts that are partition numbers A000041 in all partitions of n.

Original entry on oeis.org

0, 1, 3, 6, 11, 19, 32, 50, 77, 115, 170, 244, 348, 485, 674, 922, 1251, 1678, 2241, 2959, 3892, 5076, 6592, 8497, 10915, 13930, 17719, 22417, 28267, 35474, 44395, 55312, 68730, 85082, 105049, 129261, 158675, 194171, 237077, 288651
Offset: 0

Views

Author

Omar E. Pol, Aug 05 2011

Keywords

Examples

			a(5) = 19 because the 7 partitions of 5 are [5], [4, 1], [3, 2], [3, 1, 1], [2, 2, 1], [2, 1, 1, 1], [1, 1, 1, 1, 1] and we can see that there are 19 parts that are partition numbers A000041. Note that there are 20 parts but the 4 is not a partition number, so a(5) = 20 - 1 = 19.
		

Crossrefs

Programs

  • Mathematica
    A000041 = Table[PartitionsP[n], {n, 0, 45}]; Table[Length[Select[Flatten[IntegerPartitions[n]], MemberQ[A000041, #] &]], {n, 40}] (* Alonso del Arte, Aug 05 2011 *)

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

Original entry on oeis.org

1, 3, 6, 11, 19, 33, 51, 79, 118, 176, 252, 362, 505, 705, 965, 1314, 1765, 2365, 3127, 4124, 5387, 7012, 9052, 11653, 14893, 18982, 24048, 30378, 38176, 47857, 59704, 74302, 92099, 113879, 140300, 172463, 211297, 258325, 314887, 383037, 464684, 562653, 679566, 819269, 985449, 1183242, 1417738, 1695886
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 24 2017

Keywords

Comments

Total number of squarefree parts in all partitions of n.
Convolution of A000041 and A034444.

Examples

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

Crossrefs

Programs

  • Mathematica
    nmax = 48; Rest[CoefficientList[Series[Sum[MoebiusMu[i]^2 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*x^i/(1 - x^i) / Product_{j>=1} (1 - x^j).

A326957 Total number of noncomposite parts in all partitions of n.

Original entry on oeis.org

0, 1, 3, 6, 11, 19, 32, 50, 77, 115, 170, 244, 348, 486, 675, 923, 1253, 1682, 2246, 2968, 3904, 5094, 6616, 8533, 10962, 13997, 17808, 22538, 28426, 35689, 44670, 55678, 69199, 85692, 105826, 130261, 159935, 195778, 239092, 291191, 353854, 428925, 518848
Offset: 0

Views

Author

Omar E. Pol, Aug 08 2019

Keywords

Examples

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

Crossrefs

First differs from A183088 at a(13).

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], 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_] := Sum[PrimeNu[k] PartitionsP[n-k], {k, 1, n}];
    c[n_] := SeriesCoefficient[Product[1/(1-x^k), {k, 1, n}]/(1-x), {x, 0, n}];
    a[n_] := b[n] + c[n-1];
    a /@ Range[0, 50] (* Jean-François Alcover, Nov 15 2020 *)

Formula

a(n) = A037032(n) + A000070(n-1), n >= 1.
a(n) = A006128(n) - A326981(n).
Showing 1-10 of 14 results. Next