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

A276949 Index of row where n is located in array A276953 (equally: column in A276955).

Original entry on oeis.org

0, 1, 2, 1, 1, 1, 3, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 2, 1, 1, 1, 3, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1, 3, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 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, 5
Offset: 0

Views

Author

Antti Karttunen, Sep 22 2016

Keywords

Comments

This is the smallest difference that occurs between any nonzero digit's radix (which is one more than its one-based position from the right) and that digit's value in the factorial base representation of n. See A225901 and the example.
a(0) = 0 by convention, as there are no nonzero digits present, and neither does 0 occur in arrays A276953 & A276955.

Examples

			For n=8, its factorial base representation (A007623) is "110", where the radix for each digit position 1, 2, 3 (from the right) is 2, 3, 4 (one larger than the position). For the 1 in the middle position the difference is 3-1 = 2, while for the 1 at the left we obtain 4-1 = 3. Of these two differences 2 is smaller, thus a(8)=2.
		

Crossrefs

Cf. A276951 (for the other index).
Cf. arrays A276953 & A276955.
Cf. also A225901, A273667, A275847.

Formula

a(0) = 0, and for n >= 1: if A276950(n) = 1, then a(n) = 1, otherwise a(n) = 1 + a(A266193(n)).
Other identities. For all n >= 0:
a(n) = A257679(A225901(n)) = A257679(A275847(n)) = A257679(A273667(n)).

A276951 Index of column where n is located in array A276953 (equally: row in A276955).

Original entry on oeis.org

0, 1, 1, 2, 3, 4, 1, 5, 2, 6, 7, 8, 3, 9, 4, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1, 19, 5, 20, 21, 22, 2, 23, 6, 24, 25, 26, 7, 27, 8, 28, 29, 30, 31, 32, 33, 34, 35, 36, 3, 37, 9, 38, 39, 40, 4, 41, 10, 42, 43, 44, 11, 45, 12, 46, 47, 48, 49, 50, 51, 52, 53, 54, 13, 55, 14, 56, 57, 58, 15, 59, 16, 60, 61, 62, 17, 63, 18, 64
Offset: 0

Views

Author

Antti Karttunen, Sep 22 2016

Keywords

Comments

a(0) = 0 by convention, because 0 is not present in arrays A276953 and A276955.

Crossrefs

Cf. arrays A276953 & A276955. A276949 gives their other index.
Cf. also A257681, A275847.

Programs

Formula

a(0) = 0; for n >= 1, if A260736(n) > 0 [when A276950(n) is not zero, when n is in A273670], then a(n) = A276952(n) = 1 + A273663(n), otherwise a(n) = a(A266193(n)).
Other identities. For all n >= 0:
a(n) = A257681(A275847(n)).

A276617 Square array A(n,k) = A276955(n,k)/k!, read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Original entry on oeis.org

1, 1, 3, 1, 4, 4, 1, 5, 6, 5, 1, 6, 8, 7, 7, 1, 7, 10, 9, 13, 9, 1, 8, 12, 11, 21, 16, 10, 1, 9, 14, 13, 31, 25, 18, 11, 1, 10, 16, 15, 43, 36, 28, 19, 13, 1, 11, 18, 17, 57, 49, 40, 29, 25, 15, 1, 12, 20, 19, 73, 64, 54, 41, 41, 28, 16, 1, 13, 22, 21, 91, 81, 70, 55, 61, 45, 30, 17, 1, 14, 24, 23, 111, 100, 88, 71, 85, 66, 48, 31, 18
Offset: 1

Views

Author

Antti Karttunen, Sep 22 2016

Keywords

Examples

			The top left corner of the array:
1,  1,  1,  1,  1,  1,  1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1
3,  4,  5,  6,  7,  8,  9,  10,  11,  12,  13,  14,  15,  16,  17,  18,  19
4,  6,  8, 10, 12, 14, 16,  18,  20,  22,  24,  26,  28,  30,  32,  34,  36
5,  7,  9, 11, 13, 15, 17,  19,  21,  23,  25,  27,  29,  31,  33,  35,  37
7, 13, 21, 31, 43, 57, 73,  91, 111, 133, 157, 183, 211, 241, 273, 307, 343
9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361
		

Crossrefs

Transpose: A276616.
Columns 1-3: A273670, A276931, A276934.
Row 1: A000012, Row 2: n+2, Row 3: 2n+2, Row 4: 2n+3 (for n >= 1).
Row 5: A002061 (from a(3)=7 onward).
Row 6: squares (A000290, from a(3)=9 onward).
Row 7: A028552 (from a(2)=10 onward).
Row 8: A028387 (from a(2)=11 onward).

Programs

Formula

A(n,k) = A276955(n,k)/k!

A276956 Inverse permutation to A276955.

Original entry on oeis.org

1, 2, 3, 6, 10, 4, 15, 5, 21, 28, 36, 9, 45, 14, 55, 66, 78, 91, 105, 120, 136, 153, 171, 7, 190, 20, 210, 231, 253, 8, 276, 27, 300, 325, 351, 35, 378, 44, 406, 435, 465, 496, 528, 561, 595, 630, 666, 13, 703, 54, 741, 780, 820, 19, 861, 65, 903, 946, 990, 77, 1035, 90, 1081, 1128, 1176, 1225, 1275, 1326, 1378, 1431, 1485, 104
Offset: 1

Views

Author

Antti Karttunen, Sep 22 2016

Keywords

Crossrefs

Inverse: A276955.
Related permutations: A257506, A275847.

Programs

  • Scheme
    (define (A276956 n) (let ((row (A276951 n)) (col (A276949 n))) (* (/ 1 2) (- (expt (+ row col) 2) row col col col -2))))

Formula

a(n) = (1/2) * ((c+r)^2 - r - 3*c + 2), where c = A276949(n), and r = A276951(n).
As a composition of other permutations:
a(n) = A257506(A275847(n)).

A001048 a(n) = n! + (n-1)!.

Original entry on oeis.org

2, 3, 8, 30, 144, 840, 5760, 45360, 403200, 3991680, 43545600, 518918400, 6706022400, 93405312000, 1394852659200, 22230464256000, 376610217984000, 6758061133824000, 128047474114560000, 2554547108585472000, 53523844179886080000, 1175091669949317120000
Offset: 1

Views

Author

Keywords

Comments

Number of {12, 12*, 1*2, 21, 21*}-avoiding signed permutations in the hyperoctahedral group.
a(n) is the hook product of the shape (n, 1). - Emeric Deutsch, May 13 2004
From Jaume Oliver Lafont, Dec 01 2009: (Start)
(1+(x-1)*exp(x))/x = Sum_{k >= 1} x^k/a(k).
Setting x = 1 yields Sum_{k >= 1} 1/a(k) = 1. [Jolley eq 302] (End)
With regard to the comment by Jaume Oliver Lafont: P(n) = 1/a(n) is a probability distribution, with all values given as unit fractions. This distribution is connected to the Irwin-Hall distribution: Consider successively drawn random numbers, uniformly distributed in [0,1]. 1/a(n) is the probability for the sum of the random numbers exceeding 1 exactly with the (n+1)-th summand. P(n) has mean e-1 and variance 3e-e^2. From this we get e as the expected number of summands. - Manfred Boergens, May 20 2024
For n >= 2, a(n) is the size of the largest conjugacy class of the symmetric group on n + 1 letters. Equivalently, the maximum entry in each row of A036039. - Geoffrey Critzer, May 19 2013
In factorial base representation (A007623) the terms are written as: 10, 11, 110, 1100, 11000, 110000, ... From a(2) = 3 = "11" onward each term begins always with two 1's, followed by n-2 zeros. - Antti Karttunen, Sep 24 2016
e is approximately a(n)/A000255(n-1) for large n. - Dale Gerdemann, Jul 26 2019
a(n) is the number of permutations of [n+1] in which all the elements of [n] are cycle-mates, that is, 1,..,n are all in the same cycle. This result is readily shown after noting that the elements of [n] can be members of a n-cycle or an (n+1)-cycle. Hence a(n)=(n-1)!+n!. See an example below. - Dennis P. Walsh, May 24 2020

Examples

			For n=3, a(3) counts the 8 permutations of [4] with 1,2, and 3 all in the same cycle, namely, (1 2 3)(4), (1 3 2)(4), (1 2 3 4), (1 2 4 3), (1 3 2 4), (1 2 4 3), (1 4 2 3), and (1 4 3 2). - _Dennis P. Walsh_, May 24 2020
		

References

  • L. B. W. Jolley, Summation of Series, Dover, 1961.
  • 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

Apart from initial terms, same as A059171.
Equals the square root of the first right hand column of A162990. - Johannes W. Meijer, Jul 21 2009
From a(2)=3 onward the second topmost row of arrays A276588 and A276955.
Cf. sequences with formula (n + k)*n! listed in A282466, A334397.

Programs

Formula

a(n) = (n+1)*(n-1)!.
E.g.f.: x/(1-x) - log(1-x). - Ralf Stephan, Apr 11 2004
The sequence 1, 3, 8, ... has g.f. (1+x-x^2)/(1-x)^2 and a(n) = n!(n + 2 - 0^n) = n!A065475(n) (offset 0). - Paul Barry, May 14 2004
a(n) = (n+1)!/n. - Claude Lenormand (claude.lenormand(AT)free.fr), Aug 24 2003
Factorial expansion of 1: 1 = sum_{n > 0} 1/a(n) [Jolley eq 302]. - Claude Lenormand (claude.lenormand(AT)free.fr), Aug 24 2003
a(1) = 2, a(2) = 3, D-finite recurrence a(n) = (n^2 - n - 2)*a(n-2) for n >= 3. - Jaume Oliver Lafont, Dec 01 2009
a(n) = ((n+2)A052649(n) - A052649(n+1))/2. - Gary Detlefs, Dec 16 2009
G.f.: U(0) where U(k) = 1 + (k+1)/(1 - x/(x + 1/U(k+1))) ; (continued fraction, 3-step). - Sergei N. Gladkovskii, Sep 25 2012
G.f.: 2*(1+x)/x/G(0) - 1/x, where G(k)= 1 + 1/(1 - x*(2*k+2)/(x*(2*k+2) - 1 + x*(2*k+2)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 31 2013
a(n) = (n-1)*a(n-1) + (n-1)!. - Bruno Berselli, Feb 22 2017
a(1)=2, a(2)=3, D-finite recurrence a(n) = (n-1)*a(n-1) + (n-2)*a(n-2). - Dale Gerdemann, Jul 26 2019
a(n) = 2*A000255(n-1) + A096654(n-2). - Dale Gerdemann, Jul 26 2019
Sum_{n>=1} (-1)^(n+1)/a(n) = 1 - 2/e (A334397). - Amiram Eldar, Jan 13 2021

Extensions

More terms from James Sellers, Sep 19 2000

A052849 a(0) = 0; a(n) = 2*n! (n >= 1).

Original entry on oeis.org

0, 2, 4, 12, 48, 240, 1440, 10080, 80640, 725760, 7257600, 79833600, 958003200, 12454041600, 174356582400, 2615348736000, 41845579776000, 711374856192000, 12804747411456000, 243290200817664000, 4865804016353280000, 102181884343418880000, 2248001455555215360000
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

For n >= 1 a(n) is the size of the centralizer of a transposition in the symmetric group S_(n+1). - Ahmed Fares (ahmedfares(AT)my-deja.com), May 12 2001
For n > 0, a(n) = n! - A062119(n-1) = number of permutations of length n that have two specified elements adjacent. For example, a(4) = 12 as of the 24 permutations, 12 have say 1 and 2 adjacent: 1234, 2134, 1243, 2143, 3124, 3214, 4123, 4213, 3412, 3421, 4312, 4321. - Jon Perry, Jun 08 2003
With different offset, denominators of certain sums computed by Ramanujan.
From Michael Somos, Mar 04 2004: (Start)
Stirling transform of a(n) = [2, 4, 12, 48, 240, ...] is A000629(n) = [2, 6, 26, 150, 1082, ...].
Stirling transform of a(n-1) = [1, 2, 4, 12, 48, ...] is A007047(n-1) = [1, 3, 11, 51, 299, ...].
Stirling transform of a(n) = [1, 4, 12, 48, 240, ...] is A002050(n) = [1, 5, 25, 149, 1081, ...].
Stirling transform of 2*A006252(n) = [2, 2, 4, 8, 28, ...] is a(n) = [2, 4, 12, 48, 240, ...].
Stirling transform of a(n+1) = [4, 12, 48, 240, ...] is 2*A005649(n) = [4, 16, 88, 616, ...].
Stirling transform of a(n+1) = [4, 12, 48, 240, ...] is 4*A083410(n) = [4, 16, 88, 616, ...]. (End)
Number of {12, 12*, 21, 21*}-avoiding signed permutations in the hyperoctahedral group.
Permanent of the (0, 1)-matrices with (i, j)-th entry equal to 0 if and only if it is in the border but not the corners. The border of a matrix is defined the be the first and the last row, together with the first and the last column. The corners of a matrix are the entries (i = 1, j = 1), (i = 1, j = n), (i = n, j = 1) and (i = n, j = n). - Simone Severini, Oct 17 2004

References

  • B. C. Berndt, Ramanujan's Notebooks Part V, Springer-Verlag, see p. 520.

Crossrefs

Essentially the same sequence as A098558.
Row 3 of A276955 (from term a(2)=4 onward).

Programs

  • Haskell
    a052849 n = if n == 0 then 0 else 2 * a000142 n
    a052849_list = 0 : fs where fs = 2 : zipWith (*) [2..] fs
    -- Reinhard Zumkeller, Aug 31 2014
    
  • Magma
    [0] cat [2*Factorial(n-1): n in [2..25]]; // Vincenzo Librandi, Nov 03 2014
  • Maple
    spec := [S,{B=Cycle(Z),C=Cycle(Z),S=Union(B,C)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    Join[{0}, 2Range[20]!] (* Harvey P. Dale, Jul 13 2013 *)
  • PARI
    a(n)=if(n<1,0,n!*2)
    

Formula

a(n) = T(n, 2) for n>1, where T is defined as in A080046.
D-finite with recurrence: {a(0) = 0, a(1) = 2, (-1 - n)*a(n+1) + a(n+2)=0}.
E.g.f.: 2*x/(1-x).
a(n) = A090802(n, n - 1) for n > 0. - Ross La Haye, Sep 26 2005
For n >= 1, a(n) = (n+3)!*Sum_{k=0..n+2} (-1)^k*binomial(2, k)/(n + 3 - k). - Milan Janjic, Dec 14 2008
G.f.: 2/Q(0) - 2, where Q(k) = 1 - x*(k + 1)/(1 - x*(k + 1)/Q(k+1) ); (continued fraction ). - Sergei N. Gladkovskii, Apr 01 2013
G.f.: -2 + 2/Q(0), where Q(k) = 1 + k*x - x*(k+1)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 01 2013
G.f.: W(0) - 2 , where W(k) = 1 + 1/( 1 - x*(k+1)/( x*(k+1) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 21 2013
a(n) = A245334(n, n-1), n > 0. - Reinhard Zumkeller, Aug 31 2014
From Amiram Eldar, Jan 15 2023: (Start)
Sum_{n>=1} 1/a(n) = (e-1)/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = (e-1)/(2*e). (End)

Extensions

More terms from Ross La Haye, Sep 26 2005

A052560 a(n) = 3*n!.

Original entry on oeis.org

3, 3, 6, 18, 72, 360, 2160, 15120, 120960, 1088640, 10886400, 119750400, 1437004800, 18681062400, 261534873600, 3923023104000, 62768369664000, 1067062284288000, 19207121117184000, 364935301226496000, 7298706024529920000, 153272826515128320000
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

a(n) is the size of the centralizer of a 3-cycle in the symmetric group S_(n+3). - Ahmed Fares (ahmedfares(AT)my-deja.com), May 12 2001
3 times factorial numbers. - Omar E. Pol, Jan 17 2009

Crossrefs

Row 13 of A276955 (from term a(3)=18 onward).

Programs

Formula

E.g.f.: 3/(1-x).
a(n) = n*a(n-1), with a(0) = 3.
For n>0: a(n) = Sum_{k=1..n+1} A083746(k). - Reinhard Zumkeller, Apr 14 2007

A276945 Square array A(row,col): A(row,1) = A276155(row), and for col > 1, A(row,col) = A276154(A(row,col-1)); Dispersion of primorial base left shift A276154.

Original entry on oeis.org

1, 2, 3, 6, 8, 4, 30, 36, 12, 5, 210, 240, 60, 14, 7, 2310, 2520, 420, 66, 32, 9, 30030, 32340, 4620, 450, 216, 38, 10, 510510, 540540, 60060, 4830, 2340, 246, 42, 11, 9699690, 10210200, 1021020, 62370, 30240, 2550, 270, 44, 13, 223092870, 232792560, 19399380, 1051050, 512820, 32550, 2730, 276, 62, 15
Offset: 1

Views

Author

Antti Karttunen, Sep 24 2016

Keywords

Comments

The array A(row,col) is read by descending antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
Entries in column k are all multiples of A002110(k-1). Dividing that factor out gives array A286625. - Antti Karttunen, Jun 30 2017

Examples

			The top left corner of the array:
   1,  2,   6,   30,   210,    2310,    30030,    510510
   3,  8,  36,  240,  2520,   32340,   540540,  10210200
   4, 12,  60,  420,  4620,   60060,  1021020,  19399380
   5, 14,  66,  450,  4830,   62370,  1051050,  19909890
   7, 32, 216, 2340, 30240,  512820,  9729720, 223603380
   9, 38, 246, 2550, 32550,  542850, 10240230, 233303070
  10, 42, 270, 2730, 34650,  570570, 10720710, 242492250
  11, 44, 276, 2760, 34860,  572880, 10750740, 243002760
  13, 62, 426, 4650, 60270, 1023330, 19429410, 446696250
  15, 68, 456, 4860, 62580, 1053360, 19939920, 456395940
  16, 72, 480, 5040, 64680, 1081080, 20420400, 465585120
  17, 74, 486, 5070, 64890, 1083390, 20450430, 466095630
  18, 90, 630, 6930, 90090, 1531530, 29099070, 669278610
		

Crossrefs

Inverse permutation: A276946.
Transpose: A276943. One more than A286615.
Column 1: A276155.
Row 1: A002110.
Row 2: A276939.
Row 3: A088860 (2*A002110).
Row 11: 2*A276939 (row 2) from 16, 72, 480, 5040, 64680, ... onward.
Row 13: 3*A002110, from 18, 90, 630, 6930, 90090, ... onward.
Cf. A276154.
Cf. also arrays A286625, A276955.

Programs

Formula

A(row,1) = A276155(row); for row > 1, A(row,col) = A276154(A(row,col-1)).

A276953 Square array A(row,col) read by antidiagonals: A(1,col) = A273670(col-1), and for row > 1, A(row,col) = A153880(A(row-1,col)); Dispersion of factorial base shift A153880 (array transposed).

Original entry on oeis.org

1, 3, 2, 4, 8, 6, 5, 12, 30, 24, 7, 14, 48, 144, 120, 9, 26, 54, 240, 840, 720, 10, 32, 126, 264, 1440, 5760, 5040, 11, 36, 150, 744, 1560, 10080, 45360, 40320, 13, 38, 168, 864, 5160, 10800, 80640, 403200, 362880, 15, 50, 174, 960, 5880, 41040, 85680, 725760, 3991680, 3628800, 16, 56, 246, 984, 6480, 46080, 367920, 766080, 7257600, 43545600, 39916800
Offset: 1

Views

Author

Antti Karttunen, Sep 22 2016

Keywords

Comments

The array A(row,col) is read by descending antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
Entries on row n are all multiples of n!. Dividing that factor out gives another array A276616.

Examples

			The top left corner of the array:
    1,    3,     4,     5,     7,     9,    10,    11,    13,    15,    16
    2,    8,    12,    14,    26,    32,    36,    38,    50,    56,    60
    6,   30,    48,    54,   126,   150,   168,   174,   246,   270,   288
   24,  144,   240,   264,   744,   864,   960,   984,  1464,  1584,  1680
  120,  840,  1440,  1560,  5160,  5880,  6480,  6600, 10200, 10920, 11520
  720, 5760, 10080, 10800, 41040, 46080, 50400, 51120, 81360, 86400, 90720
		

Crossrefs

Inverse permutation: A276954.
Transpose: A276955.
Cf. A276949 (index of row where n appears), A276951 (index of column).
Row 1: A273670, Row 2: A276932, Row 3: A276933.
Column 1: A000142. For other columns, see the rows of transposed array A276955.
Related or similar permutations: A257503, A275848, A273666.
Cf. also arrays A276616, A276589 & A276943.

Programs

Formula

A(1,col) = A273670(col-1), and for row > 1, A(row,col) = A153880(A(row-1,col))
As a composition of other permutations:
a(n) = A275848(A257503(n)).
Other identities. For all n >= 1:
A(A276949(n),A276951(n)) = n.

A052649 Expansion of e.g.f. (2+x-x^2)/(1-x)^2.

Original entry on oeis.org

2, 5, 14, 54, 264, 1560, 10800, 85680, 766080, 7620480, 83462400, 997920000, 12933043200, 180583603200, 2702527027200, 43153254144000, 732297646080000, 13160434839552000, 249692574523392000, 4987449116762112000, 104614786351595520000, 2299092397726924800000
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

a(1) is 5 and gives the row number in the table of 0-origin permutations of order 3 in which the first 3 items are reversed. Row 5 of this table is 2 1 0. a(2) is 14 and gives the row number in the table of 0-origin permutations of order 4 in which the first three items are reversed. Row 14 of this table is 2 1 0 3.... a(6) is 10800 and gives the row number in the table of 0-origin permutations of order 8 in which the first 3 items are reversed. Row 10800 of this table is 2 1 0 3 4 5 6 7. Et cetera. - Eugene McDonnell (eemcd(AT)mac.com), Dec 03 2004
In factorial base representation (A007623) the terms of this sequence are written as: 10, 21, 210, 2100, 21000, 210000, ... From a(1) = 5 = "21" onward each term begins always with "21", which is then followed by n-1 zeros. - Antti Karttunen, Sep 24 2016

Crossrefs

Row 4 of A276955 (from a(1)=5 onward).

Programs

  • Maple
    spec := [S,{S=Prod(Sequence(Z),Union(Z,Sequence(Z),Sequence(Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    f[n_] := (3 + 2 n) n!; f[0] = 2; Array[f, 19, 0]
    a[n_] := a[n] = a[n - 1]*n (2 n + 3)/(2 n + 1); a[0] = 2; a[1] = 5; Array[ a, 19, 0] (* Robert G. Wilson v *)
    With[{nn=20},CoefficientList[Series[(2+x-x^2)/(1-x)^2,{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, Nov 09 2017 *)
  • PARI
    a(n)=if(n<=1,[2,5][n+1], a(n-1)*(n*(2*n+3))/(2*n+1) );
    for(n=0,11,print1(a(n),", "))
    
  • Scheme
    (define (A052649 n) (if (zero? n) 2 (+ (A000142 n) (* 2 (A000142 (+ 1 n)))))) ;; Antti Karttunen, Sep 24 2016

Formula

a(n) = (3+2*n)*n!.
E.g.f.: -(-x+x^2-2)/(-1+x)^2.
Recurrence: a(0)=2, a(1)=5, (-7*n-5-2*n^2)*a(n)+(3+2*n)*a(n+1)=0 for n>=1.
a(n) = A129326(n), n>1. - R. J. Mathar, Jun 14 2008
a(n) = (n+1)*a(n-1) - 2*A001048(n-1). - Gary Detlefs, Dec 16 2009
a(0) = 2; for n >= 1, a(n) = 2*(n+1)! + n! - Antti Karttunen, Sep 24 2016
From Amiram Eldar, Feb 17 2024: (Start)
Sum_{n>=0} 1/a(n) = 1/6 + e/2 - erfi(1)*sqrt(Pi)/4, where erfi is the imaginary error function.
Sum_{n>=0} (-1)^n/a(n) = 1/6 - 1/(2*e) + erf(1)*sqrt(Pi)/4, where erf is the error function. (End)
Showing 1-10 of 19 results. Next