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.

Previous Showing 21-30 of 34 results. Next

A339416 Number of compositions (ordered partitions) of n into an even number of triangular numbers.

Original entry on oeis.org

1, 0, 1, 0, 3, 0, 6, 2, 13, 6, 28, 20, 61, 56, 135, 148, 308, 380, 707, 950, 1654, 2340, 3897, 5714, 9252, 13858, 22055, 33492, 52735, 80744, 126313, 194376, 302906, 467506, 726862, 1123830, 1744947, 2700682, 4190016, 6488824, 10062649, 15588714, 24168232, 37447884
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 03 2020

Keywords

Examples

			a(9) = 6 because we have [6, 3], [3, 6], [6, 1, 1, 1], [1, 6, 1, 1], [1, 1, 6, 1] and [1, 1, 1, 6].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; local r, f, g;
          if n=0 then t else r, f, g:=$0..2; while f<=n
          do r, f, g:= r+b(n-f, 1-t), f+g, g+1 od; r fi
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..50);  # Alois P. Heinz, Dec 03 2020
  • Mathematica
    nmax = 43; CoefficientList[Series[(1/2) (1/(1 - Sum[x^(k (k + 1)/2), {k, 1, nmax}]) + 1/Sum[x^(k (k + 1)/2), {k, 0, nmax}]), {x, 0, nmax}], x]

Formula

G.f.: (1/2) * (1 / (1 - Sum_{k>=1} x^(k*(k + 1)/2)) + 1 / Sum_{k>=0} x^(k*(k + 1)/2)).
a(n) = (A023361(n) + A106507(n)) / 2.
a(n) = Sum_{k=0..n} A023361(k) * A106507(n-k).

A339417 Number of compositions (ordered partitions) of n into an odd number of triangular numbers.

Original entry on oeis.org

0, 1, 0, 2, 0, 4, 1, 9, 3, 19, 12, 41, 33, 91, 92, 203, 238, 466, 602, 1080, 1493, 2536, 3661, 6001, 8902, 14278, 21554, 34094, 52013, 81602, 125297, 195582, 301475, 469193, 724881, 1126161, 1742206, 2703888, 4186276, 6493192, 10057553, 15594636, 24161364, 37455851
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 03 2020

Keywords

Examples

			a(8) = 3 because we have [6, 1, 1], [1, 6, 1] and [1, 1, 6].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; local r, f, g;
          if n=0 then t else r, f, g:=$0..2; while f<=n
          do r, f, g:= r+b(n-f, 1-t), f+g, g+1 od; r fi
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Dec 03 2020
  • Mathematica
    nmax = 43; CoefficientList[Series[(1/2) (1/(1 - Sum[x^(k (k + 1)/2), {k, 1, nmax}]) - 1/Sum[x^(k (k + 1)/2), {k, 0, nmax}]), {x, 0, nmax}], x]

Formula

G.f.: (1/2) * (1 / (1 - Sum_{k>=1} x^(k*(k + 1)/2)) - 1 / Sum_{k>=0} x^(k*(k + 1)/2)).
a(n) = (A023361(n) - A106507(n)) / 2.
a(n) = -Sum_{k=0..n-1} A023361(k) * A106507(n-k).

A224678 L.g.f.: -log(1 - Sum_{n>=1} x^(n*(n+1)/2)) = Sum_{n>=1} a(n)*x^n/n.

Original entry on oeis.org

1, 1, 4, 5, 6, 16, 22, 29, 49, 86, 122, 188, 300, 456, 714, 1117, 1718, 2653, 4124, 6390, 9916, 15368, 23806, 36884, 57181, 88622, 137344, 212896, 329934, 511316, 792516, 1228285, 1903598, 2950334, 4572602, 7086833, 10983562, 17022956, 26382984, 40889694, 63373086, 98218920
Offset: 1

Views

Author

Paul D. Hanna, Apr 14 2013

Keywords

Examples

			L.g.f.: L(x) = x + x^2/2 + 4*x^3/3 + 5*x^4/4 + 6*x^5/5 + 16*x^6/6 + 22*x^7/7 + 29*x^8/8 + 49*x^9/9 + 86*x^10/10 +...
where
exp(L(x)) = 1 + x + x^2 + 2*x^3 + 3*x^4 + 4*x^5 + 7*x^6 + 11*x^7 + 16*x^8 + 25*x^9 + 40*x^10 + 61*x^11 + 94*x^12 +...+ A023361(n)*x^n +...
exp(-L(x)) = 1 - x - x^3 - x^6 - x^10 - x^21 - x^28 +...+ -x^(n*(n+1)/2) +...
		

Crossrefs

Programs

  • PARI
    {a(n)=n*polcoeff(-log(1-sum(r=1, sqrtint(2*n+1), x^(r*(r+1)/2)+x*O(x^n))), n)}
    for(n=1, 50, print1(a(n), ", "))

Formula

Logarithmic derivative of A023361, where A023361(n) = number of compositions of n into positive triangular numbers.

A224680 a(n) = A224678(n^2).

Original entry on oeis.org

1, 5, 49, 1117, 57181, 7086833, 2109733585, 1508630963069, 2591308566579217, 10691434112980070315, 105957942450483004330197, 2522387398320711543274084153, 144235039901139444727535460625985, 19811186631607253937472121882634566325
Offset: 1

Views

Author

Paul D. Hanna, Apr 14 2013

Keywords

Comments

A224678 is the logarithmic derivative of A023361, where A023361(n) = number of compositions of n into positive triangular numbers.

Examples

			L.g.f.: L(x) = x + 5*x^2/2 + 49*x^3/3 + 1117*x^4/4 + 57181*x^5/5 + 7086833*x^6/6 +...
where
exp(L(x)) = 1 + x + 3*x^2 + 19*x^3 + 300*x^4 + 11768*x^5 + 1193594*x^6 +...+ A224681(n)*x^n +...
		

Crossrefs

Programs

  • PARI
    {a(n)=n^2*polcoeff(-log(1-sum(r=1, 2*n+1, x^(r*(r+1)/2)+x*O(x^(n^2)))), n^2)}
    for(n=1, 20, print1(a(n), ", "))

Formula

Logarithmic derivative of A224681.

A301334 a(n) = [x^n] 1/(1 + n*(1 - theta_2(sqrt(x))/(2*x^(1/8)))), where theta_2() is the Jacobi theta function.

Original entry on oeis.org

1, 1, 4, 30, 288, 3500, 51882, 908705, 18376192, 421518897, 10815546010, 306954846231, 9547629128208, 322979502072591, 11805623386524688, 463679308850798265, 19474458473055138816, 870962008703995217038, 41324081662873427484240, 2073203796753598883831150, 109655938011610286565760400
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 18 2018

Keywords

Comments

Number of compositions (ordered partitions) of n into triangular numbers of n kinds.

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[1/(1 + n (1 - EllipticTheta[2, 0, Sqrt[x]]/(2 x^(1/8)))), {x, 0, n}], {n, 0, 20}]
    Table[SeriesCoefficient[1/(1 - n Sum[x^(k (k + 1)/2), {k, 1, n}]), {x, 0, n}], {n, 0, 20}]

Formula

a(n) = [x^n] 1/(1 - n*Sum_{k>=1} x^(k*(k+1)/2)).
a(n) ~ n^n * (1 + 1/n - 3/(2*n^2) - 13/(3*n^3) + 181/(24*n^4) + 2251/(120*n^5) - 34949/(720*n^6) - 221539/(2520*n^7) + 13489169/(40320*n^8) + ...). - Vaclav Kotesovec, Mar 19 2018

A348529 Number of compositions (ordered partitions) of n into two or more triangular numbers.

Original entry on oeis.org

0, 0, 1, 1, 3, 4, 6, 11, 16, 25, 39, 61, 94, 147, 227, 350, 546, 846, 1309, 2030, 3147, 4875, 7558, 11715, 18154, 28136, 43609, 67586, 104747, 162346, 251610, 389958, 604381, 936699, 1451743, 2249991, 3487152, 5404570, 8376292, 12982016, 20120202, 31183350, 48329596, 74903735
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 21 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add(
         `if`(issqr(8*j+1), b(n-j), 0), j=1..n))
        end:
    a:= n-> b(n)-`if`(issqr(8*n+1), 1, 0):
    seq(a(n), n=0..43);  # Alois P. Heinz, Oct 21 2021
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Sum[
         If[IntegerQ@ Sqrt[8*j + 1], b[n - j], 0], {j, 1, n}]];
    a[n_] := b[n] - If[IntegerQ@ Sqrt[8*n + 1], 1, 0];
    Table[a[n], {n, 0, 43}] (* Jean-François Alcover, Mar 01 2022, after Alois P. Heinz *)

Formula

a(n) = A023361(n) - A010054(n). - Alois P. Heinz, Oct 21 2021

A117632 Number of 1's required to build n using {+,T} and parentheses, where T(i) = i*(i+1)/2.

Original entry on oeis.org

1, 2, 2, 3, 4, 2, 3, 4, 4, 3, 4, 4, 5, 6, 4, 5, 6, 6, 7, 6, 2, 3, 4, 4, 5, 6, 4, 3, 4, 5, 5, 6, 6, 5, 6, 4, 5, 6, 6, 7, 8, 4, 5, 6, 4, 5, 6, 6, 5, 6, 6, 7, 8, 8, 3, 4, 5, 5, 6, 7, 5, 6, 6, 7, 6, 4, 5, 6, 6, 7, 8, 6, 7, 8, 8, 5, 6, 4, 5, 6, 6, 7, 6, 6, 7, 8, 6, 7, 8, 8, 5, 6, 7, 7, 8, 9, 7, 8, 6, 7, 8, 8
Offset: 1

Views

Author

Jonathan Vos Post, Apr 08 2006

Keywords

Comments

This problem has the optimal substructure property.

Examples

			a(1) = 1 because "1" has a single 1.
a(2) = 2 because "1+1" has two 1's.
a(3) = 2 because 3 = T(1+1) has two 1's.
a(6) = 2 because 6 = T(T(1+1)).
a(10) = 3 because 10 = T(T(1+1)+1).
a(12) = 4 because 12 = T(T(1+1)) + T(T(1+1)).
a(15) = 4 because 15 = T(T(1+1)+1+1).
a(21) = 2 because 21 = T(T(T(1+1))).
a(28) = 3 because 28 = T(T(T(1+1))+1).
a(55) = 3 because 55 = T(T(T(1+1)+1)).
		

References

  • W. A. Beyer, M. L. Stein and S. M. Ulam, The Notion of Complexity. Report LA-4822, Los Alamos Scientific Laboratory of the University of California, Los Alamos, NM, 1971.
  • R. K. Guy, Unsolved Problems Number Theory, Sect. F26.

Crossrefs

See also A023361 = number of compositions into sums of triangular numbers, A053614 = numbers that are not the sum of triangular numbers. Iterated triangular numbers: A050536, A050542, A050548, A050909, A007501.

Programs

  • Maple
    a:= proc(n) option remember; local m; m:= floor (sqrt (n*2));
          if n<3 then n
        elif n=m*(m+1)/2 then a(m)
        else min (seq (a(i)+a(n-i), i=1..floor(n/2)))
          fi
        end:
    seq (a(n), n=1..110);  # Alois P. Heinz, Jan 05 2011
  • Mathematica
    a[n_] := a[n] = Module[{m = Floor[Sqrt[n*2]]}, If[n < 3, n, If[n == m*(m + 1)/2, a[m], Min[Table[a[i] + a[n - i], {i, 1, Floor[n/2]}]]]]];
    Array[a, 110] (* Jean-François Alcover, Jun 02 2018, from Maple *)

Extensions

I do not know how many of these entries have been proved to be minimal. - N. J. A. Sloane, Apr 15 2006
Corrected and extended by Alois P. Heinz, Jan 05 2011

A208061 G.f. 1/sum(k>=0, (-1)^k * x^(k*(k+1)/2)).

Original entry on oeis.org

1, 1, 1, 0, -1, -2, -1, 1, 4, 5, 2, -5, -12, -13, -3, 17, 34, 32, -1, -54, -93, -72, 28, 169, 248, 152, -147, -510, -646, -282, 582, 1484, 1627, 375, -2045, -4195, -3927, 110, 6716, 11544, 9002, -3458, -20996, -30921, -19123, 17974, 63154, 80435, 35553, -71525, -183969
Offset: 0

Views

Author

Keywords

Examples

			G.f. = 1 + x + x^2 - x^4 - 2*x^5 - x^6 + x^7 + 4*x^8 + 5*x^9 + 2*x^10 - 5*x^11 + ...
		

Crossrefs

Programs

  • PARI
    al(n)=Vec(1/(sum(k=0,sqrtint(2*n),(-1)^k*x^(k*(k+1)\2))+x*O(x^n)))

Formula

G.f.: 1 / (1 - x*(1 - x^2*(1 - x^3*(1 - x^4*(1 - ...))))). - Michael Somos, Mar 03 2014
Convolution inverse of A197870. - Michael Somos, Mar 03 2014

A224681 G.f.: exp( Sum_{n>=1} A224678(n^2) * x^n/n ).

Original entry on oeis.org

1, 1, 3, 19, 300, 11768, 1193594, 302611474, 188884066846, 288112683033594, 1069431906358800731, 9633610233639395592895, 210208585613243673600527636, 11095213297186302234251136888284, 1415095855034367649056280021793496073, 435753686684779400844511781608578944222819
Offset: 0

Views

Author

Paul D. Hanna, Apr 14 2013

Keywords

Comments

A224678 is the logarithmic derivative of A023361, where A023361(n) = number of compositions of n into positive triangular numbers.

Examples

			G.f.: A(x) = 1 + x + 3*x^2 + 19*x^3 + 300*x^4 + 11768*x^5 + 1193594*x^6 +...
where
log(A(x)) = x + 5*x^2/2 + 49*x^3/3 + 1117*x^4/4 + 57181*x^5/5 + 7086833*x^6/6 +...+ A224678(n^2)*x^n/n +...
		

Crossrefs

Programs

  • PARI
    {A224678(n)=n*polcoeff(-log(1-sum(r=1, sqrtint(2*n+1), x^(r*(r+1)/2)+x*O(x^n))), n)}
    {a(n)=polcoeff(exp(sum(m=1, n, A224678(m^2)*x^m/m)+x*O(x^n)), n)}
    for(n=0, 20, print1(a(n), ", "))

Formula

Logarithmic derivative yields A224680.

A281810 Expansion of Sum_{i>=1} x^(i*(i+1)/2) / (1 - Sum_{j>=1} x^(j*(j+1)/2))^2.

Original entry on oeis.org

1, 2, 4, 8, 14, 25, 45, 77, 131, 224, 377, 629, 1049, 1738, 2863, 4708, 7716, 12598, 20524, 33363, 54102, 87567, 141489, 228216, 367538, 591098, 949372, 1522917, 2440190, 3905747, 6245198, 9976535, 15923083, 25392755, 40462155, 64426278, 102510580, 162997910, 259010672, 411328655, 652842792, 1035591110
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 30 2017

Keywords

Comments

Total number of parts in all compositions (ordered partitions) of n into nonzero triangular numbers (A000217).

Examples

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

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, [1, 0], add(
          (p-> p+[0, p[1]])(b(n-j*(j+1)/2)), j=1..isqrt(2*n)))
        end:
    a:= n-> b(n)[2]:
    seq(a(n), n=1..55);  # Alois P. Heinz, Aug 07 2019
  • Mathematica
    nmax = 42; Rest[CoefficientList[Series[Sum[x^(i (i + 1)/2), {i, 1, nmax}]/(1 - Sum[x^(j (j + 1)/2), {j, 1, nmax}])^2, {x, 0, nmax}], x]]
    nmax = 42; Rest[CoefficientList[Series[(2 x^(1/8) EllipticTheta[2, 0, Sqrt[x]] - 4 x^(1/4))/(4 x^(1/8) - EllipticTheta[2, 0, Sqrt[x]])^2, {x, 0, nmax}], x]]

Formula

G.f.: Sum_{i>=1} x^(i*(i+1)/2) / (1 - Sum_{j>=1} x^(j*(j+1)/2))^2.
Previous Showing 21-30 of 34 results. Next