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 11-16 of 16 results.

A089055 Solution to the non-squashing boxes problem (version 2).

Original entry on oeis.org

2, 4, 8, 16, 28, 46, 72, 108, 156, 218, 298, 398, 524, 678, 868, 1096, 1372, 1698, 2086, 2538, 3070, 3684, 4398, 5214, 6156, 7226, 8450, 9830, 11400, 13162, 15152, 17372, 19868, 22642, 25742, 29170, 32986, 37192, 41850, 46962, 52606, 58784, 65576, 72984, 81106
Offset: 0

Views

Author

N. J. A. Sloane, Dec 04 2003

Keywords

Comments

Given n+1 boxes labeled 0..n, such that box i weighs i grams and can support a total weight of i grams; a(n) = number of stacks of boxes that can be formed such that no box is squashed.

Crossrefs

Cf. A000123, A088567. Equals 2*A089054. Row sums of A089239.

Formula

See A089054 for g.f.

A110036 Constant terms of the partial quotients of the continued fraction expansion of 1 + Sum_{n>=0} 1/x^(2^n), where each partial quotient has the form {x + a(n)} after the initial constant term of 1.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Jul 08 2005

Keywords

Comments

Suggested by Ralf Stephan.
For n>1, |a(n)| = 2*A090678(n) where A090678(n) = A088567(n) mod 2 and A088567(n) = number of "non-squashing" partitions of n into distinct parts.

Examples

			1 + 1/x + 1/x^2 + 1/x^4 + 1/x^8 + 1/x^16 + ... =
[1; x - 1, x + 2, x, x, x - 2, x, x + 2, x, x - 2, ...].
		

Crossrefs

Programs

  • PARI
    contfrac(1+sum(n=0,10,1/x^(2^n)))
    
  • PARI
    a(n)=polcoeff((1-x+3*x^2+x^3)/(1+x^2)- 2*sum(k=1,#binary(n),x^(3*2^(k-1))/prod(j=0,k,1+x^(2^j)+x*O(x^n))),n)
    
  • PARI
    a(n)=subst(contfrac(1+sum(k=0,#binary(n+1),1/x^(2^k)))[n+1],x,0)

Formula

G.f. (1-x+3*x^2+x^3)/(1+x^2) - 2*Sum_{k>=1} x^(3*2^(k-1))/Product_{j=0..k} (1+x^(2^j)).

A279033 Irregular triangular array: T(n,i) = number of strict partitions of n having crossover index k; see Comments.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 6, 7, 1, 9, 1, 10, 2, 13, 2, 14, 4, 18, 4, 19, 8, 24, 8, 25, 13, 32, 14, 33, 21, 42, 22, 43, 33, 54, 35, 55, 49, 69, 53, 70, 72, 87, 78, 88, 103, 1, 109, 112, 1, 110, 145, 1, 136, 160, 137, 200, 3, 168, 220, 2, 169, 275, 4, 206, 303, 3
Offset: 1

Views

Author

Clark Kimberling, Dec 04 2016

Keywords

Comments

Suppose that P = [p(1),p(2),...,p(k)] is a partition of n, where p(1) >= p(2) >= ... >= p(k). The crossover index of P is the least h such that p(1) + ... + p(h) > = n/2. Equivalently for k > 1, p(1) + ... + p(h) >= p(h+1) + ... + p(k). A strict partition is a partition into distinct parts. The n-th row sum is the number of strict partitions of n, A000009. Column 1 counts "non-squashing partitions", as in A088567.
First 32 rows (indexed by column 1):
1... 1
2... 1
3... 2
4... 2
5... 3
6... 4
7... 5
8... 6
9... 7 1
10... 9 1
11... 10 2
12... 13 2
13... 14 4
14... 18 4
15... 19 8
16... 24 8
17... 25 13
18... 32 14
19... 33 21
20... 42 22
21... 43 33
22... 54 35
23... 55 49
24... 69 53
25... 70 72
26... 87 78
27... 88 103 1
28... 109 112 1
29... 110 145 1
30... 136 160
31... 137 200 3
32... 168 220 3

Crossrefs

Programs

  • Mathematica
    p[n_] := p[n] = Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &];
    t[n_, k_] := t[n, k] = p[n][[k]];
    q[n_, k_] := q[n, k] = Select[Range[50], Sum[t[n, k][[i]], {i, 1, #}] >= n/2 &, 1];
    u[n_] := u[n] = Flatten[Table[q[n, k], {k, 1, Length[p[n]]}]];
    c1[n_, k_] := c1[n, k] = Count[u[n], k];
    m[n_] := -1 + Min[Flatten[Position[Table[c1[n, k], {k, 1, n + 1}], 0]]]
    u = Table[c1[n, k], {n, 1, 50}, {k, 1, m[n]}]
    TableForm[u] (* A279033 array *)
    Flatten[u]   (* A279033 sequence *)

A242634 G.f. A(x) satisfies A(x) = A(x^2) / (1 - x) + x / (1 - x^2).

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 4, 5, 6, 7, 9, 10, 13, 14, 18, 19, 24, 25, 31, 32, 40, 41, 50, 51, 63, 64, 77, 78, 95, 96, 114, 115, 138, 139, 163, 164, 194, 195, 226, 227, 266, 267, 307, 308, 357, 358, 408, 409, 471, 472, 535, 536, 612, 613, 690, 691, 785, 786, 881, 882
Offset: 0

Views

Author

Michael Somos, May 19 2014

Keywords

Examples

			G.f. = x + x^2 + 2*x^3 + 2*x^4 + 3*x^5 + 4*x^6 + 5*x^7 + 6*x^8 + 7*x^9 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, Module[{A = 0}, Do[A = (x + (1 + x) (A /. x -> x^2)) / (1 - x^2), {IntegerLength[ n, 2]}]; SeriesCoefficient[ A, {x, 0, n}]]];
  • PARI
    {a(n) = my(A = O(x)); if( n<0, 0, for(k=1, #binary(n), A = (x + (1 + x) * subst(A, x, x^2)) / (1 - x^2)); polcoeff(A, n))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=0, #binary(n\3), x^(2^k*3 \ 2) / prod(j=0, k, 1 - x^2^j), x * O(x^n)), n))};

Formula

G.f.: x / (1 - x) + Sum_{k>0} x^(3*2^(k-1)) / Product_{j=0..k} (1 - x^(2^j)).
a(n) = a(n-2) + a(floor(n/2)) unless n=1.
a(n) = A088585(n) - A088585(n-1) if n>=1.
a(n) = A088567(n) if n>0.
a(2*n + 1) = a(2*n) + 1 = A088585(n) if n>=0.

A089198 Triangle read by rows: T(n,k) (n>=0, 0<=k<=n) = number of non-squashing partitions of n into distinct parts of which the greatest is k.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 10 2003

Keywords

Examples

			Triangle begins:
1
0 1
0 0 1
0 0 1 1
0 0 0 1 1
0 0 0 1 1 1
0 0 0 1 1 1 1
0 0 0 0 2 1 1 1
0 0 0 0 1 2 1 1 1
		

Crossrefs

Row sums = A088567. Rows read from right to left also give (essentially) A088567.

Programs

  • Mathematica
    T[n_, m_] := T[n, m] = Which[n==m, 1, mn, 0, True, Sum[T[n-m, i], {i, 0, m-1}]];
    Table[T[n, m], {n, 0, 12}, {m, 0, n}] // Flatten (* Jean-François Alcover, Feb 13 2019 *)

Formula

The nonzero values of T(n, m) lie within a certain cone: T(n, m) = 0 if m < n/2 or if m > n. For m <= n <= 2m, T(n, m) = sum_{i=0}^{m-1} T(n-m, i).
For m <= n <= 2m, T(n, m) = b(n-m) if n < 2m, = b(n-m) - 1 if n = 2m, where b = A088567.

A121241 Change 0 to -1 in A090678.

Original entry on oeis.org

1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1
Offset: 0

Views

Author

Philippe Deléham, Aug 22 2006

Keywords

Formula

a(n) = (-1)^(1+A088567(n)).
Previous Showing 11-16 of 16 results.