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-10 of 34 results. Next

A128981 Numbers k such that k divides Sum_{j=1..k} j^j = A001923(k).

Original entry on oeis.org

1, 4, 17, 19, 148, 1577, 3564, 4388, 5873, 6639, 8579, 62500, 376636, 792949, 996044, 1174065, 3333551, 5179004, 7516003
Offset: 1

Views

Author

Alexander Adamchuk, Apr 29 2007

Keywords

Comments

a(20) > 10^7. - Hiroaki Yamanouchi, Aug 25 2015

Crossrefs

Programs

  • Maple
    a:=0:
    for n from 1 to 2000 do
        a:=a+n^n:
        if a mod n=0 then
            print(n);
        fi;
    od: # Revised program from R. J. Mathar, Jun 18 2015
  • Mathematica
    f=0; Do[ f=f+k^k; If[ IntegerQ[f/k], Print[k] ], {k,1,6639} ]
  • PARI
    for(n=1,10^4, s=sum(i=1,n,Mod(i,n)^i); if(!Mod(s,n), print1(n,", "))) \\ Derek Orr, Jun 18 2015
    
  • Python
    from itertools import accumulate, count, islice
    def A128981_gen(): # generator of terms
        yield 1
        for i, j in enumerate(accumulate(k**k for k in count(1)),start=2):
            if j % i == 0:
                yield i
    A128981_list = list(islice(A128981_gen(),10)) # Chai Wah Wu, Jun 18 2022

Extensions

a(11) and a(12) from Jon E. Schoenfield, May 09 2007
a(13) = 376636 from Alexander Adamchuk, May 03 2010
a(14)-a(16) from Lars Blomberg, May 10 2011
a(17) from Giovanni Resta, Jul 13 2015
a(18)-a(19) from Hiroaki Yamanouchi, Aug 25 2015

A073826 Primes of the form Sum_{k=1..n} k^k, i.e., primes in A001923.

Original entry on oeis.org

5, 3413, 50069, 10405071317, 208492413443704093346554910065262730566475781
Offset: 1

Views

Author

Rick L. Shepherd, Aug 13 2002

Keywords

Comments

a(3) = A001923(10) = 10405071317 and the 45-digit a(4) = A001923(30) have been certified prime with Primo. Any additional terms are too big to include here.
The next term would have over 20000 digits; see A073825 for more information and updates.

Examples

			a(1) = 5 = 1^1 + 2^2 is the smallest prime of the form A001923(n) = sum_{k=1..n} k^k, namely for n = 2 = A073825(1).
a(2) = sum_{k=1..A073825(2)} k^k = 1^1 + 2^2 + 3^3 + 4^4 + 5^5 = 3413, a prime, so 3413 is in this sequence (A073825(2) = 5).
		

Crossrefs

Cf. A073825 (corresponding n), A001923 (sum_{k=1..n} k^k).
Cf. A122166 (indices of primes in A062970 (sum_{k=0..n} k^k)).

Programs

  • Mathematica
    Select[s=0;Table[s+=n^n,{n,5!}],PrimeQ[ # ]&] (* Vladimir Joseph Stephan Orlovsky, May 30 2010 *)
  • PARI
    s=0; for(k=1,1320, s=s+k^k; if(isprime(s), print1(s,",")))

Formula

a(j) = A001923(A073825(j)) = sum_{k=1..A073825(j)} k^k.
Intersection of A001923 with A000040.

Extensions

Edited by M. F. Hasler, Mar 22 2008
Typo in comment corrected by Jonathan Vos Post, Mar 23 2008

A354946 a(n) = gcd(A001923(n),n^n).

Original entry on oeis.org

1, 1, 1, 32, 1, 1, 1, 4, 1, 1, 1, 8, 1, 1, 9, 4, 17, 3, 19, 16, 7, 1, 1, 4, 1, 1, 1, 8, 1, 1, 1, 4, 3, 17, 1, 768, 1, 1, 1, 4, 1, 1, 1, 8, 1, 1, 1, 4, 1, 125, 3, 16, 1, 9, 1, 4, 1, 1, 1, 8, 1, 1, 1, 4, 5, 1, 1, 32, 9, 1, 1, 12, 1, 1, 5, 8, 1, 1, 1, 4, 1, 1
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    A001923[n_]:=Sum[k^k,{k,1,n}]; A[n_]:=GCD[A001923[n],n^n]; Table[A[n],{n,1,33}]
  • PARI
    a(n) = gcd(sum(k=1, n, k^k), n^n); \\ Michel Marcus, Jul 11 2022

A000312 a(n) = n^n; number of labeled mappings from n points to themselves (endofunctions).

Original entry on oeis.org

1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489, 10000000000, 285311670611, 8916100448256, 302875106592253, 11112006825558016, 437893890380859375, 18446744073709551616, 827240261886336764177, 39346408075296537575424, 1978419655660313589123979
Offset: 0

Views

Author

Keywords

Comments

Also number of labeled pointed rooted trees (or vertebrates) on n nodes.
For n >= 1 a(n) is also the number of n X n (0,1) matrices in which each row contains exactly one entry equal to 1. - Avi Peretz (njk(AT)netvision.net.il), Apr 21 2001
Also the number of labeled rooted trees on (n+1) nodes such that the root is lower than its children. Also the number of alternating labeled rooted ordered trees on (n+1) nodes such that the root is lower than its children. - Cedric Chauve (chauve(AT)lacim.uqam.ca), Mar 27 2002
With p(n) = the number of integer partitions of n, p(i) = the number of parts of the i-th partition of n, d(i) = the number of different parts of the i-th partition of n, p(j, i) = the j-th part of the i-th partition of n, m(i, j) = multiplicity of the j-th part of the i-th partition of n, one has: a(n) = Sum_{i=1..p(n)} (n!/(Product_{j=1..p(i)} p(i, j)!)) * ((n!/(n - p(i)))!/(Product_{j=1..d(i)} m(i, j)!)). - Thomas Wieder, May 18 2005
All rational solutions to the equation x^y = y^x, with x < y, are given by x = A000169(n+1)/A000312(n), y = A000312(n+1)/A007778(n), where n = 1, 2, 3, ... . - Nick Hobson, Nov 30 2006
a(n) is the total number of leaves in all (n+1)^(n-1) trees on {0,1,2,...,n} rooted at 0. For example, with edges directed away from the root, the trees on {0,1,2} are {0->1,0->2},{0->1->2},{0->2->1} and contain a total of a(2)=4 leaves. - David Callan, Feb 01 2007
Limit_{n->infinity} A000169(n+1)/a(n) = exp(1). Convergence is slow, e.g., it takes n > 74 to get one decimal place correct and n > 163 to get two of them. - Alonso del Arte, Jun 20 2011
Also smallest k such that binomial(k, n) is divisible by n^(n-1), n > 0. - Michel Lagneau, Jul 29 2013
For n >= 2 a(n) is represented in base n as "one followed by n zeros". - R. J. Cano, Aug 22 2014
Number of length-n words over the alphabet of n letters. - Joerg Arndt, May 15 2015
Number of prime parking functions of length n+1. - Rui Duarte, Jul 27 2015
The probability density functions p(x, m=q, n=q, mu=1) = A000312(q)*E(x, q, q) and p(x, m=q, n=1, mu=q) = (A000312(q)/A000142(q-1))*x^(q-1)*E(x, q, 1), with q >= 1, lead to this sequence, see A163931, A274181 and A008276. - Johannes W. Meijer, Jun 17 2016
Satisfies Benford's law [Miller, 2015]. - N. J. A. Sloane, Feb 12 2017
A signed version of this sequence apart from the first term (1, -4, -27, 256, 3125, -46656, ...), has the following property: for every prime p == 1 (mod 2n), (-1)^(n(n-1)/2)*n^n = A057077(n)*a(n) is always a 2n-th power residue modulo p. - Jianing Song, Sep 05 2018
From Juhani Heino, May 07 2019: (Start)
n^n is both Sum_{i=0..n} binomial(n,i)*(n-1)^(n-i)
and Sum_{i=0..n} binomial(n,i)*(n-1)^(n-i)*i.
The former is the familiar binomial distribution of a throw of n n-sided dice, according to how many times a required side appears, 0 to n. The latter is the same but each term is multiplied by its amount. This means that if the bank pays the player 1 token for each die that has the chosen side, it is always a fair game if the player pays 1 token to enter - neither bank nor player wins on average.
Examples:
2-sided dice (2 coins): 4 = 1 + 2 + 1 = 1*0 + 2*1 + 1*2 (0 omitted from now on);
3-sided dice (3 long triangular prisms): 27 = 8 + 12 + 6 + 1 = 12*1 + 6*2 + 1*3;
4-sided dice (4 long square prisms or 4 tetrahedrons): 256 = 81 + 108 + 54 + 12 + 1 = 108*1 + 54*2 + 12*3 + 1*4;
5-sided dice (5 long pentagonal prisms): 3125 = 1024 + 1280 + 640 + 160 + 20 + 1 = 1280*1 + 640*2 + 160*3 + 20*4 + 1*5;
6-sided dice (6 cubes): 46656 = 15625 + 18750 + 9375 + 2500 + 375 + 30 + 1 = 18750*1 + 9375*2 + 2500*3 + 375*4 + 30*5 + 1*6.
(End)
For each n >= 1 there is a graph on a(n) vertices whose largest independent set has size n and whose independent set sequence is constant (specifically, for each k=1,2,...,n, the graph has n^n independent sets of size k). There is no graph of smaller order with this property (Ball et al. 2019). - David Galvin, Jun 13 2019
For n >= 2 and 1 <= k <= n, a(n)*(n + 1)/4 + a(n)*(k - 1)*(n + 1 - k)/2*n is equal to the sum over all words w = w(1)...w(n) of length n over the alphabet {1, 2, ..., n} of the following quantity: Sum_{i=1..w(k)} w(i). Inspired by Problem 12432 in the AMM (see links). - Sela Fried, Dec 10 2023
Also, dimension of the unique cohomology group of the smallest interval containing the poset of partitions decorated by Perm, i.e. the poset of pointed partitions. - Bérénice Delcroix-Oger, Jun 25 2025

Examples

			G.f. = 1 + x + 4*x^2 + 27*x^3 + 256*x^4 + 3125*x^5 + 46656*x^6 + 823543*x^7 + ...
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, pp. 62, 63, 87.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 173, #39.
  • A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992, Eq. (4.2.2.37)
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

First column of triangle A055858. Row sums of A066324.
Cf. A001923 (partial sums), A002109 (partial products), A007781 (first differences), A066588 (sum of digits).
Cf. A056665, A081721, A130293, A168658, A275549-A275558 (various classes of endofunctions).

Programs

  • Haskell
    a000312 n = n ^ n
    a000312_list = zipWith (^) [0..] [0..]  -- Reinhard Zumkeller, Jul 07 2012
    
  • Maple
    A000312 := n->n^n: seq(A000312(n), n=0..17);
  • Mathematica
    Array[ #^# &, 16] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
    Table[Sum[StirlingS2[n, i] i! Binomial[n, i], {i, 0, n}], {n, 0, 20}] (* Geoffrey Critzer, Mar 17 2009 *)
    a[ n_] := If[ n < 1, Boole[n == 0], n^n]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ 1 / (1 + LambertW[-x]), {x, 0, n}]]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[n < 0, 0, n! SeriesCoefficient[ Nest[ 1 / (1 - x / (1 - Integrate[#, x])) &, 1 + O[x], n], {x, 0, n}]]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[ n < 0, 0, With[{m = n + 1}, m! SeriesCoefficient[ InverseSeries[ Series[ (x - 1) Log[1 - x], {x, 0, m}]], m]]]; (* Michael Somos, May 24 2014 *)
  • Maxima
    A000312[n]:=if n=0 then 1 else n^n$
    makelist(A000312[n],n,0,30); /* Martin Ettl, Oct 29 2012 */
    
  • PARI
    {a(n) = n^n};
    
  • PARI
    is(n)=my(b,k=ispower(n,,&b));if(k,for(e=1,valuation(k,b), if(k/b^e == e, return(1)))); n==1 \\ Charles R Greathouse IV, Jan 14 2013
    
  • PARI
    {a(n) = my(A = 1 + O(x)); if( n<0, 0, for(k=1, n, A = 1 / (1 - x / (1 - intformal( A)))); n! * polcoeff( A, n))}; /* Michael Somos, May 24 2014 */
    
  • Python
    def A000312(n): return n**n # Chai Wah Wu, Nov 07 2022

Formula

a(n-1) = -Sum_{i=1..n} (-1)^i*i*n^(n-1-i)*binomial(n, i). - Yong Kong (ykong(AT)curagen.com), Dec 28 2000
E.g.f.: 1/(1 + W(-x)), W(x) = principal branch of Lambert's function.
a(n) = Sum_{k>=0} binomial(n, k)*Stirling2(n, k)*k! = Sum_{k>=0} A008279(n,k)*A048993(n,k) = Sum_{k>=0} A019538(n,k)*A007318(n,k). - Philippe Deléham, Dec 14 2003
E.g.f.: 1/(1 - T), where T = T(x) is Euler's tree function (see A000169).
a(n) = A000169(n+1)*A128433(n+1,1)/A128434(n+1,1). - Reinhard Zumkeller, Mar 03 2007
Comment on power series with denominators a(n): Let f(x) = 1 + Sum_{n>=1} x^n/n^n. Then as x -> infinity, f(x) ~ exp(x/e)*sqrt(2*Pi*x/e). - Philippe Flajolet, Sep 11 2008
E.g.f.: 1 - exp(W(-x)) with an offset of 1 where W(x) = principal branch of Lambert's function. - Vladimir Kruchinin, Sep 15 2010
a(n) = (n-1)*a(n-1) + Sum_{i=1..n} binomial(n, i)*a(i-1)*a(n-i). - Vladimir Shevelev, Sep 30 2010
With an offset of 1, the e.g.f. is the compositional inverse ((x - 1)*log(1 - x))^(-1) = x + x^2/2! + 4*x^3/3! + 27*x^4/4! + .... - Peter Bala, Dec 09 2011
a(n) = denominator((1 + 1/n)^n) for n > 0. - Jean-François Alcover, Jan 14 2013
a(n) = A089072(n,n) for n > 0. - Reinhard Zumkeller, Mar 18 2013
a(n) = (n-1)^(n-1)*(2*n) + Sum_{i=1..n-2} binomial(n, i)*(i^i*(n-i-1)^(n-i-1)), n > 1, a(0) = 1, a(1) = 1. - Vladimir Kruchinin, Nov 28 2014
log(a(n)) = lim_{k->infinity} k*(n^(1+1/k) - n). - Richard R. Forberg, Feb 04 2015
From Ilya Gutkovskiy, Jun 18 2016: (Start)
Sum_{n>=1} 1/a(n) = 1.291285997... = A073009.
Sum_{n>=1} 1/a(n)^2 = 1.063887103... = A086648.
Sum_{n>=1} n!/a(n) = 1.879853862... = A094082. (End)
A000169(n+1)/a(n) -> e, as n -> oo. - Daniel Suteu, Jul 23 2016
a(n) = n!*Product_{k=1..n} binomial(n, k)/Product_{k=1..n-1} binomial(n-1, k) = n!*A001142(n)/A001142(n-1). - Tony Foster III, Sep 05 2018
a(n-1) = abs(p_n(2-n)), for n > 2, the single local extremum of the n-th row polynomial of A055137 with Bagula's sign convention. - Tom Copeland, Nov 15 2019
Sum_{n>=1} (-1)^(n+1)/a(n) = A083648. - Amiram Eldar, Jun 25 2021
Limit_{n->oo} (a(n+1)/a(n) - a(n)/a(n-1)) = e (see Brothers/Knox link). - Harlan J. Brothers, Oct 24 2021
Conjecture: a(n) = Sum_{i=0..n} A048994(n, i) * A048993(n+i, n) for n >= 0; proved by Mike Earnest, see link at A354797. - Werner Schulte, Jun 19 2022

A002109 Hyperfactorials: Product_{k = 1..n} k^k.

Original entry on oeis.org

1, 1, 4, 108, 27648, 86400000, 4031078400000, 3319766398771200000, 55696437941726556979200000, 21577941222941856209168026828800000, 215779412229418562091680268288000000000000000, 61564384586635053951550731889313964883968000000000000000
Offset: 0

Views

Author

Keywords

Comments

A054374 gives the discriminants of the Hermite polynomials in the conventional (physicists') normalization, and A002109 (this sequence) gives the discriminants of the Hermite polynomials in the (in my opinion more natural) probabilists' normalization. See refs Wikipedia and Szego, eq. (6.71.7). - Alan Sokal, Mar 02 2012
a(n) = (-1)^n/det(M_n) where M_n is the n X n matrix m(i,j) = (-1)^i/i^j. - Benoit Cloitre, May 28 2002
a(n) = determinant of the n X n matrix M(n) where m(i,j) = B(n,i,j) and B(n,i,x) denote the Bernstein polynomial: B(n,i,x) = binomial(n,i)*(1-x)^(n-i)*x^i. - Benoit Cloitre, Feb 02 2003
Partial products of A000312. - Reinhard Zumkeller, Jul 07 2012
Number of trailing zeros (A246839) increases every 5 terms since the exponent of the factor 5 increases every 5 terms and the exponent of the factor 2 increases every 2 terms. - Chai Wah Wu, Sep 03 2014
Also the number of minimum distinguishing labelings in the n-triangular honeycomb rook graph. - Eric W. Weisstein, Jul 14 2017
Also shows up in a term in the solution to the generalized version of Raabe's integral. - Jibran Iqbal Shah, Apr 24 2021

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 135-145.
  • A. Fletcher, J. C. P. Miller, L. Rosenhead and L. J. Comrie, An Index of Mathematical Tables. Vols. 1 and 2, 2nd ed., Blackwell, Oxford and Addison-Wesley, Reading, MA, 1962, Vol. 1, p. 50.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 477.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • G. Szego, Orthogonal Polynomials, American Mathematical Society, 1981 edition, 432 Pages.

Crossrefs

Cf. A074962 [Glaisher-Kinkelin constant, also gives an asymptotic approximation for the hyperfactorials].
Cf. A246839 (trailing 0's).
Cf. A261175 (number of digits).

Programs

  • Haskell
    a002109 n = a002109_list !! n
    a002109_list = scanl1 (*) a000312_list  -- Reinhard Zumkeller, Jul 07 2012
    
  • Maple
    f := proc(n) local k; mul(k^k,k=1..n); end;
    A002109 := n -> exp(Zeta(1,-1,n+1)-Zeta(1,-1));
    seq(simplify(A002109(n)),n=0..11); # Peter Luschny, Jun 23 2012
  • Mathematica
    Table[Hyperfactorial[n], {n, 0, 11}] (* Zerinvary Lajos, Jul 10 2009 *)
    Hyperfactorial[Range[0, 11]] (* Eric W. Weisstein, Jul 14 2017 *)
    Join[{1},FoldList[Times,#^#&/@Range[15]]] (* Harvey P. Dale, Nov 02 2023 *)
  • PARI
    a(n)=prod(k=2,n,k^k) \\ Charles R Greathouse IV, Jan 12 2012
    
  • PARI
    a(n)=polcoeff(1-sum(k=0, n-1, a(k)*x^k/prod(j=1,k+1,(1+j^j*x+x*O(x^n)) )), n) \\ Paul D. Hanna, Oct 02 2013
    
  • Python
    A002109 = [1]
    for n in range(1, 10):
        A002109.append(A002109[-1]*n**n) # Chai Wah Wu, Sep 03 2014
    
  • Sage
    a = lambda n: prod(falling_factorial(n,k) for k in (1..n))
    [a(n) for n in (0..10)]  # Peter Luschny, Nov 29 2015

Formula

a(n)*A000178(n-1) = (n!)^n = A036740(n) for n >= 1.
Determinant of n X n matrix m(i, j) = binomial(i*j, i). - Benoit Cloitre, Aug 27 2003
a(n) = exp(zeta'(-1, n + 1) - zeta'(-1)) where zeta(s, z) is the Hurwitz zeta function. - Peter Luschny, Jun 23 2012
G.f.: 1 = Sum_{n>=0} a(n)*x^n / Product_{k=1..n+1} (1 + k^k*x). - Paul D. Hanna, Oct 02 2013
a(n) = A240993(n) / A000142(n+1). - Reinhard Zumkeller, Aug 31 2014
a(n) ~ A * n^(n*(n+1)/2 + 1/12) / exp(n^2/4), where A = 1.2824271291006226368753425... is the Glaisher-Kinkelin constant (see A074962). - Vaclav Kotesovec, Feb 20 2015
a(n) = Product_{k=1..n} ff(n,k) where ff denotes the falling factorial. - Peter Luschny, Nov 29 2015
log a(n) = (1/2) n^2 log n - (1/4) n^2 + (1/2) n log n + (1/12) log n + log(A) + o(1), where log(A) = A225746 is the logarithm of Glaisher's constant. - Charles R Greathouse IV, Mar 27 2020
From Amiram Eldar, Apr 30 2023: (Start)
Sum_{n>=1} 1/a(n) = A347345.
Sum_{n>=1} (-1)^(n+1)/a(n) = A347352. (End)
From Andrea Pinos, Apr 04 2024: (Start)
a(n) = e^(Integral_{x=1..n+1} (x - 1/2 - log(sqrt(2*Pi)) + (n+1-x)*Psi(x)) dx), where Psi(x) is the digamma function.
a(n) = e^(Integral_{x=1..n} (x + 1/2 - log(sqrt(2*Pi)) + log(Gamma(x+1))) dx). (End)

A062970 a(n) = 1 + Sum_{j=1..n} j^j.

Original entry on oeis.org

1, 2, 6, 33, 289, 3414, 50070, 873613, 17650829, 405071318, 10405071318, 295716741929, 9211817190185, 312086923782438, 11424093749340454, 449317984130199829, 18896062057839751445, 846136323944176515622, 40192544399240714091046, 2018612200059554303215025
Offset: 0

Views

Author

Henry Bottomley, Jul 23 2001

Keywords

Comments

The usual convention in the OEIS is that 0^0 = 1. This sequence could therefore be defined as Sum_{j=0..n} j^j. See also A001923.

Examples

			a(4) = 1 + 1^1 + 2^2 + 3^3 + 4^4 = 1 + 1 + 4 + 27 + 256 = 289.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[Binomial[n, k] StirlingS2[n, k] k!, {k, 0, n}], {n, 0, m}], {m, 0, 20}] (* Geoffrey Critzer, Mar 18 2009 *)
    Join[{1},Accumulate[Table[n^n,{n,20}]]+1] (* Harvey P. Dale, Aug 31 2016 *)
  • PARI
    { a=0; for (n=0, 100, write("b062970.txt", n, " ", a+=n^n) ) } \\ Harry J. Smith, Aug 14 2009
    
  • Python
    from itertools import count, accumulate, islice
    def A062970_gen(): # generator of terms
        yield from accumulate((k**k for k in count(1)),initial=1)
    A062970_list = list(islice(A062970_gen(),20)) # Chai Wah Wu, Jun 17 2022

Formula

a(n) = a(n-1) + A000312(n) = A001923(n) + 1.
a(n) ~ n^n. - Vaclav Kotesovec, Nov 27 2017

A060946 Trace of Vandermonde matrix of numbers 1,2,...,n, i.e., the matrix A with A[i,j] = i^(j-1), 1 <= i <= n, 1 <= j <= n.

Original entry on oeis.org

1, 3, 12, 76, 701, 8477, 126126, 2223278, 45269999, 1045269999, 26982694600, 769991065288, 24068076187769, 817782849441913, 30010708874832538, 1182932213481679514, 49844124089148547995, 2235755683827845079963, 106363105981739086612804
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), May 08 2001

Keywords

Comments

A member of the family of sequences defined by a(n) = Sum_{i=1..n}[i*c(1)*..*c(r)]^(i-1); c(i) integers. Here c(1)=1. - Ctibor O. Zizka, Feb 23 2008

Examples

			a(3) = 12 because the matrix is: 1,1,1 1,2,4 1,3,9 and the trace is 1+2+9 = 12.
1 = 1^0; 3 = 1^0 + 2^1; 12 = 1^0 + 2^1 + 3^2; 76 = 1^0 + 2^1 + 3^2 + 4^3.
		

Crossrefs

Cf. A000169. - Jonathan Vos Post, Feb 12 2010

Programs

  • Magma
    [(&+[j^(j-1): j in [1..n]]): n in [1..25]]; // G. C. Greubel, Apr 09 2021
    
  • Maple
    a:=n-> sum((j+1)^j, j=0..n-1): seq(a(n), n=1..25); # Zerinvary Lajos, Dec 17 2008
  • Mathematica
    Table[Sum[i^(i-1), {i, n}], {n, 25}]
  • PARI
    { for (n=1, 100, write("b060946.txt", n, " ", sum(k=1, n, k^(k - 1))); ) } \\ Harry J. Smith, Jul 15 2009
    
  • Python
    from itertools import accumulate, count, islice
    def A060946_gen(): # generator of terms
        yield from accumulate((k**(k-1) for k in count(1)))
    A060946_list = list(islice(A060946_gen(),20)) # Chai Wah Wu, Jun 17 2022
  • Sage
    [sum(j^(j-1) for j in (1..n)) for n in (1..25)] # G. C. Greubel, Apr 09 2021
    

Formula

a(n) = Sum_{k=1..n} k^(k-1).
a(n) = Sum_{k=1..n} A000169(k). - Jonathan Vos Post, Feb 12 2010

Extensions

More terms from Zak Seidov, Jul 07 2003

A073825 Numbers n such that Sum_{k=1..n} k^k is prime.

Original entry on oeis.org

2, 5, 6, 10, 30
Offset: 1

Views

Author

Rick L. Shepherd, Aug 13 2002

Keywords

Comments

Any additional terms are greater than 1320 with the next prime having more than 4120 digits.
No terms out to 3000. The next term would yield a prime with over 10000 digits. - John Sillcox (johnsillcox(AT)hotmail.com), Aug 05 2003
For every n, a(n) must be equal to 1 or 2 (mod 4) because Sum[k^k,{k,a(n)}] must be odd. Any additional terms are greater than 5368 with the next prime having more than 20025 digits. - Farideh Firoozbakht, Aug 09 2003
Soundararajan finds an asymptotic upper bound of log k / log log k prime numbers of the form 1^1 + 2^2 + ... + n^n less than k; that is, n << log a(n) / log log a(n). - Charles R Greathouse IV, Aug 27 2008
According to Andersen, the next term is larger than 28000, see Rivera link. - M. F. Hasler, Mar 01 2009
Conjecture: This sequence is infinite. - Daniel Hoying, Jul 20 2020

Crossrefs

Cf. A073826 (corresponding primes), A001923 (Sum k^k, k=1..n).

Programs

  • Mathematica
    v={}; Do[If[(Mod[n, 4]==1||Mod[n, 4]==2)&&PrimeQ[Sum[k^k, {k, n}]], v=Insert[v, n, -1]; Print[v]], {n, 5368}]
  • PARI
    s=0; for(k=1,1320, s=s+k^k; if(isprime(s), print1(k,", ")))

Formula

log a(n) >> n log^2 n. - Charles R Greathouse IV, May 17 2016

Extensions

Edited by Charles R Greathouse IV, Oct 27 2010

A001099 a(n) = n^n - a(n-1), with a(1) = 1.

Original entry on oeis.org

1, 3, 24, 232, 2893, 43763, 779780, 15997436, 371423053, 9628576947, 275683093664, 8640417354592, 294234689237661, 10817772136320355, 427076118244539020, 18019667955465012596, 809220593930871751581, 38537187481365665823843, 1939882468178947923300136
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A001923.

Programs

  • Mathematica
    Abs[Table[Sum[k^k*(-1)^(k+1),{k,1,n}],{n,1,30}]] (* Alexander Adamchuk, Jun 30 2006 *)
    RecurrenceTable[{a[1]==1,a[n]==n^n-a[n-1]},a,{n,20}] (* Harvey P. Dale, Jan 21 2015 *)
  • Python
    from itertools import accumulate, count, islice
    def A001099_gen(): # generator of terms
        yield from accumulate((k**k for k in count(1)),func=lambda x,y:y-x)
    A001099_list = list(islice(A001099_gen(),20)) # Chai Wah Wu, Jun 17 2022

Formula

Absolute value of Sum_{k=1..n} k^k*(-1)^(k+1). a(n) = n^n - (n-1)^(n-1) + (n-2)^(n-2) - ... - (-1)^n*1^1. - Alexander Adamchuk, Jun 30 2006

A173142 a(n) = n^n - (n-1)^(n-1) - (n-2)^(n-2) - ... - 1.

Original entry on oeis.org

1, 3, 22, 224, 2837, 43243, 773474, 15903604, 369769661, 9594928683, 274906599294, 8620383706328, 293663289402069, 10799919901775579, 426469796631518922, 17997426089579351788, 808344199828497012733
Offset: 1

Views

Author

Keywords

Examples

			1^1 - 0 = 1,
2^2 - 1 = 3,
3^3 - 2^2 - 1 = 22,
4^4 - 3^3 - 2^2 - 1 = 224, ...
		

Crossrefs

Cf. A001923.

Programs

  • Magma
    [n^n - (&+[(n-k)^(n-k): k in [1..n-1]]): n in [1..20]]; // G. C. Greubel, Feb 11 2019
    
  • Mathematica
    f[n_]:=n^n; lst={};Do[a=f[n];Do[a-=f[m],{m,n-1,1,-1}];AppendTo[lst, a],{n,30}];lst
    Table[n^n -Sum[(n-k)^(n-k), {k,1,n-1}], {n, 1, 20}] (* G. C. Greubel, Feb 11 2019 *)
  • PARI
    {a(n) = n^n - sum(k=1,n-1, (n-k)^(n-k))}; \\ G. C. Greubel, Feb 11 2019
    
  • Sage
    [n^n - sum((n-k)^(n-k) for k in (1..n-1)) for n in (1..20)] # G. C. Greubel, Feb 11 2019

Formula

a(n) = 2*(n^n) - A001923(n), for n > 0. - Kritsada Moomuang, Feb 11 2019
Showing 1-10 of 34 results. Next