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

A265248 Sum of the 2nd smallest parts of all the partitions of n (2nd smallest part is defined to be 0 when the partition does not have at least 2 distinct parts).

Original entry on oeis.org

0, 0, 2, 5, 14, 22, 43, 63, 97, 140, 201, 266, 371, 492, 638, 837, 1079, 1377, 1748, 2207, 2756, 3471, 4287, 5317, 6537, 8081, 9840, 12069, 14643, 17837, 21543, 26113, 31385, 37877, 45318, 54433, 64944, 77682, 92341, 109995, 130373, 154769, 182866, 216350, 254905, 300648, 353259, 415392, 486843, 570867
Offset: 1

Views

Author

Emeric Deutsch, Dec 24 2015

Keywords

Comments

a(n) = Sum_{k>=0} k*A265247(n,k).

Examples

			a(4) = 5 because in [4], [3,1], [2,2], [2,1,1], [1,1,1,1] the 2nd smallest parts are 0,3,0,2,0, respectively.
		

Crossrefs

Cf. A265247.

Programs

  • Maple
    g := add(x^i*add(j*x^j/mul(1-x^k, k = j .. 100), j = i+1 .. 100)/(1-x^i), i = 1 .. 100): gser := series(g, x = 0, 60): seq(coeff(gser, x, n), n = 1 .. 50);
    # second Maple program:
    b:= proc(n, i, t) option remember; `if`(n=0, [1, 0],
          `if`(i>n, 0, add((p-> `if`(t=1, p+[0, i*p[1]], p))(
           b(n-i*j, i+1, min(t+1,2))), j=1..n/i)+b(n, i+1, t)))
        end:
    a:= n-> b(n,1,0)[2]:
    seq(a(n), n=1..50);  # Alois P. Heinz, Dec 31 2015
  • Mathematica
    Table[Total@ Flatten@ Map[Take[DeleteDuplicates@ #, {-2}] &, Select[IntegerPartitions@ n, Total@ Differences@ # != 0 && Length@ # >= 2 &]], {n, 50}] (* Michael De Vlieger, Dec 24 2015 *)
    (* Second program: *)
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, {1, 0},
         If[i > n, {0, 0}, Sum[If[t == 1, # + {0, i*#[[1]]}, #]&[
         b[n - i*j, i+1, Min[t+1, 2]]], {j, 1, n/i}] + b[n, i+1, t]]];
    a[n_] := b[n, 1, 0][[2]];
    Array[a, 50] (* Jean-François Alcover, Jun 05 2021, after Alois P. Heinz *)

Formula

G.f.: G(x) = Sum_{i>=1} x^i/(1-x^i)*Sum_{j>=i+1} j*x^j/Product_{k>=j}(1-x^k).
a(n) ~ exp(Pi*sqrt(2*n/3)) / (2*sqrt(3)*n). - Vaclav Kotesovec, Jun 12 2025

A265245 Triangle read by rows: T(n,k) is the number of partitions of n for which the sum of the squares of the parts is k (n>=0, k>=0).

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Emeric Deutsch, Dec 06 2015

Keywords

Comments

Number of entries in row n = 1 + n^2.
Sum of entries in row n = A000041(n).
Sum(k*T(n,k), k>=0) = A066183(n).

Examples

			Row 3 is 0,0,0,1,0,1,0,0,0,1 because in the partitions of 3, namely [1,1,1], [2,1], [3], the sums of the squares of the parts are 3, 5, and 9, respectively.
Triangle starts:
1;
0,1;
0,0,1,0,1;
0,0,0,1,0,1,0,0,0,1;
0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,1.
		

Crossrefs

Programs

  • Maple
    g := 1/(product(1-t^(k^2)*x^k, k = 1 .. 100)): gser := simplify(series(g, x = 0, 15)): for n from 0 to 8 do P[n] := sort(coeff(gser, x, n)) end do: for n from 0 to 8 do seq(coeff(P[n], t, j), j = 0 .. n^2) end do; # yields sequence in triangular form
  • Mathematica
    m = 8; CoefficientList[#, t]& /@ CoefficientList[1/Product[(1 - t^(k^2)* x^k), {k, 1, m}] + O[x]^m, x] // Flatten (* Jean-François Alcover, Feb 19 2019 *)

Formula

G.f.: G(t,x) = 1/Product_{k>=1} (1 - t^{k^2}*x^k).
Showing 1-2 of 2 results.