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.

A126062 Array read by antidiagonals: see A128195 for details.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 9, 15, 1, 1, 16, 65, 64, 1, 1, 25, 175, 511, 325, 1, 1, 36, 369, 2020, 4743, 1956, 1, 1, 49, 671, 5629, 27313, 52525, 13699, 1, 1, 64, 1105, 12736, 100045, 440896, 683657, 109600, 1, 1, 81, 1695, 25099, 280581, 2122449, 8390875, 10256775
Offset: 0

Views

Author

N. J. A. Sloane, Feb 28 2007

Keywords

Examples

			Array begins:
[0]  1,  1,   1,     1,      1,       1,         1,          1,            1
[1]  1,  4,  15,    64,    325,    1956,     13699,     109600,       986409
[2]  1,  9,  65,   511,   4743,   52525,    683657,   10256775,    174369527
[3]  1, 16, 175,  2020,  27313,  440896,   8390875,  184647364,   4616348125
[4]  1, 25, 369,  5629, 100045, 2122449,  53163625, 1542220261,  50895431301
[5]  1, 36, 671, 12736, 280581, 7376356, 229151411, 8252263296, 338358810761
		

Crossrefs

The second row counts the variations of n distinct objects A007526.
The second column is sequence A000290. The third column is sequence A005917.

Programs

  • Maple
    A126062 := proc(k,n) if n = 0 then 1 ; else (n*k+1)*(A126062(k,n-1)+k^n) ; fi ; end: for diag from 0 to 10 do for k from diag to 0 by -1 do n := diag-k ; printf("%d, ",A126062(k,n)) ; od ; od ; # R. J. Mathar, May 18 2007
  • Mathematica
    a[, 0] = 1; a[k, n_] := a[k, n] = (n*k+1)*(a[k, n-1]+k^n); Table[a[k-n, n], {k, 0, 10}, {n, 0, k}] // Flatten (* Jean-François Alcover, Jan 08 2014 *)

Formula

T(k, n) = (n*k+1)*(T(k, n-1) + k^n), T(k, 0) = 1. - Peter Luschny, Feb 26 2007

Extensions

More terms from R. J. Mathar, May 18 2007

A005917 Rhombic dodecahedral numbers: a(n) = n^4 - (n - 1)^4.

Original entry on oeis.org

1, 15, 65, 175, 369, 671, 1105, 1695, 2465, 3439, 4641, 6095, 7825, 9855, 12209, 14911, 17985, 21455, 25345, 29679, 34481, 39775, 45585, 51935, 58849, 66351, 74465, 83215, 92625, 102719, 113521, 125055, 137345, 150415, 164289, 178991
Offset: 1

Views

Author

Keywords

Comments

Final digits of a(n), i.e., a(n) mod 10, are repeated periodically with period of length 5 {1,5,5,5,9}. There is a symmetry in this list since the sum of two numbers equally distant from the ends is equal to 10 = 1 + 9 = 5 + 5 = 2*5. Last two digits of a(n), i.e., a(n) mod 100, are repeated periodically with period of length 50. - Alexander Adamchuk, Aug 11 2006
a(n) = VarScheme(n,2) in the scheme displayed in A128195. - Peter Luschny, Feb 26 2007
If Y is a 3-subset of a 2n-set X then, for n >= 2, a(n-2) is the number of 4-subsets of X intersecting Y. - Milan Janjic, Nov 18 2007
The numbers are the constant number found in magic squares of order n, where n is an odd number, see the comment in A006003. A Magic Square of side 1 is 1; 3 is 15; 5 is 65 and so on. - David Quentin Dauthier, Nov 07 2008
Two times the area of the triangle with vertices at (0,0), ((n - 1)^2, n^2), and (n^2, (n - 1)^2). - J. M. Bergot, Jun 25 2013
Bisection of A006003. - Omar E. Pol, Sep 01 2018
Construct an array M with M(0,n) = 2*n^2 + 4*n + 1 = A056220(n+1), M(n,0) = 2*n^2 + 1 = A058331(n) and M(n,n) = 2*n*(n+1) + 1 = A001844(n). Row(n) begins with all the increasing odd numbers from A058331(n) to A001844(n) and column(n) begins with all the decreasing odd numbers from A056220(n+1) to A001844(n). The sum of the terms in row(n) plus those in column(n) minus M(n,n) equals a(n+1). The first five rows of array M are [1, 7, 17, 31, 49, ...]; [3, 5, 15, 29, 47, ...]; [9, 11, 13, 27, 45, ...]; [19, 21, 23, 25, 43, ...]; [33, 35, 37, 39, 41, ...]. - J. M. Bergot, Jul 16 2013 [This contribution was moved here from A047926 by Petros Hadjicostas, Mar 08 2021.]
For n>=2, these are the primitive sides s of squares of type 2 described in A344332. - Bernard Schott, Jun 04 2021
(a(n) + 1) / 2 = A212133(n) is the number of cells in the n-th rhombic-dodecahedral polycube. - George Sicherman, Jan 21 2024

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, p. 53.
  • E. Deza and M. M. Deza, Figurate Numbers, World Scientific Publishing, 2012, pp. 123-124.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

(1/12)*t*(2*n^3 - 3*n^2 + n) + 2*n - 1 for t = 2, 4, 6, ... gives A049480, A005894, A063488, A001845, A063489, A005898, A063490, A057813, A063491, A005902, A063492, A063493, A063494, A063495, A063496.
Column k=3 of A047969.

Programs

  • Haskell
    a005917 n = a005917_list !! (n-1)
    a005917_list = map sum $ f 1 [1, 3 ..] where
       f x ws = us : f (x + 2) vs where (us, vs) = splitAt x ws
    -- Reinhard Zumkeller, Nov 13 2014
    
  • Magma
    [n^4 - (n-1)^4: n in [1..50]]; // Vincenzo Librandi, Aug 01 2011
    
  • Mathematica
    Table[n^4-(n-1)^4,{n,40}]  (* Harvey P. Dale, Apr 01 2011 *)
    #[[2]]-#[[1]]&/@Partition[Range[0,40]^4,2,1] (* More efficient than the above Mathematica program because it only has to calculate each 4th power once *) (* Harvey P. Dale, Feb 07 2015 *)
    Differences[Range[0,40]^4] (* Harvey P. Dale, Aug 11 2023 *)
  • PARI
    a(n)=n^4-(n-1)^4 \\ Charles R Greathouse IV, Jul 31 2011
    
  • Python
    A005917_list, m = [], [24, -12, 2, 1]
    for _ in range(10**2):
        A005917_list.append(m[-1])
        for i in range(3):
            m[i+1] += m[i] # Chai Wah Wu, Dec 15 2015

Formula

a(n) = (2*n - 1)*(2*n^2 - 2*n + 1).
Sum_{i=1..n} a(i) = n^4 = A000583(n). First differences of A000583.
G.f.: x*(1+x)*(1+10*x+x^2)/(1-x)^4. - Simon Plouffe in his 1992 dissertation
More generally, g.f. for n^m - (n - 1)^m is Euler(m, x)/(1 - x)^m, where Euler(m, x) is Eulerian polynomial of degree m (cf. A008292). E.g.f.: x*(exp(y/(1 - x)) - exp(x*y/(1 - x)))/(exp(x*y/(1 - x))-x*exp(y/(1 - x))). - Vladeta Jovovic, May 08 2002
a(n) = sum of the next (2*n - 1) odd numbers; i.e., group the odd numbers so that the n-th group contains (2*n - 1) elements like this: (1), (3, 5, 7), (9, 11, 13, 15, 17), (19, 21, 23, 25, 27, 29, 31), ... E.g., a(3) = 65 because 9 + 11 + 13 + 15 + 17 = 65. - Xavier Acloque, Oct 11 2003
a(n) = 2*n - 1 + 12*Sum_{i = 1..n} (i - 1)^2. - Xavier Acloque, Oct 16 2003
a(n) = (4*binomial(n,2) + 1)*sqrt(8*binomial(n,2) + 1). - Paul Barry, Mar 14 2004
Binomial transform of [1, 14, 36, 24, 0, 0, 0, ...], if the offset is 0. - Gary W. Adamson, Dec 20 2007
Sum_{i=1..n-1}(a(i) + a(i+1)) = 8*Sum_{i=1..n}(i^3 + i) = 16*A002817(n-1) for n > 1. - Bruno Berselli, Mar 04 2011
a(n+1) = a(n) + 2*(6*n^2 + 1) = a(n) + A005914(n). - Vincenzo Librandi, Mar 16 2011
a(n) = -a(-n+1). a(n) = (1/6)*(A181475(n) - A181475(n-2)). - Bruno Berselli, Sep 26 2011
a(n) = A045975(2*n-1,n) = A204558(2*n-1)/(2*n - 1). - Reinhard Zumkeller, Jan 18 2012
a(n+1) = Sum_{k=0..2*n+1} (A176850(n,k) - A176850(n-1,k))*(2*k + 1), n >= 1. - L. Edson Jeffery, Nov 02 2012
a(n) = A005408(n-1) * A001844(n-1) = (2*(n - 1) + 1) * (2*(n - 1)*n + 1) = A000290(n-1)*12 + 2 + a(n-1). - Bruce J. Nicholson, May 17 2017
a(n) = A007588(n) + A007588(n-1) = A000292(2n-1) + A000292(2n-2) + A000292(2n-3) = A002817(2n-1) - A002817(2n-2). - Bruce J. Nicholson, Oct 22 2017
a(n) = A005898(n-1) + 6*A000330(n-1) (cf. Deza, Deza, 2012, p. 123, Section 2.6.2). - Felix Fröhlich, Oct 01 2018
a(n) = A300758(n-1) + A005408(n-1). - Bruce J. Nicholson, Apr 23 2020
G.f.: polylog(-4, x)*(1-x)/x. See the Simon Plouffe formula above (with expanded numerator), and the g.f. of the rows of A008292 by Vladeta Jovovic, Sep 02 2002. - Wolfdieter Lang, May 10 2021

A007526 a(n) = n*(a(n-1) + 1), a(0) = 0.

Original entry on oeis.org

0, 1, 4, 15, 64, 325, 1956, 13699, 109600, 986409, 9864100, 108505111, 1302061344, 16926797485, 236975164804, 3554627472075, 56874039553216, 966858672404689, 17403456103284420, 330665665962403999, 6613313319248080000, 138879579704209680021, 3055350753492612960484
Offset: 0

Views

Author

Keywords

Comments

Eighteenth- and nineteenth-century combinatorialists call this the number of (nonnull) "variations" of n distinct objects, namely the number of permutations of nonempty subsets of {1,...,n}. Some early references to this sequence are Izquierdo (1659), Caramuel de Lobkowitz (1670), Prestet (1675) and Bernoulli (1713). - Don Knuth, Oct 16 2001, Aug 16 2004
Stirling transform of A006252(n-1) = [0,1,1,2,4,14,38,...] is a(n-1) = [0,1,4,15,64,...]. - Michael Somos, Mar 04 2004
In particular, for n >= 1 a(n) is the number of nonempty sequences with n or fewer terms, each a distinct element of {1,...,n}. - Rick L. Shepherd, Jun 08 2005
a(n) = VarScheme(1,n). See A128195 for the definition of VarScheme(k,n). - Peter Luschny, Feb 26 2007
if s(n) is a sequence of the form s(0)=x, s(n)= n(s(n-1)+k), then s(n)= n!*x + a(n)*k. - Gary Detlefs, Jun 06 2010
Exponential convolution of factorials (A000142) and nonnegative integers (A001477). - Vladimir Reshetnikov, Oct 07 2016
For n > 0, a(n) is the number of maps f: {1,...,n} -> {1,...,n} satisfying equal(x,y) <= equal(f(x),f(y)) for all x,y, where equal(x,y) is n if x and y are equal and min(x,y) if not. Here equal(x,y) is the equality predicate in the n-valued Gödel logic, see e. g. the Wikipedia chapter on many-valued logics. - Mamuka Jibladze, Mar 12 2025

Examples

			G.f. = x + 4*x^2 + 15*x^3 + 64*x^4 + 325*x^5 + 1956*x^6 + 13699*x^7 + ...
Consider the nonempty subsets of the set {1,2,3,...,n} formed by the first n integers. E.g., for n = 3 we have {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}. For each subset S we determine its number of parts, that is nprts(S). The sum over all subsets is written as sum_{S=subsets}. Then we have A007526 = Sum_{S=subsets} nprts(S)!. E.g., for n = 3 we have 1!+1!+1!+2!+2!+2!+3! = 15. - _Thomas Wieder_, Jun 17 2006
a(3)=15: Let the objects be a, b, and c. The fifteen nonempty ordered subsets are {a}, {b}, {c}, {ab}, {ba}, {ac}, {ca}, {bc}, {cb}, {abc}, {acb}, {bac}, {bca}, {cab} and {cba}.
		

References

  • Jacob Bernoulli, Ars Conjectandi (1713), page 127.
  • Johannes Caramuel de Lobkowitz, Mathesis Biceps Vetus et Nova (Campania: 1670), volume 2, 942-943.
  • J. K. Horn, personal communication to Robert G. Wilson v.
  • Sebastian Izquierdo, Pharus Scientiarum (Lyon: 1659), 327-328.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A068424.
Partial sums of A001339.
Column k=1 of A326659.

Programs

  • GAP
    a:=[0];; for n in [2..25] do a[n]:=(n-1)*(a[n-1]+1); od; a; # Muniru A Asiru, Aug 07 2018
  • Haskell
    a007526 n = a007526_list !! n
    a007526_list = 0 : zipWith (*) [1..] (map (+ 1) a007526_list)
    -- Reinhard Zumkeller, Aug 27 2013
    
  • Maple
    A007526 := n -> add(n!/k!,k=0..n) - 1;
    a := n -> n*hypergeom([1,1-n],[],-1):
    seq(simplify(a(n)), n=0..22); # Peter Luschny, May 09 2017
    # third Maple program:
    a:= proc(n) option remember;
          `if`(n<0, 0, n*(1+a(n-1)))
        end:
    seq(a(n), n=0..23);  # Alois P. Heinz, Jan 06 2020
  • Mathematica
    Table[ Sum[n!/(n - r)!, {r, 1, n}], {n, 0, 20}] (* or *) Table[n!*Sum[1/k!, {k, 0, n - 1}], {n, 0, 20}]
    a=1;Table[a=(a-1)*(n-1);Abs[a],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Nov 20 2009 *)
    FoldList[#1*#2 + #2 &, 0, Range[19]] (* Robert G. Wilson v, Jul 07 2012 *)
    f[n_] := Floor[E*n! - 1]; f[0] = 0; Array[f, 20, 0] (* Robert G. Wilson v, Feb 06 2015 *)
    a[n_] := n (a[n - 1] +1); a[0] = 0; Array[a, 20, 0] (* Robert G. Wilson v, Feb 06 2015 *)
    Round@Table[E n Gamma[n, 1], {n, 0, 20}] (* Round is equivalent to FullSimplify here, but is much faster - Vladimir Reshetnikov, Oct 07 2016 *)
  • PARI
    {a(n) = if( n<1, 0, n * (a(n-1) + 1))}; /* Michael Somos, Apr 06 2003 */
    
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff(x * exp(x + x * O(x^n)) / (1 - x), n))}; /* Michael Somos, Mar 04 2004 */
    
  • PARI
    a(n)= sum(k=1,n, prod(j=0,k-1,n-j))
    

Formula

a(n) = A000522(n) - 1.
a(n) = floor(e*n! - 1). - Joseph K. Horn
a(n) = Sum_{r=1..n} A008279(n, r)= n!*(Sum_{k=0..n-1} 1/k!).
a(n) = n*(a(n-1) + 1).
E.g.f.: x*exp(x)/(1-x). - Vladeta Jovovic, Aug 25 2002
a(n) = Sum_{k=1..n} k!*C(n, k). - Benoit Cloitre, Dec 06 2002
a(n) = Sum_{k=0..n-1} (n! / k!). - Ross La Haye, Sep 22 2004
a(n) = Sum_{k=1..n} (Product_{j=0..k-1} (n-j)). - Joerg Arndt, Apr 24 2011
Binomial transform of n! - !n. - Paul Barry, May 12 2004
Inverse binomial transform of A066534. - Ross La Haye, Sep 16 2004
For n > 0, a(n) = exp(1) * Integral_{x>=0} exp(-exp(x/n)+x) dx. - Gerald McGarvey, Oct 19 2006
a(n) = Integral_{x>=0} (((1+x)^n-1)*exp(-x)). - Paul Barry, Feb 06 2008
a(n) = GAMMA(n+2)*(1+(-GAMMA(n+1)+exp(1)*GAMMA(n+1, 1))/GAMMA(n+1)). - Thomas Wieder, May 02 2009
E.g.f.: -1/G(0) where G(k) = 1 - 1/(x - x^3/(x^2+(k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 10 2012
Conjecture : a(n) = (n+2)*a(n-1) - (2*n-1)*a(n-2) + (n-2)*a(n-3). - R. J. Mathar, Dec 04 2012 [Conjecture verified by Robert FERREOL, Aug 04 2018]
G.f.: (Q(0) - 1)/(1-x), where Q(k)= 1 + (2*k + 1)*x/( 1 - x - 2*x*(1-x)*(k+1)/(2*x*(k+1) + (1-x)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 09 2013
G.f.: 2/((1-x)*G(0)) - 1/(1-x), where G(k)= 1 + 1/(1 - x*(2*k+2)/(x*(2*k+3) - 1 + x*(2*k+2)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 31 2013
a(n) = (...((((((0)+1)*1+1)*2+1)*3+1)*4+1)...*n). - Bob Selcoe, Jul 04 2013
G.f.: Q(0)/(2-2*x) - 1/(1-x), where Q(k)= 1 + 1/(1 - x*(k+1)/(x*(k+1) + (1-x)/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 09 2013
G.f.: (W(0) - 1)/(1-x), where W(k) = 1 - x*(k+1)/( x*(k+2) - 1/(1 - x*(k+1)/( x*(k+1) - 1/W(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Aug 25 2013
For n > 0: a(n) = n*A000522(n-1). - Reinhard Zumkeller, Aug 27 2013
a(n) = (...(((((0)*1+1)*2+2)*3+3)*4+4)...*n+n). - Bob Selcoe, Apr 30 2014
0 = 1 + a(n)*(+1 + a(n+1) - a(n+2)) + a(n+1)*(+2 +a(n+1)) - a(n+2) for all n >= 0. - Michael Somos, Aug 30 2016
a(n) = n*hypergeom([1, 1-n], [], -1). - Peter Luschny, May 09 2017
Product_{n>=1} (a(n)+1)/a(n) = e, coming from Product_{n=1..N}(a(n)+1)/a(n) = Sum_{n=0..N} 1/n!. - Robert FERREOL, Jul 12 2018
O.g.f.: Sum_{k>=1} k^k*x^k/(1 + (k - 1)*x)^(k+1). - Ilya Gutkovskiy, Oct 09 2018

A128196 a(n) = (2*n - 1)*a(n - 1) + 2^n for n >= 1, a(0) = 1.

Original entry on oeis.org

1, 3, 13, 73, 527, 4775, 52589, 683785, 10257031, 174370039, 3313031765, 69573669113, 1600194393695, 40004859850567, 1080131215981693, 31323805263501865, 971037963168623351, 32044252784564701655, 1121548847459764820069, 41497307356011298866841, 1618394986884440656855375
Offset: 0

Views

Author

Peter Luschny, Feb 26 2007

Keywords

Comments

A weighted sum of quotients of double factorials.
a(n) are the row sum of triangle A126063.

Crossrefs

Programs

  • Maple
    a := n -> `if`(n=0,1,(2*n-1)*a(n-1)+2^n);
  • Mathematica
    a[n_] := Sum[2^k*((2*n-1)!!/(2*k-1)!!), {k, 0, n}]; Table[a[n], {n, 0, 14}] (* Jean-François Alcover, Jun 28 2013 *)

Formula

a(n) = (2n)!/(n! 2^n) Sum(k=0..n, 4^k k!/(2k)!)
a(n) = 2^n Gamma(n+1/2) Sum(k=0..n, 1/Gamma(k+1/2))
a(n) = Sum(k=0..n, 2^k n!!/k!!) [n!! defined as A001147(n), Gottfried Helms]
a(n) = Sum(k=0..n, 2^(2k-n)((n+1)! Catalan(n))/((k+1)! Catalan(k))) [Catalan(n) A000108]
a(n) = Sum(k=0..n, 2^(2k-n) QuadFact(n)/QuadFact(k)) [QuadFact(n) A001813]
a(n) = Sum(k=0..n, 2^(2k-n) (-1)^(n-k) A097388(n)/A097388(k) )
a(n) = A001147(n) Sum(k=0..n, 2^k / A001147(k))
a(n) = A128195(n)/A005408(n)
a(n) = A128195(n-1)+A000079(n) (if n>0)
Recursive form: a(n) = (2n-1)*a(n-1) + 2^n; a(0) = 1 [Gottfried Helms]
Note: The following constants will be used in the next formulas.
K = (1-exp(1)*Gamma(1/2,1))/Gamma(1/2)
M = sqrt(2)(1+exp(1)(Gamma(1/2)-Gamma(1/2,1)))
Generalized form: For x>0
a(x) = 2^x(exp(1)*Gamma(x+1/2,1) + K*Gamma(x+1/2))
Asymptotic formula:
a(n) ~ 2^n*(1+(exp(1)+K)*(n-1/2)!)
a(n) ~ M(2exp(-1)(n-1/(24*n+19/10*1/n)))^n

A128198 Array read by antidiagonals. A scheme of arrangements: ArrScheme(k,n) = VarScheme(k,n-1) + k^n; ArrScheme(k,0) = 1. VarScheme(k,n) = (n*k+1)*(VarScheme(k,n-1) + k^n); VarScheme(k,0) = 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 5, 1, 1, 4, 13, 16, 1, 1, 5, 25, 73, 65, 1, 1, 6, 41, 202, 527, 326, 1, 1, 7, 61, 433, 2101, 4775, 1957, 1
Offset: 0

Views

Author

Peter Luschny, Mar 02 2007

Keywords

Comments

The second row (k=1) is sequence A000522 counting the arrangements of a set with n elements and the third row (k=2) is the sequence A128196. Cf. the scheme of variations A128195.

Examples

			Array begins:
[k=0] 1, 1, 1, 1, 1, 1, 1, 1
[k=1] 1, 2, 5, 16, 65, 326, 1957, 13700
[k=2] 1, 3, 13, 73, 527, 4775, 52589, 683785
[k=3] 1, 4, 25, 202, 2101, 27556, 441625, 8393062
[k=4] 1, 5, 41, 433, 5885, 101069, 2126545, 53180009
[k=5] 1, 6, 61, 796, 13361, 283706, 7391981, 229229536
[k=6] 1, 7, 85, 1321, 26395, 667651, 20743837, 767801905
[k=7] 1, 8, 113, 2038, 47237, 1386680, 50038129, 2152463090
		

Crossrefs

Programs

  • Maple
    VarScheme := (k,n) -> `if`(n=0,1,(n*k+1)*(VarScheme(k,n-1)+k^n)); ArrScheme := (k,n) -> `if`(n=0,1, VarScheme(k,n-1)+k^n);
Showing 1-5 of 5 results.