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

A093695 Number of one-element transitions among partitions of the integer n for unlabeled parts.

Original entry on oeis.org

0, 0, 2, 4, 10, 18, 34, 56, 94, 146, 228, 340, 506, 730, 1050, 1476, 2066, 2844, 3896, 5268, 7090, 9442, 12518, 16454, 21534, 27980, 36210, 46572, 59674, 76056, 96594, 122106, 153852, 193048, 241492, 300974, 374038, 463286, 572304, 704826, 865874, 1060766
Offset: 0

Views

Author

Thomas Wieder, Apr 10 2004

Keywords

Comments

It appears that a(n) = 2 * A000097(n-2). - George Beck, Sep 05 2014
This was proved as noted at A000097. - George Beck, Jan 11 2025
It appears that a(n) = A135348(n+1) - A000070(n). - Thomas Baruchel, May 12 2018

Examples

			In the unlabeled case we have 10 one-element transitions among all partitions of n=4: [1,1,1,1] -> [1,1,2]; [1,1,2] -> [2,2]; [1,1,2] -> [1,3]; [2,2] -> [1,3]; [1,3] -> [4] and [1,1,2] -> [1,1,1,1]; [2,2] -> [1,1,2]; [1,3] -> [1,1,2]; [1,3] -> [2,2]; [4] -> [1,3].
n=5:
partition number p=1 is [1,1,1,1,1], parts d(1,1)=1, d(2,1)=1 contribute 1;
partition number p=2 is [1,1,1,2], parts d(1,1)=1, d(2,2)=1 contribute 1, parts d(1,2)=2, d(4,2)=2 contribute 1;
partition number p=3 is [1,2,2], parts d(1,3)=1, d(2,3)=2 contribute 1, parts d(2,3)=2, d(3,3)=2 contribute 1;
partition number p=4 is [1,1,3], parts d(1,4)=1, d(2,4)=1 contribute 1, parts d(1,4)=1, d(3,4)=3 contribute 1;
partition number p=5 is [2,3], parts d(1,5)=2, d(2,5)=3 contribute 1;
partition number p=6 is [1,4], parts d(1,6)=1, d(2,6)=4 contribute 1;
partition number p=7 is [5], parts d(1,7)=5 contributes 0;
==> a(5)=2*9=18 (factor 2 if we accept up and down transitions).
a(5) = 18 because the 11 partitions of n=5+1=6 have the following sets of parts:
{1} contributes 0, {1, 2} contributes 2, {1, 2} contributes 2,
{2} contributes 0, {1, 3} contributes 2, {1, 2, 3} contributes 6,
{3} contributes 0, {1, 4} contributes 2, {2, 4} contributes 2,
{1, 5} contributes 2, {6} contributes 0,
which gives 0 + 2 + 2 + 0 + 2 + 6 + 0 + 2 + 2 + 2 + 0 = 18.
G.f. = 2*x^2 + 4*x^3 + 10*x^4 + 18*x^5 + 34*x^6 + 56*x^7 + 94*x^8 + ...
		

Crossrefs

Cf. A094533.
Column k=2 of triangle A322210.

Programs

  • Maple
    A093695 := proc(n::integer) local a,ndxp,ListOfPartitions,APartition,PartOfAPartition,SetOfParts, iverbose; with(combinat): iverbose:=1; ListOfPartitions:=partition(n+1); a:=0; for ndxp from 1 to nops(ListOfPartitions) do APartition := ListOfPartitions[ndxp]; SetOfParts := convert(APartition,set); a := a + nops(SetOfParts)^2 - nops(SetOfParts); if iverbose = 1 then print ("ndxp, SetOfParts, nops(SetOfParts)^2 - nops(SetOfParts): ", ndxp,SetOfParts,nops(SetOfParts)^2 - nops(SetOfParts)); fi; # End of do-loop *** ndxp ***. end do; print("n, a(n):",n,a); end proc;
    # second Maple program
    b:= proc(n, i) option remember; local j, f, g;
          if n=0 then [0]
        elif i=1 then [1]
        else f:= b(n, i-1);
             for j to floor(n/i) do f:= zip((x, y)-> x+y,
                 f, `if`(n=i*j, [1], [0, b(n-i*j, i-1)[]]), 0)
             od; f
          fi
        end:
    a:= n-> (l-> add(i*(i-1)*l[i], i=1..nops(l)))(b(n+1, n+1)):
    seq(a(n), n=0..50);  # Alois P. Heinz, Apr 05 2012
  • Mathematica
    a[n_] := Block[{p = IntegerPartitions[n + 1], l = PartitionsP[n + 1]}, Sum[ Length[ Union[ p[[k]]]]^2 - Length[ Union[ p[[k]] ]], {k, l}]]; Table[ a[n], {n, 0, 40}] (* Robert G. Wilson v, Jul 13 2004, updated by Jean-François Alcover, Jan 29 2014 *)

Formula

a(n) = Sum_p=1^P(n) Sum_i=1^D(p) Sum_j=1^D(p) 1 [subject to: i <> j and d(i,p) <= d(j,p) and d(i,p) <> d(i-1,p) (if i > 1) and d(j,i) <> d(j-1,i) (if j > 1 and if d(j-1,p) has given a contribution to the sum) ]; P(n) = number of partitions of n, D(p) = number of parts in partition p, d(i,p) and d(j,p) = parts number i and j in partition p of integer n.
See the corresponding formula for a(n) for the labeled case A094533.
a(n) = Sum_i=1^P(n+1) S(i, n+1)^2 - S(i, n+1), where P(n+1) is the number of integer partitions of n+1 and S(i, n+1) is the number of parts in the set of parts of the i-th partition of n+1. (E.g. the partition [1111233] has the set of parts {1, 2, 3} and would contribute 3^2 - 3 = 6 to the sum.)
G.f.: 2*x^2 / (x^3-x^2-x+1) * Product_{m>=1} (1/(1-x^m)) (conjectured). - Thomas Baruchel, May 12 2018

Extensions

More terms from Robert G. Wilson v, Jul 13 2004

A096541 Number of parts unequal to 1 in all partitions of the integer n. Also the difference between the labeled and the unlabeled case of one-element transitions from the partitions of n to the partitions of n+1.

Original entry on oeis.org

0, 0, 1, 2, 5, 8, 16, 24, 41, 61, 95, 136, 204, 284, 407, 560, 779, 1050, 1432, 1901, 2543, 3338, 4393, 5698, 7411, 9513, 12226, 15562, 19803, 24993, 31538, 39506, 49456, 61546, 76499, 94603, 116858, 143679, 176431, 215802, 263576, 320796, 389900
Offset: 0

Views

Author

Thomas Wieder, Jun 24 2004

Keywords

Comments

Also column 2 of A181187. - Omar E. Pol, Feb 18 2012
Sum over all partitions of n of the difference between the number of parts and the number of distinct parts. - Alois P. Heinz, Nov 18 2020

Examples

			The partitions of n=5 are [11111], [1112], [113], [122], [23], [14], [5] and they contain 0 + 1 + 1 + 2 + 2 + 1 + 1 = 8 = A096541(5) parts unequal to 1.
		

Crossrefs

Programs

  • Maple
    main := proc(n::integer) local a,ndxp,ndxprt,ListOfPartitions,iverbose; with(combinat): ListOfPartitions:=partition(n); a:=0; for ndxp from 1 to nops(ListOfPartitions) do for ndxprt from 1 to nops(ListOfPartitions[ndxp]) do if op(ndxprt,ListOfPartitions[ndxp]) <> 1 then a := a + 1; fi; end do; end do; print("n, a(n):",n,a); end proc;
    # second Maple program:
    b:= proc(n, i) option remember; local f, g;
          if n=0 or i=1 then [1, 0]
        else f:= b(n, i-1); g:= `if`(i>n, [0, 0], b(n-i, i));
             [f[1]+g[1], f[2]+g[2]+g[1]]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=0..60); # Alois P. Heinz, Apr 04 2012
  • Mathematica
    f[n_] := Block[{l = Sort[ Flatten[ IntegerPartitions[n]]]}, Length[l] - Count[l, 1]]; Table[ f[n], {n, 0, 20}] (* Robert G. Wilson v, Jun 30 2004 *)
    a[n_] := Sum[(DivisorSigma[0, k] - 1)*PartitionsP[n - k], {k, 1, n}]; Table[a[n], {n, 0, 42}] (* Jean-François Alcover, Jan 14 2013, after Vladeta Jovovic *)
  • PARI
    a(n)=sum(k=1,n,(numdiv(k)-1)*numbpart(n-k)) \\ Charles R Greathouse IV, Jan 14 2013

Formula

a(n) = A093694(n) - A000070(n).
a(n) = Sum_{k=1..n} (tau(k)-1)*numbpart(n-k). - Vladeta Jovovic, Jun 26 2004
a(n) ~ exp(Pi*sqrt(2*n/3))*(2*gamma - 2 + log(6*n/Pi^2))/(4*Pi*sqrt(2*n)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Oct 24 2016
a(n) = Sum_{i=1..floor(n/2)} A066633(n-i,i). - George Beck, Feb 15 2020
G.f.: Sum_{k>=1} x^(2*k)/(1 - x^k) / Product_{j>=1} (1 - x^j). - Ilya Gutkovskiy, Mar 05 2021

Extensions

More terms from Robert G. Wilson v, Jun 30 2004

A258472 Number of partitions of n into two sorts of parts having exactly 2 parts of the second sort.

Original entry on oeis.org

1, 4, 11, 24, 49, 89, 158, 262, 428, 667, 1033, 1542, 2289, 3313, 4765, 6717, 9427, 13011, 17882, 24260, 32763, 43775, 58268, 76837, 100953, 131629, 171003, 220683, 283877, 363016, 462794, 587005, 742332, 934536, 1173293, 1467022, 1829538, 2273365, 2817858
Offset: 2

Views

Author

Alois P. Heinz, May 31 2015

Keywords

Crossrefs

Column k=2 of A256193.
Cf. A094533.

Programs

  • Maple
    b:= proc(n, i) option remember; series(`if`(n=0, 1,
          `if`(i<1, 0, add(b(n-i*j, i-1)*add(x^t*
           binomial(j, t), t=0..min(2, j)), j=0..n/i))), x, 3)
        end:
    a:= n-> coeff(b(n$2), x, 2):
    seq(a(n), n=2..40);
  • Mathematica
    ((Log[1 - x]^2 - Log[1 - x] Log[x] + QPolyGamma[1, x] (2 Log[1 - x] - Log[x] + QPolyGamma[1, x]) + QPolyGamma[1, 1, x])/(2 QPochhammer[x] Log[x]^2) + O[x]^45)[[3]] // Simplify (* Vladimir Reshetnikov, Nov 21 2016 *)
    Table[SeriesCoefficient[1/QPochhammer[q + x, q], {x, 0, 2}, {q, 0, n}], {n, 0, 40}] // Simplify (* Vladimir Reshetnikov, Nov 22 2016 *)

Formula

a(n) = A094533(n)/2. - Vladimir Reshetnikov, Nov 21 2016
Showing 1-3 of 3 results.