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

A108469 Main diagonal of A090806.

Original entry on oeis.org

1, 1, 2, 4, 9, 20, 45, 100, 220, 478, 1025, 2169, 4534, 9364, 19125, 38646, 77306, 153173, 300765, 585518, 1130612, 2166284, 4120062, 7780817, 14595364, 27201794, 50383690, 92768457, 169835952, 309223286, 560036477, 1009124256
Offset: 0

Views

Author

Christian G. Bower, Jun 03 2005

Keywords

References

  • Alter, Ronald; Curtz, Thaddeus B.; Wang, Chung C. Permutations with fixed index and number of inversions. Proceedings of the Fifth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1974), pp. 209-228. Congressus Numerantium, No. X, Utilitas Math., Winnipeg, Man., 1974.

Programs

  • Mathematica
    nmax = 20; p = 1; Do[Do[p = Expand[p*(1 - x^i*y^j)]; p = Select[p, (Exponent[#, x] <= nmax) && (Exponent[#, y] <= nmax) &], {i, 1, nmax}], {j, 1, nmax}]; p = Expand[Normal[Series[1/p, {x, 0, nmax}, {y, 0, nmax}]]]; p = Select[p, Exponent[#, x] == Exponent[#, y] &]; Flatten[{1, Table[Coefficient[p, x^n*y^n], {n, 1, nmax}]}] (* Vaclav Kotesovec, Apr 08 2016 *)

A136405 Triangle read by rows: T(n,k) is the number of bi-partitions of the pair (n,k) into pairs (n_i,k_i) of positive integers such that sum k_i = k and sum n_i*k_i = n.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 3, 2, 5, 1, 2, 4, 3, 7, 1, 4, 6, 7, 5, 11, 1, 3, 7, 8, 11, 7, 15, 1, 5, 8, 16, 14, 17, 11, 22, 1, 4, 12, 14, 23, 21, 25, 15, 30, 1, 6, 12, 24, 29, 38, 33, 37, 22, 42, 1, 5, 15, 24, 41, 42, 57, 47, 52, 30, 56, 1, 7, 18, 37, 47, 75, 68, 87, 70, 74, 42, 77
Offset: 1

Views

Author

Benoit Jubin, Apr 13 2008

Keywords

Examples

			Triangle begins:
  1;
  1, 2;
  1, 1,  3;
  1, 3,  2,  5;
  1, 2,  4,  3,  7;
  1, 4,  6,  7,  5, 11;
  1, 3,  7,  8, 11,  7, 15;
  1, 5,  8, 16, 14, 17, 11, 22;
  1, 4, 12, 14, 23, 21, 25, 15, 30;
  1, 6, 12, 24, 29, 38, 33, 37, 22, 42;
  ...
T(4,2) = 3 since (4,2) can be bi-partitioned as (2,2) or ((1,1),(3,1)) or ((2,1),(2,1)).
T(5,3) = 4 since (5,3) can be bi-partitioned as ((1,1),(2,2)) or ((3,1),(1,2)) or ((1,1),(1,1),(3,1)) or ((1,1),(2,1),(2,1)).
		

Crossrefs

Row sums are A006171.

Programs

  • PARI
    P(k, w, n)={prod(i=1, k, 1 - x^(i*w) + O(x*x^(n-k*w)))}
    T(n)={Vecrev(polcoef(prod(w=1, n, sum(k=0, n\w, (x*y)^(k*w)/P(k,w,n))), n)/y)}
    { for(n=1, 10, print(T(n))) } \\ Andrew Howroyd, Oct 23 2019

Formula

T(n,1) = 1.
T(n,2) = A028242(n).
T(n,n) = A000041(n).

Extensions

Terms a(57) and beyond from Andrew Howroyd, Oct 23 2019

A267862 Number of planar lattice convex polygonal lines joining the origin and the point (n,n).

Original entry on oeis.org

1, 2, 5, 13, 32, 77, 178, 399, 877, 1882, 3959, 8179, 16636, 33333, 65894, 128633, 248169, 473585, 894573, 1673704, 3103334, 5705383, 10405080, 18831761, 33836627, 60378964, 107035022, 188553965, 330166814, 574815804, 995229598, 1714004131, 2936857097
Offset: 0

Views

Author

Christoph Koutschan, Apr 07 2016

Keywords

Comments

In other words, we are counting walks on the integer lattice N^2 that start at (0,0) and end at (n,n); they may take arbitrary steps, but the slopes of the steps in the walk must strictly increase. As a result, we obtain a convex polygon when joining the two endpoints of the walk with the point (0,n).

Examples

			The two walks for n = 1 are
(0,0) -> (1,1)
(0,0) -> (1,0) -> (1,1).
The five possibilities for n = 2 are
(0,0) -> (2,2)
(0,0) -> (1,0) -> (2,1) -> (2,2)
(0,0) -> (1,0) -> (2,2)
(0,0) -> (2,0) -> (2,2)
(0,0) -> (2,1) -> (2,2).
		

Crossrefs

Programs

  • Mathematica
    a[i_Integer, j_Integer, s_] := a[i, j, s] = If[i === 0, 1, Sum[a[i - x, j - y, y/x], {x, 1, i}, {y, Floor[s*x] + 1, j}]]; a[n_Integer] := a[n] = 1 + Sum[a[n - x, n - y, y/x], {x, 1, n}, {y, 0, x - 1}]; Flatten[{1, Table[a[n], {n, 30}]}]
    nmax = 20; p = (1 - x)*(1 - y); Do[Do[p = Expand[p*If[GCD[i, j] == 1, (1 - x^i*y^j), 1]]; p = Select[p, (Exponent[#, x] <= nmax) && (Exponent[#, y] <= nmax) &], {i, 1, nmax}], {j, 1, nmax}]; p = Expand[Normal[Series[1/p, {x, 0, nmax}, {y, 0, nmax}]]]; p = Select[p, Exponent[#, x] == Exponent[#, y] &]; Flatten[{1, Table[Coefficient[p, x^n*y^n], {n, 1, nmax}]}] (* Vaclav Kotesovec, Apr 08 2016 *)

Formula

a(n) = [x^n*y^n] 1/((1-x)*(1-y)*Product_{i>0,j>0,gcd(i,j)=1} (1-x^i*y^j)).
An asymptotic formula for a(n) is given by Bureaux and Enriquez: a(n) ~ e^(-2*zeta'(-1))/((2*Pi)^(7/6)*sqrt(3)*kappa^(1/18)*n^(17/18)) * e^(3*kappa^(1/3)*n^(2/3)+...) where kappa := zeta(3)/zeta(2) and zeta denotes the Riemann zeta function.

A302919 The number of ways of placing 2n-1 white balls and 2n-1 black balls into unlabeled bins such that each bin has both an odd number of white balls and black balls.

Original entry on oeis.org

1, 2, 4, 12, 32, 85, 217, 539, 1316, 3146, 7374, 16969, 38387, 85452, 187456, 405659, 866759, 1830086, 3821072, 7894447, 16148593, 32723147, 65719405, 130871128, 258513076, 506724988, 985968770, 1904992841, 3655873294, 6970687150, 13208622956, 24879427889, 46593011280, 86773920240, 160742462714, 296227087942, 543183754454, 991213989213
Offset: 1

Views

Author

Peter Kagey, Apr 15 2018

Keywords

Examples

			For n = 3 the a(3) = 4 ways to place five white and five black balls are (wwwwwbbbbb), (wwwbbb)(wb)(wb), (wwwb)(wbbb)(wb), and (wb)(wb)(wb)(wb)(wb).
		

Crossrefs

Programs

  • Mathematica
    nmax = 15; p = 1; Do[Do[p = Expand[p*(1 - x^(2*i - 1)*y^(2*j - 1))]; p = Select[p, (Exponent[#, x] <= 2*nmax - 1) && (Exponent[#, y] <= 2*nmax - 1) &], {i, 1, 2*nmax - 1}], {j, 1, nmax}]; p = Expand[Normal[Series[1/p, {x, 0, 2*nmax - 1}, {y, 0, 2*nmax - 1}]]]; p = Select[p, Exponent[#, x] == Exponent[#, y] &]; Flatten[{1, Table[Coefficient[p, x^(2*n - 1)*y^(2*n - 1)], {n, 1, nmax}]}] (* Vaclav Kotesovec, Apr 16 2018 *)

Extensions

More terms from Vaclav Kotesovec, Apr 16 2018
Showing 1-4 of 4 results.