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

A048160 Triangle giving T(n,k) = number of (n,k) labeled rooted Greg trees (n >= 1, 0<=k<=n-1).

Original entry on oeis.org

1, 2, 1, 9, 10, 3, 64, 113, 70, 15, 625, 1526, 1450, 630, 105, 7776, 24337, 31346, 20650, 6930, 945, 117649, 450066, 733845, 650188, 329175, 90090, 10395, 2097152, 9492289, 18760302, 20925065, 14194180, 5845455, 1351350, 135135, 43046721
Offset: 1

Views

Author

Keywords

Comments

An (n,k) rooted Greg tree can be described as a rooted tree with n black nodes and k white nodes where only the black nodes are labeled and the white nodes have at least 2 children. - Christian G. Bower, Nov 15 1999

Examples

			Triangle begins:
  1;
  2, 1;
  9, 10, 3;
  64, 113, 70, 15;
  ...
		

Crossrefs

Row sums give A005264. Cf. A005263, A048159, A052300-A052303. A054589.

Programs

  • Mathematica
    t[n_ /; n >= 1, k_ /; k >= 0] /; 0 <= k <= n-1 := t[n, k] = (n+k-2) t[n-1, k-1] + (2n + 2k - 2)*t[n-1, k] + (k+1) t[n-1, k+1]; t[1, 0] = 1; t[, ] = 0; Flatten[Table[t[n, k], {n, 1, 9}, {k, 0, n-1}]] (* Jean-François Alcover, Jul 20 2011, after formula *)

Formula

T(n, 0)=n^(n-1), T(n, k)=(n+k-2)*T(n-1, k-1)+(2*n+2*k-2)*T(n-1, k)+(k+1)*T(n-1, k+1).
From Peter Bala, Sep 29 2011: (Start)
E.g.f.: compositional inverse with respect to x of t*(exp(-x)-1) + (1+t)*x*exp(-x) = compositional inverse with respect to x of (x - (2+t)*x^2/2! + (3+2*t)*x^3/3! - (4+3*t)*x^4/4! + ...) = x + (2+t)*x^2/2! + (9+10*t+3*t^2)*x^3/3! + ....
The row generating polynomials R(n,t) satisfy the recurrence R(n+1,t) = (1+t)^2*R'(n,t)+n*(2+t)*R(n,t) with R(1,t) = 1.
The shifted row polynomials R(n,t-1) are the row generating polynomials of A054589. (End)
From Peter Bala, Sep 12 2012: (Start)
It appears that the entries in column k = 1 are given by T(n,1) = (n+1)^n - 2*n^n (checked up to n = 15) - see A176824.
Assuming this, we could then use the recurrence equation to obtain explicit formulas for columns k = 2,3,....
For example, T(n,2) = 1/2*{(n+2)^(n+1) - 4*(n+1)^(n+1) + (4*n+3)*n^n}. (End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Apr 07 2000

A152260 Triangle T(n, k) = [x^k] p(n, x), where p(n, x) = (1/n)*(1-x)^(2*n) * Sum_{j >= 0} binomial(n+j-1, j) * j^n * x^(j-1).

Original entry on oeis.org

1, 1, 2, 1, 10, 9, 1, 32, 113, 64, 1, 86, 786, 1526, 625, 1, 212, 4182, 18932, 24337, 7776, 1, 498, 19167, 170332, 477807, 450066, 117649, 1, 1136, 80103, 1266400, 6584615, 12910704, 9492289, 2097152, 1, 2542, 314928, 8313394, 72899230, 254556594, 375886768, 225159022, 43046721
Offset: 1

Views

Author

Roger L. Bagula, Dec 01 2008

Keywords

Comments

A generalization of for n=m: q(x,n,m) = (1-x)^(n+m) * Sum_{j >= 0} binomial(m+j-1, j) * j^n * x^(j-1).

Examples

			Polynomials, p(n, x), begin as:
  p(1, x) = 1;
  p(2, x) = 1 +   2*x;
  p(3, x) = 1 +  10*x +    9*x^2;
  p(4, x) = 1 +  32*x +  113*x^2 +    64*x^3;
  p(5, x) = 1 +  86*x +  786*x^2 +  1526*x^3 +   625*x^4;
  p(6, x) = 1 + 212*x + 4182*x^2 + 18932*x^3 + 24337*x^4 + 7776*x^5;
Triangle, T(n, k), begins as:
  1;
  1,    2;
  1,   10,     9;
  1,   32,   113,      64;
  1,   86,   786,    1526,     625;
  1,  212,  4182,   18932,   24337,     7776;
  1,  498, 19167,  170332,  477807,   450066,  117649;
  1, 1136, 80103, 1266400, 6584615, 12910704, 9492289, 2097152;
		

References

  • Douglas C. Montgomery and Lynwood A. Johnson, Forecasting and Time Series Analysis, MaGraw-Hill, New York, 1976, page 91

Crossrefs

Programs

  • Magma
    A152260:= func< n,k | (&+[(-1)^(k+j)*Binomial(2*n,k-j)*Binomial(n+j-1,j)*j^n: j in [1..k]])/n >;
    [A152260(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, May 23 2023
    
  • Mathematica
    p[x_, n_]:= ((1-x)^(2*n)/n)*Sum[Binomial[k+n-1,k]*k^n*x^(k-1), {k, 0, Infinity}];
    Table[CoefficientList[p[x, n], x], {n,12}]//Flatten
    (* Second program *)
    T[n_, k_]:= (1/n)*Sum[Binomial[2*n,k-j]*Binomial[n+j-1,j]*(-1)^(k+j) *j^n, {j,k}];
    Table[T[n,k], {n,12}, {k,n}]//Flatten (* G. C. Greubel, May 23 2023 *)
  • SageMath
    def A152260(n,k): return (1/n)*sum( (-1)^(k+j)*binomial(2*n,k-j)*binomial(n+j-1,j)*j^n for j in range(1,k+1) )
    flatten([[A152260(n,k) for k in range(1,n+1)] for n in range(1,13)]) # G. C. Greubel, May 23 2023

Formula

T(n, k) = [x^k] p(n, x), where p(n, x) = (1/n)*(1-x)^(2*n) * Sum_{j >= 0} binomial(n+j-1, j) * j^n * x^(j-1).
Sum_{k=1..n} T(n, k) = A006963(n).
T(n, m) = Sum_{k=1..m} binomial(n+k,k)*binomial(n-k,m-k)*k!*(-1)^(m-k) * Stirling2(n,k)*1/(n+k) (conjectured). - Michael D. Weiner, Jul 01 2020
From G. C. Greubel, May 23 2023: (Start)
T(n, k) = (1/n)*Sum_{j=0..k-1} (-1)^(k+j+1)*binomial(2*n, k-j-1) * binomial(n+j, j+1) * (j+1)^n.
T(n, n) = A000169(n).
T(n, n-1) = A176824(n). (End)

A176825 Primes of the form (k+1)^k mod k^k.

Original entry on oeis.org

113, 24337, 9492289
Offset: 1

Views

Author

Keywords

Comments

The next term is too large to include.
The corresponding values of k are 4, 6, 8, 132, ... - Amiram Eldar, Jul 18 2019

Examples

			5^4 mod 4^4 = 113 is a prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[Mod[(n+1)^n,n^n],{n,140}],PrimeQ[ # ]&]

A305559 [0, -1, -1] together with A000290.

Original entry on oeis.org

0, -1, -1, 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401, 2500
Offset: 0

Views

Author

Paul Curtz, Jun 21 2018

Keywords

Comments

Squares leading to an autosequence of the first kind.
The third sequence of the array
A060576(n+1)= 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
A289207(n)= 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, ...
a(n)= 0, -1, -1, 0, 1, 4, 9, 16, 25, 36, ...
0, 10, 10, 5, 0, 1, 8, 27, 64, 125, ...
0, -113, -113, -68, -23, 0, 1, 16, 81, 256, ... .
The first full vertical is (-1)^n*A033312(n).
From 0, the first two nonzero antidiagonals are 0, -1, 10, -113, 1526, ... = (-1)^n* A176824(n+1).
See OEIS Wiki, Autosequence.
a(n) difference table:
0, -1, -1, 0, 1, 4, 9, 16, 25, ...
-1, 0, 1, 1, 3, 5, 7, 9, 11, ...
1, 1, 0, 2, 2, 2, 2, 2, 2, ...
0, -1, 2, 0, 0, 0, 0, 0, 0, ...

Crossrefs

Programs

  • Mathematica
    Join[{0,-1,-1},Range[0,100]^2] (* Paolo Xausa, Nov 13 2023 *)

Formula

From Stefano Spezia, May 28 2025: (Start)
G.f.: x*(1 - 2*x + x^3 - 2*x^4)/(1 - x)^3.
E.g.f.: 9 + 5*x + x^2 - exp(x)*(9 - 5*x + x^2). (End)

A225190 a(n) = (n+2)^(n+2) mod n^n.

Original entry on oeis.org

0, 0, 0, 20, 64, 1668, 27712, 355279, 779264, 170190707, 6100448256, 159424073982, 2545667031040, 239361355053790, 812743283245056, 58702956893404802, 17949710147773530112, 488189490082385976772, 38768887410023899070464, 313775221076492698014434, 11531764219557396646723584
Offset: 0

Views

Author

Alex Ratushnyak, May 01 2013

Keywords

Comments

The sequence of indices of odd terms b(n) begins: 7, 9, 25, 27, 39, 43, 45, 49, 53, 57, 59, 65, 67, 71, ...
a(n) may be odd only if n is odd. For even n's, both (n+2)^(n+2) and n^n are even, therefore a(n) is even.
c(n) = (b(n)-1)/2 begins: 3, 4, 12, 13, 19, 21, 22, 24, 26, 28, 29, 32, 33, 35, 36, 37, 38, 41, ...

Examples

			a(3) = 5^5 mod 3^3 = 3125 mod 27 = 20.
		

Crossrefs

Programs

  • Python
    for i in range(21):  print(((i+2)**(i+2) % (i**i)), end=', ')
Showing 1-5 of 5 results.