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

A098463 Numbers k such that A055869(k) = (k+1)^k - k^k is prime.

Original entry on oeis.org

2, 3, 5, 7, 167
Offset: 1

Views

Author

Hugo Pfoertner, Sep 14 2004

Keywords

Comments

The next term is > 5000.

Examples

			a(2) = 3 because (3+1)^3 - 3^3 = 4^3 - 3^3 = 64 - 27 = 37 is prime.
		

Crossrefs

Cf. A055869 ((n+1)^n-n^n), A085682 (k^k-(k-1)^k is prime).

Programs

A060072 a(n) = (n^(n-1) - 1)/(n-1) for n>1, a(1) = 0.

Original entry on oeis.org

0, 1, 4, 21, 156, 1555, 19608, 299593, 5380840, 111111111, 2593742460, 67546215517, 1941507093540, 61054982558011, 2085209001813616, 76861433640456465, 3041324492229179280, 128583032925805678351, 5784852794328402307380, 275941052631578947368421
Offset: 1

Views

Author

Henry Bottomley, Feb 21 2001

Keywords

Comments

(n-1)-digit repunits in base n written in decimal.

Examples

			a(10)=111111111; i.e., just nine 1's (converted from base 10 to decimal).
		

Crossrefs

Cf. other sequences of generalized repunits, such as A053696, A055129, A031973, A125598, A173468, A023037, A119598, A085104, and A162861.

Programs

  • Magma
    [0] cat [ (n^(n-1) -1)/(n-1) : n in [2..25]]; // G. C. Greubel, Aug 15 2022
    
  • Mathematica
    Join[{0},Array[(#^(#-1)-1)/(#-1)&,20,2]] (* Harvey P. Dale, Jun 04 2013 *)
  • PARI
    a(n) = if (n==1, 0, (n^(n - 1) - 1)/(n - 1)); \\ Harry J. Smith, Jul 01 2009
    
  • SageMath
    [0]+[(n^(n-1) -1)/(n-1) for n in (2..25)] # G. C. Greubel, Aug 15 2022

Formula

a(n+1) = Sum_{k=1..n} n^(k-1)*C(n, k). - Olivier Gérard, Jun 26 2001 [Corrected by Mathew Englander, Dec 15 2020]
a(n) = Sum_{j=2..n} n^(n-j). - Zerinvary Lajos, Sep 11 2006
a(n+1) = A125118(n,n). - Reinhard Zumkeller, Nov 21 2006
a(n) = Integral_{x=1/n..1} 1/x^n dx. - Francesco Daddi, Aug 01 2011
a(n) = A037205(n-1)/(n-1) = A060073(n)*(n-1) = A023037(n) - A000169(n).
a(n) = [x^n] x^2/((1 - x)*(1 - n*x)). - Ilya Gutkovskiy, Oct 04 2017
a(n) = 1 + A228275(n, n-2) for n >= 2. - Mathew Englander, Dec 14 2020

Extensions

Name edited by Michel Marcus, Dec 14 2020

A060226 a(n) = n^n - n*(n-1)^(n-1).

Original entry on oeis.org

1, 0, 2, 15, 148, 1845, 27906, 496951, 10188872, 236425545, 6125795110, 175311670611, 5492360400924, 186965800764925, 6871755333266474, 271213787997489135, 11440441827615801616, 513645612633274386705
Offset: 0

Views

Author

Henry Bottomley, Jul 12 2001

Keywords

Comments

For n > 0, a(n) = number of endofunctions of [n] mapping some x<>1 to 1. - Len Smiley, Nov 15 2001 (Endofunction interpretation from a(n) = n*(n^(n-1) - (n-1)^(n-1)).)

Crossrefs

Programs

  • Haskell
    a060226 0 = 1
    a060226 n = a000312 n - n * a000312 (n - 1)
    -- Reinhard Zumkeller, Aug 27 2012
    
  • Magma
    A060226:= func< n | n^n - n*(n-1)^(n-1) >;
    [A060226(n): n in [0..30]]; // G. C. Greubel, Nov 03 2024
    
  • Maple
    f := n-> n*sum(binomial(n-1,j-1)*(n-1)^(n-j), j=2..n);
    g := n-> n^n -n*(n-1)^(n-1);
    h := n-> sum(binomial(n,j)*j^(j-1)*(n-j)^(n-j), j=2..n);
    k := n-> sum(binomial(n,j-1)*(j-1)^(j-1)*(n-j)^(n-j), j=2..n); # then a(n)=f(n)=g(n)=h(n)=k(n)
  • Mathematica
    Join[{1,0},Table[n^n-n*(n-1)^(n-1),{n,2,20}]] (* Harvey P. Dale, Nov 16 2012 *)
  • PARI
    { for (n=0, 100, write("b060226.txt", n, " ", n^n - n*(n - 1)^(n - 1)); ) } \\ Harry J. Smith, Jul 03 2009
    
  • SageMath
    def A060226(n): return n^n - n*(n-1)^(n-1)
    [A060226(n) for n in range(31)] # G. C. Greubel, Nov 03 2024

Formula

a(n) = n*A055869(n-1).
Limit_{n -> oo} ( a(n)/a(n-1) - a(n-1)/a(n-2) ) -> e.
E.g.f.: (1-x)/(1-T), where T=T(x) is Euler's tree function (see A000169). The e.g.f. for n > 0 terms only (applicable to endofunctions) is (T - x)/(1 - T). - Len Smiley, Dec 10 2001

A085529 a(n) = (2n+1)^(2n+1).

Original entry on oeis.org

1, 27, 3125, 823543, 387420489, 285311670611, 302875106592253, 437893890380859375, 827240261886336764177, 1978419655660313589123979, 5842587018385982521381124421, 20880467999847912034355032910567, 88817841970012523233890533447265625, 443426488243037769948249630619149892803
Offset: 0

Views

Author

N. J. A. Sloane, Jul 05 2003

Keywords

Comments

a(n) == 2*n + 1 (mod 24). - Mathew Englander, Aug 16 2020

Crossrefs

Programs

Formula

From Mathew Englander, Aug 16 2020: (Start)
a(n) = A000312(2*n + 1).
a(n) = A016754(n)^n * (2*n + 1).
a(n) = A085527(n)^2 * (2*n + 1).
a(n) = A085528(n)^2 / (2*n + 1).
a(n) = A085530(n) * A005408(n).
a(n) = A085531(n) * A016754(n).
a(n) = A085532(n)^2 - A215265(2*n + 1).
a(n) = A085533(n) + A045531(2*n + 1).
a(n) = A085534(n+1) - A007781(2*n + 1).
a(n) = A085535(n+1) - A055869(2*n + 1).
(End)
Sum_{n>=0} 1/a(n) = (A073009 + A083648)/2 = 1.0373582538... . - Amiram Eldar, May 17 2022

A086877 Primes of the form (k+1)^k - k^k.

Original entry on oeis.org

5, 37, 4651, 1273609
Offset: 1

Views

Author

Cino Hilliard, Aug 21 2003

Keywords

Crossrefs

The values of k are in A098463.
Primes in A055869.
Cf. A085682.

Programs

  • PARI
    f(n) = for(x=1,n,y=(x+1)^x-x^x; if(isprime(y),print1(y, ", ")))

Formula

a(n) = A055869(A098463(n)). - Elmo R. Oliveira, Feb 19 2025

A085283 a(n) = n*n^n - (n-1)*(n-1)^n.

Original entry on oeis.org

1, 1, 7, 65, 781, 11529, 201811, 4085185, 93864121, 2413042577, 68618940391, 2138428376721, 72470493235141, 2653457921150425, 104382202543721467, 4390455017903519489, 196621779843659466481, 9340717969198079777313
Offset: 0

Views

Author

Paul Barry, Jun 26 2003

Keywords

Comments

The system of equations
x(0) = n*x(1) + 1,
(n-1)*x(1) = n*x(2) + 1,
...
(n-1)*x(n) = n*x(n+1) + 1.
relates to the Monkey-And-Coconuts problem and reduces to the single equation
A007778(n-1)*x(0) = A007778(n)*x(n+1) + a(n),
whose solutions {x(0),x(n+1)} are given by {A014293(n), A085606(n)=A007778(n-1) - 1}. - Lekraj Beedassy, Jul 15 2003
For n >= 1, a(n) is equal to the number of functions f: {1,2,...,n+1}->{1,2,...,n} such that Im(f) contains a fixed element. - Aleksandar M. Janjic and Milan Janjic, Feb 27 2007

Crossrefs

Programs

  • Mathematica
    Join[{1},Table[n*n^n-(n-1)(n-1)^n,{n,20}]] (* Harvey P. Dale, Sep 08 2016 *)

Formula

E.g.f.: -(x + 2*x*W(-x) + W(-x)^2)/(W(-x)*(1 + W(-x))^3), where W(x) is the Lambert W function. - Fabian Pereyra, Sep 26 2023

A360657 Number triangle T associated with 2-Stirling numbers and Lehmer-Comtet numbers (see Comments and Formula section).

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 9, 5, 1, 0, 64, 37, 9, 1, 0, 625, 369, 97, 14, 1, 0, 7776, 4651, 1275, 205, 20, 1, 0, 117649, 70993, 19981, 3410, 380, 27, 1, 0, 2097152, 1273609, 365001, 64701, 7770, 644, 35, 1, 0, 43046721, 26269505, 7628545, 1388310, 174951, 15834, 1022, 44, 1
Offset: 0

Views

Author

Werner Schulte, Feb 15 2023

Keywords

Comments

Triangle T is created using 2-Stirling numbers of the first (A049444) and the second (A143494) kind. The unusual construction is as follows:
Define A(n, k) by recurrence A(n, k) = A(n-1, k-1) + (k+1) * A(n-1, k) for 0 < k < n with initial values A(n, n) = 1, n >= 0, and A(n, 0) = 0, n > 0. A without column k = 0 is A143494. Let B = A^(-1) matrix inverse of A. B without column k = 0 is A049444. Now define T(m, k) = Sum_{i=0..m-k} B(m-k, i) * A(m-1+i, m-1) for 0 < k <= m = n/2 and T(m, 0) = 0^m for 0 <= m = n/2; T(i, j) = 0 if i < j or j < 0.
Matrix inverse of T is A360753. - Werner Schulte, Feb 21 2023
Conjecture: the transpose of this array is the upper triangular matrix U in the LU factorization of the array of Stirling numbers of the second kind read as a square array; the corresponding lower triangular array L is the triangle of Stirling numbers of the second kind. See the example section below. - Peter Bala, Oct 10 2023

Examples

			Triangle T(n, k), 0 <= k <= n, starts:
n\k :  0         1         2        3        4       5      6     7   8  9
==========================================================================
  0 :  1
  1 :  0         1
  2 :  0         2         1
  3 :  0         9         5        1
  4 :  0        64        37        9        1
  5 :  0       625       369       97       14       1
  6 :  0      7776      4651     1275      205      20      1
  7 :  0    117649     70993    19981     3410     380     27     1
  8 :  0   2097152   1273609   365001    64701    7770    644    35   1
  9 :  0  43046721  26269505  7628545  1388310  174951  15834  1022  44  1
  etc.
From _Peter Bala_, Oct 10 2023: (Start)
LU factorization of the square array of Stirling numbers of the second kind (apply Xu, Lemma 2.2):
 / 1               \ / 1   1   1   1  ...\    / 1   1   1    1  ... \
 | 1   1           ||      2   5   9  ...|   |  1   3   6   10  ... |
 | 1   3   1       ||          9  37  ...| = |  1   7  25   65  ... |
 | 1   7   6   1   ||             64  ...|   |  1  15  90  350  ... |
 | ...             ||                 ...|   |  ...                 |
(End)
		

Crossrefs

Cf. A000007 (column 0), A000169 (column 1), A055869 (column 2).
Cf. A000012 (main diagonal), A000096 (1st subdiagonal), A360753 (matrix inverse).

Programs

  • PARI
    tabl(m) = {my(n=2*m, A = matid(n), B, T); for( i = 2, n, for( j = 2, i, A[i, j] = A[i-1, j-1] + j * A[i-1, j] ) ); B = A^(-1); T = matrix( m, m, i, j, if( j == 1, 0^(i-1), sum( r = 0, i-j, B[i-j+1, r+1] * A[i-1+r, i-1] ) ) ); }

Formula

For the definition of triangle T see Comments section.
Conjectured formulas:
1. T(n, k) = (Sum_{i=k..n} A354794(n, i) * (i-1)!) / (k-1)! for 0 < k <= n.
2. T(n, k) - k * T(n, k+1) = A354794(n, k) for 0 <= k <= n.
3. T(n, 1) = A000169(n) = n^(n-1) for n > 0.
4. T(n, 2) = A055869(n-1) = n^(n-1) - (n-1)^(n-1) for n > 1.
5. T(n, k) = (Sum_{i=0..k-1} (-1)^i * binomial(k-1, i) * (n-i)^(n-1)) / (k-1)! for 0 < k <= n.
6. Sum_{i=1..n} (-1)^(n-i) * binomial(n-1+k, i-1) * T(n, i) * (i-1)! = (k-1)^(n-1) for n > 0 and k >= 0.
7. Matrix product of A354795 and T without column 0 equals A094587.
8. Matrix product of T and A354795 without column 0 equals A088956.
9. E.g.f. of column k > 0: Sum_{n>=k} T(n, k) * t^(n-1) / (n-1)! = (W(-t)/(-t)) * (Sum_{n>=k} A354794(n, k) * t^(n-1) / (n-1)!) where W is the Lambert_W-function.

A098462 a(n) = n^n + (n+1)^n.

Original entry on oeis.org

2, 3, 13, 91, 881, 10901, 164305, 2920695, 59823937, 1387420489, 35937424601, 1028320041299, 32214185570737, 1096589879846397, 40304932850948641, 1590815394987706351, 67107935949376420097, 3013151821625033296145, 143473758373207779108265
Offset: 0

Views

Author

Hugo Pfoertner, Sep 08 2004

Keywords

Crossrefs

Cf. A000169, A000312, A045531 (n^n-(n-1)^n), A055869 ((n+1)^n-n^n).

Programs

Formula

From Alois P. Heinz, Mar 19 2020: (Start)
a(n) = A000312(n) + A000169(n+1).
E.g.f.: (x-LambertW(-x))/((1+LambertW(-x))*x). (End)

Extensions

a(0)=2 prepended by Alois P. Heinz, Mar 19 2020

A174552 Triangular array T(n,k): The differences in the columns of A174551.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 8, 7, 6, 6, 81, 65, 50, 36, 24, 1024, 781, 570, 390, 240, 120, 15625, 11529, 8162, 5460, 3360, 1800, 720, 279936, 201811, 140070, 92526, 57120, 31920, 15120, 5040
Offset: 0

Views

Author

Geoffrey Critzer, Mar 22 2010

Keywords

Comments

T(n,k) is the number of functions f:{1,2,...,n}->{1,2,...,n} such that the image of f contains {1,2,...,k} but not k+1.
Row sums = n^n.
Columns are asymptotic to n^n (1/e)(1-(1/e))^k.
Sum k*T(n,k) appears to be A055869.

Examples

			Triangle begins:
1;
0, 1;
1, 1, 2;
8, 7, 6, 6;
81,65,50,36,24;
1024,781,570,390,240,120;
15625, 11529, 8162, 5460, 3360, 1800, 720...
		

Programs

  • Mathematica
    Table[Append[(-1) Differences[ Table[Sum[(-1)^i Binomial[k, i] (n - i)^n, {i, 0, k}], {k, 0, n}]], n! ], {n, 0, 7}] // Grid
Showing 1-9 of 9 results.