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.

User: Henry Gould

Henry Gould's wiki page.

Henry Gould has authored 15 sequences. Here are the ten most recent ones:

A129785 a(n) = Product_{k=0..n-1} (1 + binomial(n,k)*a(k)), with a(0) = 1.

Original entry on oeis.org

1, 2, 6, 70, 18886, 3534626502, 313999279896461576406, 6253297416830848418609522661421870085933646
Offset: 0

Author

Henry Gould, Jun 03 2007

Keywords

Comments

A product analog of the Bell numbers.

Examples

			a(5) = (1+1)*(1+8)*(1+36)*(1+280)*(1+18886) = 3534626502.
		

References

  • H. W. Gould, A product analog of the Bell numbers, unpublished manuscript, Jun 03 2007.

Programs

  • Maple
    A129785 := proc(n)
        a := 1 ;
        for k from 0 to n-1 do
            a := a*(1+binomial(n-1,k)*procname(k)) ;
        end do:
        a ;
    end proc: # R. J. Mathar, Nov 24 2013
  • Mathematica
    a[n_]:= a[n] = Product[1 + Binomial[n-1, k]*a[k], {k, 0, n-1}];
    Table[a[n], {n, 0, 10}] (* Vaclav Kotesovec, Oct 27 2017 *)
  • PARI
    a(n)={my(v=vector(n+1)); for(n=0, #v-1, v[1+n]=prod(k=0, n-1, 1 + binomial(n-1, k)*v[1+k])); v[#v]} \\ Andrew Howroyd, Jan 03 2020

A129824 a(n) = Product_{k=0..n} (1 + binomial(n,k)).

Original entry on oeis.org

2, 4, 12, 64, 700, 17424, 1053696, 160579584, 62856336636, 63812936890000, 168895157342195152, 1169048914836855865344, 21209591746609937928524800, 1010490883477487017627972550656, 126641164340871500483202065902080000, 41817338589698457759723104703370865147904
Offset: 0

Author

Henry Gould, Jun 03 2007

Keywords

Comments

A product analog of the binomial expansion.
The sequence is a special case of a(n) = Product_{k=0..n} (1 + binomial(n,k)*x^k).
Let C be a collection of subsets of an n-element set S. Then a(n) is the number of possible shapes K = (k_0, ..., k_n) of C, where k_i is the number of i-element subsets of S in C. - Gabriel Cunningham (oeis(AT)gabrielcunningham.com), Nov 08 2007

Examples

			a(4) = (1+1)(1+4)(1+6)(1+4)(1+1) = 2*5*7*5*2 = 700.
		

References

  • H. W. Gould, A product analog of the binomial expansion, unpublished manuscript, Jun 03 2007.

Crossrefs

Programs

  • Magma
    A129824:= func< n | (&*[1 + Binomial(n,k): k in [0..n]]) >;
    [A129824(n): n in [0..20]]; // G. C. Greubel, Apr 26 2024
    
  • Mathematica
    Table[Product[1 + Binomial[n,k], {k,0,n}], {n,0,15}] (* Vaclav Kotesovec, Oct 27 2017 *)
  • PARI
    { a(n) = prod(k=0,n, 1 + binomial(n,k))}
    for(n=0,15,print1(a(n),", ")) \\ Paul D. Hanna, Oct 27 2017
    
  • SageMath
    def A129824(n): return product(1 + binomial(n,k) for k in range(n+1))
    [A129824(n) for n in range(21)] # G. C. Greubel, Apr 26 2024

Formula

a(n) = 2*A055612(n). - Reinhard Zumkeller, Jan 31 2015
a(n) ~ exp(n^2/2 + n - 1/12) * A^2 / (n^(n/2 + 1/3) * 2^((n-3)/2) * Pi^((n+1)/2)), where A is the Glaisher-Kinkelin constant A074962. - Vaclav Kotesovec, Oct 27 2017

Extensions

Corrected and extended by Vaclav Kotesovec, Oct 27 2017

A057660 a(n) = Sum_{k=1..n} n/gcd(n,k).

Original entry on oeis.org

1, 3, 7, 11, 21, 21, 43, 43, 61, 63, 111, 77, 157, 129, 147, 171, 273, 183, 343, 231, 301, 333, 507, 301, 521, 471, 547, 473, 813, 441, 931, 683, 777, 819, 903, 671, 1333, 1029, 1099, 903, 1641, 903, 1807, 1221, 1281, 1521, 2163, 1197, 2101, 1563, 1911, 1727
Offset: 1

Author

Henry Gould, Oct 15 2000

Keywords

Comments

Also sum of the orders of the elements in a cyclic group with n elements, i.e., row sums of A054531. - Avi Peretz (njk(AT)netvision.net.il), Mar 31 2001
Also inverse Moebius transform of EulerPhi(n^2), A002618.
Sequence is multiplicative with a(p^e) = (p^(2*e+1)+1)/(p+1). Example: a(10) = a(2)*a(5) = 3*21 = 63.
a(n) is the number of pairs (a, b) such that the equation ax = b is solvable in the ring (Zn, +, x). See the Mathematical Reflections link. - Michel Marcus, Jan 07 2017
From Jake Duzyk, Jun 06 2023: (Start)
These are the "contraharmonic means" of the improper divisors of square integers (inclusive of 1 and the square integer itself).
Permitting "Contraharmonic Divisor Numbers" to be defined analogously to Øystein Ore's Harmonic Divisor Numbers, the only numbers for which there exists an integer contraharmonic mean of the divisors are the square numbers, and a(n) is the n-th integer contraharmonic mean, expressible also as the sum of squares of divisors of n^2 divided by the sum of divisors of n^2. That is, a(n) = sigma_2(n^2)/sigma(n^2).
(a(n) = A001157(k)/A000203(k) where k is the n-th number such that A001157(k)/A000203(k) is an integer, i.e., k = n^2.)
This sequence is an analog of A001600 (Harmonic means of divisors of harmonic numbers) and A102187 (Arithmetic means of divisors of arithmetic numbers). (End)

References

  • David M. Burton, Elementary Number Theory, Allyn and Bacon Inc., Boston MA, 1976, p. 152.
  • H. W. Gould and Temba Shonhiwa, Functions of GCD's and LCM's, Indian J. Math. (Allahabad), Vol. 39, No. 1 (1997), pp. 11-35.
  • H. W. Gould and Temba Shonhiwa, A generalization of Cesaro's function and other results, Indian J. Math. (Allahabad), Vol. 39, No. 2 (1997), pp. 183-194.

Programs

  • Haskell
    a057660 n = sum $ map (div n) $ a050873_row n
    -- Reinhard Zumkeller, Nov 25 2013
    
  • Mathematica
    Table[ DivisorSigma[ 2, n^2 ] / DivisorSigma[ 1, n^2 ], {n, 1, 128} ]
    Table[Total[Denominator[Range[n]/n]], {n, 55}] (* Alonso del Arte, Oct 07 2011 *)
    f[p_, e_] := (p^(2*e + 1) + 1)/(p + 1); a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Nov 21 2020 *)
  • PARI
    a(n)=if(n<1,0,sumdiv(n,d,d*eulerphi(d)))
    
  • PARI
    a(n)=sumdivmult(n,d, eulerphi(d)*d) \\ Charles R Greathouse IV, Sep 09 2014
    
  • Python
    from math import gcd
    def A057660(n): return sum(n//gcd(n,k) for k in range(1,n+1)) # Chai Wah Wu, Aug 24 2023
    
  • Python
    from math import prod
    from sympy import factorint
    def A057660(n): return prod((p**((e<<1)+1)+1)//(p+1) for p,e in factorint(n).items()) # Chai Wah Wu, Aug 05 2024

Formula

a(n) = Sum_{d|n} d*A000010(d) = Sum_{d|n} d*A054522(n,d), sum of d times phi(d) for all divisors d of n, where phi is Euler's phi function.
a(n) = sigma_2(n^2)/sigma_1(n^2) = A001157(A000290(n))/A000203(A000290(n)) = A001157(A000290(n))/A065764(n). - Labos Elemer, Nov 21 2001
a(n) = Sum_{d|n} A000010(d^2). - Enrique Pérez Herrero, Jul 12 2010
a(n) <= (n-1)*n + 1, with equality if and only if n is noncomposite. - Daniel Forgues, Apr 30 2013
G.f.: Sum_{n >= 1} n*phi(n)*x^n/(1 - x^n) = x + 3*x^2 + 7*x^3 + 11*x^4 + .... Dirichlet g.f.: sum {n >= 1} a(n)/n^s = zeta(s)*zeta(s-2)/zeta(s-1) for Re s > 3. Cf. A078747 and A176797. - Peter Bala, Dec 30 2013
a(n) = Sum_{i=1..n} numerator(n/i). - Wesley Ivan Hurt, Feb 26 2017
L.g.f.: -log(Product_{k>=1} (1 - x^k)^phi(k)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 21 2018
From Richard L. Ollerton, May 10 2021: (Start)
a(n) = Sum_{k=1..n} lcm(n,k)/k.
a(n) = Sum_{k=1..n} gcd(n,k)*phi(gcd(n,k))/phi(n/gcd(n,k)). (End)
From Vaclav Kotesovec, Jun 13 2021: (Start)
Sum_{k=1..n} a(k)/k ~ 3*zeta(3)*n^2/Pi^2.
Sum_{k=1..n} k^2/a(k) ~ A345294 * n.
Sum_{k=1..n} k*A000010(k)/a(k) ~ A345295 * n. (End)
Sum_{k=1..n} a(k) ~ 2*zeta(3)*n^3/Pi^2. - Vaclav Kotesovec, Jun 10 2023

Extensions

More terms from James Sellers, Oct 16 2000

A057661 a(n) = Sum_{k=1..n} lcm(n,k)/n.

Original entry on oeis.org

1, 2, 4, 6, 11, 11, 22, 22, 31, 32, 56, 39, 79, 65, 74, 86, 137, 92, 172, 116, 151, 167, 254, 151, 261, 236, 274, 237, 407, 221, 466, 342, 389, 410, 452, 336, 667, 515, 550, 452, 821, 452, 904, 611, 641, 761, 1082, 599, 1051, 782, 956, 864, 1379, 821, 1166
Offset: 1

Author

Henry Gould, Oct 15 2000

Keywords

Comments

Sum of numerators of n-th order Farey series (cf. A006842). - Benoit Cloitre, Oct 28 2002
Equals row sums of triangle A143613. - Gary W. Adamson, Aug 27 2008
Equals row sums of triangle A159936. - Gary W. Adamson, Apr 26 2009
Also row sums of triangle A164306. - Reinhard Zumkeller, Aug 12 2009

References

  • H. W. Gould and Temba Shonhiwa, Functions of GCD's and LCM's, Indian J. Math. (Allahabad), 39 (1997), 11-35.
  • H. W. Gould and Temba Shonhiwa, A generalization of Cesaro's function and other results, Indian J. Math. (Allahabad), 39 (1997), 183-194.

Crossrefs

Programs

  • Haskell
    a057661 n = a051193 n `div` n  -- Reinhard Zumkeller, Jun 10 2015
    
  • Magma
    [&+[&+[h: h in [1..d] | GCD(h,d) eq 1]: d in Divisors(n)]: n in [1..100]]; // Jaroslav Krizek, Dec 28 2016
    
  • Mathematica
    Table[Total[Numerator[Range[n]/n]], {n, 55}] (* Alonso del Arte, Oct 07 2011 *)
    f[p_, e_] := (p^(2*e + 1) + 1)/(p + 1); a[n_] := (1 + Times @@ f @@@ FactorInteger[n])/2; Array[a, 100] (* Amiram Eldar, Apr 26 2023 *)
  • PARI
    a(n)=sum(k=1,n,lcm(n,k))/n \\ Charles R Greathouse IV, Feb 07 2017
    
  • Python
    from math import lcm
    def A057661(n): return sum(lcm(n,k)//n for k in range(1,n+1)) # Chai Wah Wu, Aug 24 2023
    
  • Python
    from math import prod
    from sympy import factorint
    def A057661(n): return 1+prod((p**((e<<1)+1)+1)//(p+1) for p,e in factorint(n).items())>>1 # Chai Wah Wu, Aug 05 2024

Formula

a(n) = (1+A057660(n))/2.
a(n) = A051193(n)/n.
a(n) = Sum_{d|n} psi(d), where psi(m) = is the sum of totatives of m (A023896). - Jaroslav Krizek, Dec 28 2016
a(n) = Sum_{i=1..n} denominator(n/i). - Wesley Ivan Hurt, Feb 26 2017
G.f.: x/(2*(1 - x)) + (1/2)*Sum_{k>=1} k*phi(k)*x^k/(1 - x^k), where phi() is the Euler totient function (A000010). - Ilya Gutkovskiy, Aug 31 2017
If p is prime, then a(p) = T(p-1) + 1 = p(p-1)/2 + 1, where T(n) = n(n+1)/2 is the n-th triangular number (A000217). - David Terr, Feb 10 2019
Sum_{k=1..n} a(k) ~ zeta(3) * n^3 / Pi^2. - Vaclav Kotesovec, May 29 2021
Dirichlet g.f.: zeta(s)*(1 + zeta(s-2)/zeta(s-1))/2 (Franco, 2019). - Amiram Eldar, Mar 26 2022

Extensions

More terms from James Sellers, Oct 16 2000

A054978 Obtained from sequence of lucky numbers (A000959) by taking iterated absolute value differences of terms and extracting the leading diagonal.

Original entry on oeis.org

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

Author

Henry Gould, May 29 2000

Keywords

Comments

The classical Gilbreath-Proth Conjecture is that when iterated absolute differences are formed from the sequence of primes, the leading diagonal is 2,1,1,1,1,1,1,1,1,... (see A036262). This is an analog for the lucky numbers sequence.
This is the Gilbreath transform of the lucky numbers (cf. A362451). It appears that apart from the initial term, all the other terms are 0 or 2 (compare A362460). - N. J. A. Sloane, May 07 2023

References

  • Henry Gould, Gilbreath-Proth type sequence generated from Lucky numbers, unpublished.

Crossrefs

Programs

  • Haskell
    a054978 n = a054978_list !! n
    a054978_list = map head $ iterate
                   (\lds -> map abs $ zipWith (-) (tail lds) lds) a000959_list
    -- Reinhard Zumkeller, Feb 10 2015
  • Mathematica
    nmax = 104; (* index of last term *)
    imax = 400; (* max index of initial lucky array L *)
    L = Table[2 i + 1, {i, 0, imax}];
    For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]];
    T[n_, n_] := If[n + 1 <= Length[L], L[[n + 1]], Print["imax should be increased"]; 0];
    T[n_, k_] := T[n, k] = Abs[T[n, k + 1] - T[n - 1, k]];
    a[n_] := T[n, 0];
    Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Sep 22 2021 *)
    A000959[upto_]:=Module[{s=2,a=Range[1,upto,2]},While[sA054978[upto_]:=Module[{d=A000959[upto]},Join[{1},Table[First[d=Abs[Differences[d]]],Length[d]-1]]];
    A054978[1000] (* Uses lucky numbers up to 1000 *) (* Paolo Xausa, May 11 2023 *)

Formula

a(n) = A254967(n,0). - Reinhard Zumkeller, Feb 11 2015

Extensions

More terms from Naohiro Nomoto, Jun 16 2001

A054977 a(0)=2, a(n)=1 for n >= 1.

Original entry on oeis.org

2, 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

Author

Henry Gould, May 29 2000

Keywords

Comments

Arises in Gilbreath-Proth conjecture; see A036262.
a(n) is also the continued fraction for (3+sqrt(5))/2. - Enrique Pérez Herrero, May 16 2010
a(n) is also the denominator for odd Bernoulli Numbers. - Enrique Pérez Herrero, Jul 17 2010
a(n) = 3 - A040000(n); a(n) = A182579(n+1,1). - Reinhard Zumkeller, May 07 2012
From Paul Curtz, Feb 04 2014: (Start)
Difference table of a(n):
2, 1, 1, 1, 1, 1, 1, ...
-1, 0, 0, 0, 0, 0, 0, ...
1, 0, 0, 0, 0, 0, 0, ...
-1, 0, 0, 0, 0, 0, 0, ...
1, 0, 0, 0, 0, 0, 0, ...
-1, 0, 0, 0, 0, 0, 0, ... .
a(n) is an autosequence of second kind. Its inverse binomial transform is the signed sequence with the main diagonal (here A000038) double of the following diagonal (here A000007). Here the other diagonals are also A000007.
b(n) = A000032(n) - a(n) = 0, 0, 2, 3, 6, 10, 17, 28, ... = 0, followed by A001610(n) is the autosequence of second kind preceding A000032(n).
The corresponding autosequence of first kind, 0 followed by 1's, is A057427(n).
The Akiyama-Tanigawa transform applied to a(n) yields a(n).
(End)
Harmonic or factorial (base) expansion of e, cf. MathWorld link. - M. F. Hasler, Nov 25 2018
Decimal expansion of 19/90. - Elmo R. Oliveira, Aug 09 2024

Crossrefs

Programs

Formula

a(n) = A027642(2*n+1). - Enrique Pérez Herrero, Jul 17 2010
G.f.: (2-x)/(1-x). - Wolfdieter Lang, Oct 05 2014
Sum_{k>=1} a(n)/n! = exp(1). - G. C. Greubel, Nov 26 2018

A038560 Binomial recurrence coefficients.

Original entry on oeis.org

2, 3, 5, 13, 39, 135, 527, 2277, 10749, 54905, 301111, 1761803
Offset: 0

Author

Keywords

Comments

Apparently defined by a(n) = A032347(n) + A038559(n). - R. J. Mathar, Nov 24 2013
Apparently the binomial transform of the sequence [2,5,13,39,...] is the same sequence without the "3". - R. J. Mathar, May 28 2019

References

  • H. W. Gould, A linear binomial recurrence and the Bell numbers and polynomials, preprint, 1998.

Crossrefs

Related to A000110, A040027 and A038559.

A045501 Third-from-right diagonal of triangle A121207.

Original entry on oeis.org

1, 1, 4, 14, 54, 233, 1101, 5625, 30846, 180474, 1120666, 7352471, 50772653, 367819093, 2787354668, 22039186530, 181408823710, 1551307538185, 13756835638385, 126298933271289, 1198630386463990, 11742905240821910
Offset: 1

Author

Keywords

Comments

With leading 0 and offset 2: number of permutations beginning with 321 and avoiding 1-23. - Ralf Stephan, Apr 25 2004
Second diagonal in table of binomial recurrence coefficients. Related to A040027. - Vladeta Jovovic, Feb 05 2008
Equals eigensequence of triangle A104712. - Gary W. Adamson, Apr 10 2009
a(n) is the number of set partitions of {1,2,...,n+1} in which the last block has length 2; the blocks are arranged in order of their least element. - Don Knuth, Jun 12 2017

Crossrefs

Cf. A104712. - Gary W. Adamson, Apr 10 2009
Column k=2 of A124496.

Programs

  • Mathematica
    a[1] = a[2] = 1; a[n_] := a[n] = Sum[Binomial[n, k+1]*a[k], {k, 0, n-1}];
    Array[a, 22] (* Jean-François Alcover, Jul 14 2018, after Vladeta Jovovic *)
  • PARI
    {a(n)=local(A=x+x^2); for(i=1, n, A=x+x*subst(A, x, x/(1-x+x*O(x^n)))/(1-x)^2); polcoeff(A, n)} /* Paul D. Hanna, Mar 23 2012 */
    
  • Python
    # The function Gould_diag is defined in A121207.
    A045501_list = lambda size: Gould_diag(3, size)
    print(A045501_list(24)) # Peter Luschny, Apr 24 2016

Formula

a(n+1) = Sum_{k=0..n} binomial(n+2, k+2)*a(k). - Vladeta Jovovic, Nov 10 2003
With offset 2, e.g.f.: x^2 + exp(exp(x))/2 * Integral_{0..x} t^2*exp(-exp(t)+t) dt. - Ralf Stephan, Apr 25 2004
G.f.: A(x) = Sum_{k>=0} x^(k+1)/((1-k*x)^2 * Product_{m=0..k} (1 - m*x)). - Vladeta Jovovic, Feb 05 2008
O.g.f. satisfies: A(x) = x + x*A( x/(1-x) ) / (1-x)^2. - Paul D. Hanna, Mar 23 2012

Extensions

More terms from Vladeta Jovovic, Nov 10 2003
Entry revised by N. J. A. Sloane, Dec 11 2006

A045499 Fourth-from-right diagonal of triangle A121207.

Original entry on oeis.org

1, 1, 5, 20, 85, 400, 2046, 11226, 65676, 407787, 2675410, 18475311, 133843405, 1014271763, 8019687099, 66011609670, 564494701167, 5005880952390, 45958055208576, 436161412834300, 4273045478169842, 43160044390231165
Offset: 0

Author

Keywords

Comments

With leading 0 and offset 3: number of permutations beginning with 4321 and avoiding 1-23. - Ralf Stephan, Apr 25 2004
a(n) is the number of set partitions of {1,2,...,n+3} in which the last block has length 3; the blocks are arranged in order of their least element. - Don Knuth, Jun 12 2017

Crossrefs

Column k=3 of A124496.

Programs

  • Maple
    A045499 := proc(n)
        option remember ;
        if n =0  then
            1 ;
        else
            add( binomial(n+2,k+3)*procname(k),k=0..n-1) ;
        end if;
    end proc: # R. J. Mathar, Jun 03 2014
  • Mathematica
    a[0] = 1; a[n_] := a[n] = Sum[a[k]*Binomial[n+2, k+3], {k, 0, n-1}];
    Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Nov 20 2017 *)
  • PARI
    {a(n)=local(A=1+x); for(i=1, n, A=1+x*subst(A, x, x/(1-x+x*O(x^n)))/(1-x)^4); polcoeff(A, n)} /* Paul D. Hanna, Mar 23 2012 */
    
  • Python
    # The function Gould_diag is defined in A121207.
    A045499_list = lambda size: Gould_diag(4, size)
    print(A045499_list(24)) # Peter Luschny, Apr 24 2016

Formula

a(n+1) = Sum_{k=0..n} binomial(n+3, k+3)*a(k). - Vladeta Jovovic, Nov 10 2003
With offset 3, e.g.f.: x^3 + exp(exp(x))/6 * int[0..x, t^3*exp(-exp(t)+t) dt]. - Ralf Stephan, Apr 25 2004
O.g.f. satisfies: A(x) = 1 + x*A( x/(1-x) ) / (1-x)^4. [Paul D. Hanna, Mar 23 2012]

Extensions

More terms from Vladeta Jovovic, Nov 10 2003
Entry revised by N. J. A. Sloane, Dec 11 2006

A045500 Fifth-from-right diagonal of triangle A121207.

Original entry on oeis.org

1, 1, 6, 27, 125, 635, 3488, 20425, 126817, 831915, 5744784, 41618459, 315388311, 2493721645, 20526285716, 175529425815, 1556577220651, 14290644428279, 135624265589086, 1328702240382589, 13420603191219111, 139592874355534071
Offset: 0

Author

Keywords

Comments

With leading 0 and offset 4: number of permutations beginning with 54321 and avoiding 1-23. - Ralf Stephan, Apr 25 2004
a(n) is the number of set partitions of {1,2,...,n+4} in which the last block has length 4: the blocks are arranged in order of their least element. - Don Knuth, Jun 12 2017

References

  • See also references under sequence A040027.

Crossrefs

Column k=4 of A124496.

Programs

  • Mathematica
    a[0] = a[1] = 1; a[n_] := a[n] = Sum[Binomial[n+3, k+4]*a[k], {k, 0, n-1}];
    Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Jul 14 2018, after Vladeta Jovovic *)
  • PARI
    {a(n)=local(A=1+x); for(i=1, n, A=1+x*subst(A, x, x/(1-x+x*O(x^n)))/(1-x)^5); polcoeff(A, n)} /* Paul D. Hanna, Mar 23 2012 */
    
  • Python
    # The function Gould_diag is defined in A121207.
    A045500_list = lambda size: Gould_diag(5, size)
    print(A045500_list(24)) # Peter Luschny, Apr 24 2016

Formula

a(n+1) = Sum_{k=0..n} binomial(n+4, k+4)*a(k). - Vladeta Jovovic, Nov 10 2003
With offset 4, e.g.f.: x^4 + exp(exp(x))/24 * int[0..x, t^4*exp(-exp(t)+t) dt]. - Ralf Stephan, Apr 25 2004
O.g.f. satisfies: A(x) = 1 + x*A( x/(1-x) ) / (1-x)^5. - Paul D. Hanna, Mar 23 2012

Extensions

More terms from Vladeta Jovovic, Nov 10 2003
Entry revised by N. J. A. Sloane, Dec 11 2006