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 11 results. Next

A127949 A000012 as an infinite lower triangular matrix with all 1's; A127899 = a simple transform; then A000012 * A127899. Given A051340, change all 1's to -1. Triangle read by rows, (n-1) -1's followed by "n".

Original entry on oeis.org

1, -1, 2, -1, -1, 3, -1, -1, -1, 4, -1, -1, -1, -1, 5, -1, -1, -1, -1, -1, 6, -1, -1, -1, -1, -1, -1, 7, -1, -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, -1, -1, -1, -1, -1, -1
Offset: 1

Views

Author

Gary W. Adamson, Feb 09 2007

Keywords

Comments

For the inverse of A127949 see A126615, a harmonic triangle.
This is one way to define an inverse to A000217. - R. J. Mathar, Apr 30 2010

Examples

			First few rows of the triangle are:
1;
-1, 2;
-1, -1, 3;
-1, -1, -1, 4;
...
		

Crossrefs

Programs

  • Maple
    A127949 := proc(n) if issqr(1+8*n) then (sqrt(1+8*n)-1)/2 ; else -1 ; end if; end proc: seq(A127949(n),n=1..120) ; # R. J. Mathar, Apr 30 2010

Extensions

More terms from R. J. Mathar, Apr 30 2010

A128225 A127899 (unsigned) * A004736.

Original entry on oeis.org

1, 6, 2, 15, 9, 3, 28, 20, 12, 4, 45, 35, 25, 15, 5, 66, 54, 42, 30, 18, 6, 91, 77, 63, 49, 35, 21, 7, 120, 104, 88, 72, 56, 40, 24, 8, 153, 135, 117, 99, 81, 63, 45, 27, 9, 190, 170, 150, 130, 110, 90, 70, 50, 30, 10
Offset: 1

Views

Author

Gary W. Adamson, Feb 19 2007

Keywords

Comments

Row sums = the cubes, A000578: (1, 8, 27, 64, 125, ...). Left column = the hexagonal numbers: A000384: (1, 6, 15, 28, ...). A128226 = A004736 * A127899.

Examples

			First few rows of the triangle are:
   1;
   6,  2;
  15,  9,  3;
  28, 20, 12,  4;
  45, 35, 25, 15,  5;
  66, 54, 42, 30, 18,  6;
  91, 77, 63, 49, 35, 21,  7;
  ...
		

Crossrefs

Programs

  • Mathematica
    (* a127899U computes the unsigned version of A127899 *)
    a127899U[n_, k_] := If[n==k||n-1==k, n, 0]/;(1<=k<=n)
    a004736[n_, k_] := n-k+1/;(1<=k<=n+1)
    a128225[n_, k_] := a127899U[n, n](a004736[n, k] + a004736[n-1, k])/;(1<=k<=n)
    a128225[r_] := Table[a128225[n, k], {n, 1, r}, {k, 1, n}]
    TableForm[a128225[7]] (* triangle *)
    Flatten[a128225[10]] (* data *) (* Hartmut F. W. Hoft, Mar 13 2017 *)

Formula

A127899 (unsigned) * A004736, as infinite lower triangular matrices. Triangle read by rows: n*[(1); (3,1); (5,3,1);...]; cf. A099375.

A134239 A127899(unsigned) * A007318.

Original entry on oeis.org

1, 4, 2, 6, 9, 3, 8, 20, 16, 4, 10, 35, 45, 25, 5, 12, 54, 96, 84, 36, 6, 14, 77, 175, 210, 140, 49, 7, 16, 104, 288, 440, 400, 216, 64, 8, 18, 135, 441, 819, 945, 693, 315, 81, 9, 20, 170, 640, 1400, 1960, 1820, 1120, 440, 100, 10
Offset: 0

Views

Author

Gary W. Adamson, Oct 14 2007

Keywords

Examples

			First few rows of the triangle are:
1;
4, 2;
6, 9, 3;
8, 20, 16, 4;
10, 35, 45, 25, 5;
12, 54, 96, 84, 36, 6;
14, 77, 175, 210, 140, 49, 7;
...
Row 3 = (8, 20, 16, 4) = 4 * (2, 5, 4, 1), where (2, 5, 4, 1) = row 3 of A029653, (2,1) Pascal's triangle.
		

Crossrefs

Cf. A127899, A029653, A128543 (row sums).

Programs

  • Haskell
    a134239 n k = a134239_tabl !! n !! k
    a134239_row n = a134239_tabl !! n
    a134239_tabl = [1] : zipWith (map . (*))
                   [2..] (map reverse $ tail a029635_tabl)
    -- Reinhard Zumkeller, Nov 14 2014

Formula

A127899(unsigned) * A007318.
Triangle, T(n,k) = (n+1) * A029635(n,n-k) for n > 0.

Extensions

Corrected by Philippe Deléham, Oct 17 2007
Formula corrected by Reinhard Zumkeller, Nov 14 2014

A127948 Triangle, A004736 * A127899.

Original entry on oeis.org

1, 0, 2, -1, 1, 3, -2, 0, 2, 4, -3, -1, 1, 3, 5, -4, -2, 0, 2, 4, 6, -5, -3, -1, 1, 3, 5, 7, -6, -4, -2, 0, 2, 4, 6, 8, -7, -5, -3, -1, 1, 3, 5, 7, 9, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10
Offset: 0

Views

Author

Gary W. Adamson, Feb 09 2007

Keywords

Comments

Row sums = n A127899 * A004736 = A002024

Examples

			First few rows of the triangle are:
1;
0, 2;
-1, 1, 3;
-2, 0, 2, 4;
-3, -1, 1, 3, 5;
-4, -2, 0, 2, 4, 6;
-5, -3, -1, 1, 3, 5, 7;
...
		

Crossrefs

Programs

  • Python
    from math import isqrt
    def A127948(n): return (m:=n<<1)-(isqrt(m<<2)+1>>1)**2 # Chai Wah Wu, Jun 20 2025

Formula

A004736 * A127899 as infinite lower triangular matrices; where A004736 = (1; 2,1; 3,2,1;...).
From Boris Putievskiy, Jan 15 2013: (Start)
a(n) = 2*A000027(n)-A002024(n)^2, n > 0,
a(n) = 2*n-(t+1)^2, where t = floor((-1+sqrt(8*n-7))/2) n > 0. (End)

A128226 Triangle, A004736 * A127899 (unsigned).

Original entry on oeis.org

1, 4, 2, 7, 7, 3, 10, 12, 10, 4, 13, 17, 17, 13, 5, 16, 22, 24, 22, 16, 6, 19, 27, 31, 31, 27, 19, 7, 22, 32, 38, 40, 38, 32, 22, 8, 25, 37, 45, 49, 49, 45, 37, 25, 9, 28, 42, 52, 58, 60, 58, 52, 42, 28, 10
Offset: 1

Views

Author

Gary W. Adamson, Feb 19 2007

Keywords

Comments

Row sums = A084990: (1, 6, 17, 36, 65, 106, ...).
A128225 = A127899(unsigned) * A004736.

Examples

			First few row of the triangle are:
   1;
   4,  2;
   7,  7,  3;
  10, 12, 10,  4;
  13, 17, 17, 13,  5;
  16, 22, 24, 22, 16,  6;
  19, 27, 31, 31, 27, 19,  7;
  ...
		

Crossrefs

Programs

  • Mathematica
    (* a127899U computes the unsigned version of A127899 *)
    a127899U[n_, k_] := If[n==k||n-1==k, n, 0]/;(1<=k<=n)
    a004736[n_, k_] := n-k+1/;(1<=k<=n+1)
    a128225[n_, k_] := a127899U[n, n](a004736[n, k] + a004736[n-1, k])/;(1<=k<=n)
    a128225[r_] := Table[a128225[n, k], {n, 1, r}, {k, 1, n}]
    TableForm[a128225[7]] (* triangle *)
    Flatten[a128225[10]] (* data *) (* Hartmut F. W. Hoft, Mar 13 2017 *)

Formula

A004736 * A127899 (unsigned). By columns, (3k+1), (5k+2), (7k+3), ...; k=0,1,2...

A128262 Inverse Moebius transform of A127899 (unsigned).

Original entry on oeis.org

1, 3, 2, 1, 3, 3, 3, 2, 4, 4, 1, 0, 0, 5, 5, 3, 5, 3, 0, 6, 6, 1, 0, 0, 0, 0, 7, 7, 3, 2, 4, 4, 0, 0, 8, 8, 1, 3, 3, 0, 0, 0, 0, 9, 9, 3, 2, 0, 5, 5, 0, 0, 0, 10, 10
Offset: 1

Views

Author

Gary W. Adamson, Feb 21 2007

Keywords

Comments

Row sums = A002659: (1, 5, 7, 13, 11, 23, 15, 29, ...).

Examples

			First few rows of the triangle:
  1;
  3, 2;
  1, 3, 3;
  3, 2, 4, 4;
  1, 0, 0, 5, 5;
  3, 5, 3, 0, 6, 6;
  1, 0, 0, 0, 0, 7, 7;
  ...
		

Crossrefs

Formula

A051731 * unsigned A127899 as infinite lower triangular matrices.

A002024 k appears k times; a(n) = floor(sqrt(2n) + 1/2).

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13
Offset: 1

Views

Author

Keywords

Comments

Integer inverse function of the triangular numbers A000217. The function trinv(n) = floor((1+sqrt(1+8n))/2), n >= 0, gives the values 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, ..., that is, the same sequence with offset 0. - N. J. A. Sloane, Jun 21 2009
Array T(k,n) = n+k-1 read by antidiagonals.
Eigensequence of the triangle = A001563. - Gary W. Adamson, Dec 29 2008
Can apparently also be defined via a(n+1)=b(n) for n >= 2 where b(0)=b(1)=1 and b(n) = b(n-b(n-2))+1. Tested to be correct for all n <= 150000. - José María Grau Ribas, Jun 10 2011
For any n >= 0, a(n+1) is the least integer m such that A000217(m)=m(m+1)/2 is larger than n. This is useful when enumerating representations of n as difference of triangular numbers; see also A234813. - M. F. Hasler, Apr 19 2014
Number of binary digits of A023758, i.e., a(n) = ceiling(log_2(A023758(n+2))). - Andres Cicuttin, Apr 29 2016
a(n) and A002260(n) give respectively the x(n) and y(n) coordinates of the sorted sequence of points in the integer lattice such that x(n) > 0, 0 < y(n) <= x(n), and min(x(n), y(n)) < max(x(n+1), y(n+1)) for n > 0. - Andres Cicuttin, Dec 25 2016
Partial sums (A060432) are given by S(n) = (-a(n)^3 + a(n)*(1+6n))/6. - Daniel Cieslinski, Oct 23 2017
As an array, T(k,n) is the number of digits columns used in carryless multiplication between a k-digit number and an n-digit number. - Stefano Spezia, Sep 24 2022
a(n) is the maximum number of possible solutions to an n-statement Knights and Knaves Puzzle, where each statement is of the form "x of us are knights" for some 1 <= x <= n, knights can only tell the truth and knaves can only lie. - Taisha Charles and Brittany Ohlinger, Jul 29 2023

Examples

			From _Clark Kimberling_, Sep 16 2008: (Start)
As a rectangular array, a northwest corner:
  1 2 3 4 5 6
  2 3 4 5 6 7
  3 4 5 6 7 8
  4 5 6 7 8 9
This is the weight array (cf. A144112) of A107985 (formatted as a rectangular array). (End)
G.f. = x + 2*x^2 + 2*x^3 + 3*x^4 + 3*x^5 + 3*x^6 + 4*x^7 + 4*x^9 + 4*x^9 + 4*x^10 + ...
		

References

  • Edward S. Barbeau, Murray S. Klamkin, and William O. J. Moser, Five Hundred Mathematical Challenges, Prob. 441, pp. 41, 194. MAA 1995.
  • R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 97.
  • K. Hardy and K. S. Williams, The Green Book of Mathematical Problems, p. 59, Solution to Prob. 14, Dover NY, 1985
  • R. Honsberger, Mathematical Morsels, pp. 133-134, MAA 1978.
  • J. F. Hurley, Litton's Problematical Recreations, pp. 152; 313-4 Prob. 22, VNR Co., NY, 1971.
  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 1, p. 43.
  • 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).
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 129.

Crossrefs

a(n+1) = 1+A003056(n), A022846(n)=a(n^2), a(n+1)=A002260(n)+A025581(n).
A123578 is an essentially identical sequence.

Programs

  • Haskell
    a002024 n k = a002024_tabl !! (n-1) !! (k-1)
    a002024_row n = a002024_tabl !! (n-1)
    a002024_tabl = iterate (\xs@(x:_) -> map (+ 1) (x : xs)) [1]
    a002024_list = concat a002024_tabl
    a002024' = round . sqrt . (* 2) . fromIntegral
    -- Reinhard Zumkeller, Jul 05 2015, Feb 12 2012, Mar 18 2011
    
  • Haskell
    a002024_list = [1..] >>= \n -> replicate n n
    
  • Haskell
    a002024 = (!!) $ [1..] >>= \n -> replicate n n
    -- Sascha Mücke, May 10 2016
    
  • Magma
    [Floor(Sqrt(2*n) + 1/2): n in [1..80]]; // Vincenzo Librandi, Nov 19 2014
    
  • Maple
    A002024 := n-> ceil((sqrt(1+8*n)-1)/2); seq(A002024(n), n=1..100);
  • Mathematica
    a[1] = 1; a[n_] := a[n] = a[n - a[n - 1]] + 1 (* Branko Curgus, May 12 2009 *)
    Table[n, {n, 13}, {n}] // Flatten (* Robert G. Wilson v, May 11 2010 *)
    Table[PadRight[{},n,n],{n,15}]//Flatten (* Harvey P. Dale, Jan 13 2019 *)
  • PARI
    t1(n)=floor(1/2+sqrt(2*n)) /* A002024 = this sequence */
    
  • PARI
    t2(n)=n-binomial(floor(1/2+sqrt(2*n)),2) /* A002260(n-1) */
    
  • PARI
    t3(n)=binomial(floor(3/2+sqrt(2*n)),2)-n+1 /* A004736 */
    
  • PARI
    t4(n)=n-1-binomial(floor(1/2+sqrt(2*n)),2) /* A002260(n-1)-1 */
    
  • PARI
    A002024(n)=(sqrtint(n*8)+1)\2 \\ M. F. Hasler, Apr 19 2014
    
  • PARI
    a(n)=(sqrtint(8*n-7)+1)\2
    
  • PARI
    a(n)=my(k=1);while(binomial(k+1,2)+1<=n,k++);k \\ R. J. Cano, Mar 17 2014
    
  • Python
    from math import isqrt
    def A002024(n): return (isqrt(8*n)+1)//2 # Chai Wah Wu, Feb 02 2022
  • Sage
    [floor(sqrt(2*n) +1/2) for n in (1..80)] # G. C. Greubel, Dec 10 2018
    

Formula

a(n) = floor(1/2 + sqrt(2n)). Also a(n) = ceiling((sqrt(1+8n)-1)/2). [See the Liu link for a large collection of explicit formulas. - N. J. A. Sloane, Oct 30 2019]
a((k-1)*k/2 + i) = k for k > 0 and 0 < i <= k. - Reinhard Zumkeller, Aug 30 2001
a(n) = a(n - a(n-1)) + 1, with a(1)=1. - Ian M. Levitt (ilevitt(AT)duke.poly.edu), Aug 18 2002
a(n) = round(sqrt(2n)). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Nov 01 2002
T(n,k) = A003602(A118413(n,k)); = T(n,k) = A001511(A118416(n,k)). - Reinhard Zumkeller, Apr 27 2006
G.f.: (x/(1-x))*Product_{k>0} (1-x^(2*k))/(1-x^(2*k-1)). - Vladeta Jovovic, Oct 06 2003
Equals A127899 * A004736. - Gary W. Adamson, Feb 09 2007
Sum_{i=1..n} Sum_{j=i..n+i-1} T(j,i) = A000578(n); Sum_{i=1..n} T(n,i) = A000290(n). - Reinhard Zumkeller, Jun 24 2007
a(n) + n = A014132(n). - Vincenzo Librandi, Jul 08 2010
a(n) = ceiling(-1/2 + sqrt(2n)). - Branko Curgus, May 12 2009
a(A169581(n)) = A038567(n). - Reinhard Zumkeller, Dec 02 2009
a(n) = round(sqrt(2*n)) = round(sqrt(2*n-1)); there exist a and b greater than zero such that 2*n = 2+(a+b)^2 -(a+3*b) and a(n)=(a+b-1). - Fabio Civolani (civox(AT)tiscali.it), Feb 23 2010
A005318(n+1) = 2*A005318(n) - A205744(n), A205744(n) = A005318(A083920(n)), A083920(n) = n - a(n). - N. J. A. Sloane, Feb 11 2012
Expansion of psi(x) * x / (1 - x) in powers of x where psi() is a Ramanujan theta function. - Michael Somos, Mar 19 2014
G.f.: (x/(1-x)) * Product_{n>=1} (1 + x^n) * (1 - x^(2*n)). - Paul D. Hanna, Feb 27 2016
a(n) = 1 + Sum_{i=1..n/2} ceiling(floor(2(n-1)/(i^2+i))/(2n)). - José de Jesús Camacho Medina, Jan 07 2017
a(n) = floor((sqrt(8*n-7)+1)/2). - Néstor Jofré, Apr 24 2017
a(n) = floor((A000196(8*n)+1)/2). - Pontus von Brömssen, Dec 10 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/4 (A003881). - Amiram Eldar, Oct 01 2022
G.f. as array: (x^2*(1 - y)^2 + y^2 + x*y*(1 - 2*y))/((1 - x)^2*(1 - y)^2). - Stefano Spezia, Apr 22 2024

A002467 The game of Mousetrap with n cards (given n letters and n envelopes, how many ways are there to fill the envelopes so that at least one letter goes into its right envelope?).

Original entry on oeis.org

0, 1, 1, 4, 15, 76, 455, 3186, 25487, 229384, 2293839, 25232230, 302786759, 3936227868, 55107190151, 826607852266, 13225725636255, 224837335816336, 4047072044694047, 76894368849186894, 1537887376983737879, 32295634916658495460, 710503968166486900119
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of permutations in the symmetric group S_n that have a fixed point, i.e., they are not derangements (A000166). - Ahmed Fares (ahmedfares(AT)my-deja.com), May 08 2001
a(n+1)=p(n+1) where p(x) is the unique degree-n polynomial such that p(k)=k! for k=0,1,...,n. - Michael Somos, Oct 07 2003
The termwise sum of this sequence and A000166 gives the factorial numbers. - D. G. Rogers, Aug 26 2006, Jan 06 2008
a(n) is the number of deco polyominoes of height n and having in the last column an odd number of cells. A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column. Example: a(2)=1 because the horizontal domino is the only deco polyomino of height 2 having an odd number of cells in the last column. - Emeric Deutsch, May 08 2008
Starting (1, 4, 15, 76, 455, ...) = eigensequence of triangle A127899 (unsigned). - Gary W. Adamson, Dec 29 2008
(n-1) | a(n), hence a(n) is never prime. - Jonathan Vos Post, Mar 25 2009
a(n) is the number of permutations of [n] that have at least one fixed point = number of positive terms in n-th row of the triangle in A170942, n > 0. - Reinhard Zumkeller, Mar 29 2012
Numerator of partial sum of alternating harmonic series, provided that the denominator is n!. - Richard Locke Peterson, May 11 2020
a(n) is the number of terms in the polynomial expansion of the determinant of a n X n matrix that contains at least one diagonal element. - Adam Wang, May 28 2025

Examples

			G.f. = x + x^2 + 4*x^3 + 15*x^4 + 76*x^5 + 455*x^6 + 3186*x^7 + 25487*x^8 + ...
		

References

  • R. K. Guy, Unsolved Problems Number Theory, E37.
  • R. K. Guy and R. J. Nowakowski, "Mousetrap," in D. Miklos, V. T. Sos and T. Szonyi, eds., Combinatorics, Paul Erdős is Eighty. Bolyai Society Math. Studies, Vol. 1, pp. 193-206, 1993.
  • 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

Row sums of A068106.
Column k=1 of A293211.
Column k=0 of A299789, A306234, and of A324362.

Programs

  • Maple
    a := proc(n) -add((-1)^i*binomial(n, i)*(n-i)!, i=1..n) end;
    a := n->-n!*add((-1)^k/k!, k=1..n): seq(a(n), n=0..20); # Zerinvary Lajos, May 25 2007
    a := n -> simplify(GAMMA(n+1) - GAMMA(n+1, -1)*exp(-1)):
    seq(a(n), n=0..20); # Peter Luschny, Feb 28 2017
  • Mathematica
    Denominator[k=1; NestList[1+1/(k++ #1)&,1,12]] (* Wouter Meeussen, Mar 24 2007 *)
    a[ n_] := If[ n < 0, 0, n! - Subfactorial[n]] (* Michael Somos, Jan 25 2014 *)
    a[ n_] := If[ n < 1, 0, n! - Round[ n! / E]] (* Michael Somos, Jan 25 2014 *)
    a[ n_] := If[ n < 0, 0, n! - (-1)^n HypergeometricPFQ[ {- n, 1}, {}, 1]](* Michael Somos, Jan 25 2014 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ (1 - Exp[ -x] ) / (1 - x), {x, 0, n}]] (* Michael Somos, Jan 25 2014 *)
    RecurrenceTable[{a[n] == (n - 1) ( a[n - 1] + a[n - 2]), a[0] == 0, a[1] == 1}, a[n], {n, 20}] (* Ray Chandler, Jul 30 2015 *)
  • PARI
    {a(n) = if( n<1, 0, n * a(n-1) - (-1)^n)} /* Michael Somos, Mar 24 2003 */
    
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( (1 - exp( -x + x * O(x^n))) / (1 - x), n))} /* Michael Somos, Mar 24 2003 */
    
  • PARI
    a(n) = if(n<1,0,subst(polinterpolate(vector(n,k,(k-1)!)),x,n+1))
    
  • PARI
    A002467(n) = if(n<1, 0, n*A002467(n-1)-(-1)^n); \\ Joerg Arndt, Apr 22 2013

Formula

a(n) = n! - A000166(n) = A000142(n) - A000166(n).
E.g.f.: (1 - exp(-x)) / (1 - x). - Michael Somos, Aug 11 1999
a(n) = (n-1)*(a(n-1) + a(n-2)), n > 1; a(1) = 1. - Michael Somos, Aug 11 1999
a(n) = n*a(n-1) - (-1)^n. - Michael Somos, Aug 11 1999
a(0) = 0, a(n) = floor(n!(e-1)/e + 1/2) for n > 0. - Michael Somos, Aug 11 1999
a(n) = - n! * Sum_{i=1..n} (-1)^i/i!. Limit_{n->infinity} a(n)/n! = 1 - 1/e. - Gerald McGarvey, Jun 08 2004
Inverse binomial transform of A002627. - Ross La Haye, Sep 21 2004
a(n) = (n-1)*(a(n-1) + a(n-2)), n > 1. - Gary Detlefs, Apr 11 2010
a(n) = n! - floor((n!+1)/e), n > 0. - Gary Detlefs, Apr 11 2010
For n > 0, a(n) = {(1-1/exp(1))*n!}, where {x} is the nearest integer. - Simon Plouffe, conjectured March 1993, added Feb 17 2011
0 = a(n) * (a(n+1) + a(n+2) - a(n+3)) + a(n+1) * (a(n+1) + 2*a(n+2) - a(n+3)) + a(n+2) * (a(n+2)) if n >= 0. - Michael Somos, Jan 25 2014
a(n) = Gamma(n+1) - Gamma(n+1, -1)*exp(-1). - Peter Luschny, Feb 28 2017
a(n) = Sum_{k=0..n-1} A047920(n-1,k). - Alois P. Heinz, Sep 01 2021

A126615 Denominators in a harmonic triangle.

Original entry on oeis.org

1, 2, 2, 2, 6, 3, 2, 6, 12, 4, 2, 6, 12, 20, 5, 2, 6, 12, 20, 30, 6, 2, 6, 12, 20, 30, 42, 7, 2, 6, 12, 20, 30, 42, 56, 8, 2, 6, 12, 20, 30, 42, 56, 72, 9, 2, 6, 12, 20, 30, 42, 56, 72, 90, 10, 2, 6, 12, 20, 30, 42, 56, 72, 90, 110, 11, 2, 6, 12, 20, 30, 42, 56, 72, 90, 110, 132, 12, 2, 6
Offset: 1

Views

Author

Gary W. Adamson, Feb 09 2007

Keywords

Comments

The harmonic triangle uses the terms of this sequence as denominators, with numerators = 1: (1/1; 1/2, 1/2; 1/2, 1/6, 1/3; 1/2, 1/6, 1/12, 1/4; 1/2, 1/6, 1/12, 1/10, 1/5; ...). Row sums of the harmonic triangle = 1.

Examples

			Triangle T(n,k) begins:
  1;
  2,  2;
  2,  6,  3;
  2,  6, 12,  4;
  2,  6, 12, 20,  5;
  2,  6, 12, 20, 30,  6;
  2,  6, 12, 20, 30, 42,  7;
  ...
1/1 = 1,
1/2 + 1/2 = 1,
1/2 + 1/6 + 1/3 = 1,
1/2 + 1/6 + 1/12 + 1/4 = 1, etc.
		

Crossrefs

Row sums are A006527.

Programs

Formula

Denominators of the inverse of A127949; numerators = 1. Triangle read by rows, first (n-1) terms of 1*2, 2*3, 3*4, ...; followed by "n".
T(n,k) = k*(k+1) = A002378(k) for k < n; T(n,n) = n. - Andrés Ventas, Mar 26 2021

Extensions

Gary W. Adamson submitted two different triangles numbered A127899 based on the harmonic numbers. This is the second of them, which I am renumbering as A126615. Unfortunately there were several other entries defined in terms of "A127899" and I may not have guessed which version of A127899 was being referred to. - N. J. A. Sloane, Jan 09 2007
More terms from Philippe Deléham, Dec 17 2008

A125026 Triangle read by rows: T(n,k) = k*binomial(n,k) + binomial(n-1,k) (1 <= k <= n).

Original entry on oeis.org

1, 3, 2, 5, 7, 3, 7, 15, 13, 4, 9, 26, 34, 21, 5, 11, 40, 70, 65, 31, 6, 13, 57, 125, 155, 111, 43, 7, 15, 77, 203, 315, 301, 175, 57, 8, 17, 100, 308, 574, 686, 532, 260, 73, 9, 19, 126, 444, 966, 1386, 1344, 876, 369, 91, 10, 21, 155, 615, 1530, 2562, 2982, 2430, 1365
Offset: 1

Views

Author

Gary W. Adamson, Nov 15 2006

Keywords

Comments

Also A007318 * A127899 (unsigned) as a product of two infinite lower triangular matrices. - Gary W. Adamson, Feb 19 2007

Examples

			First few rows of the triangle are
   1;
   3,   2;
   5,   7,   3;
   7,  15,  13,   4;
   9,  26,  34,  21,   5;
  11,  40,  70,  65,  31,   6;
  13,  57, 125, 155, 111,  43,  7;
  ...
		

Crossrefs

Cf. A099035 (row sums).

Programs

  • Maple
    T:=(n,k)->k*binomial(n,k)+binomial(n-1,k): for n from 1 to 12 do seq(T(n,k),k=1..n) od; # yields sequence in triangular form

Extensions

Edited by N. J. A. Sloane, Nov 29 2006
Showing 1-10 of 11 results. Next