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

A000079 Powers of 2: a(n) = 2^n.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592
Offset: 0

Views

Author

Keywords

Comments

2^0 = 1 is the only odd power of 2.
Number of subsets of an n-set.
There are 2^(n-1) compositions (ordered partitions) of n (see for example Riordan). This is the unlabeled analog of the preferential labelings sequence A000670.
This is also the number of weakly unimodal permutations of 1..n + 1, that is, permutations with exactly one local maximum. E.g., a(4) = 16: 12345, 12354, 12453, 12543, 13452, 13542, 14532 and 15432 and their reversals. - Jon Perry, Jul 27 2003 [Proof: see next line! See also A087783.]
Proof: n must appear somewhere and there are 2^(n-1) possible choices for the subset that precedes it. These must appear in increasing order and the rest must follow n in decreasing order. QED. - N. J. A. Sloane, Oct 26 2003
a(n+1) is the smallest number that is not the sum of any number of (distinct) earlier terms.
Same as Pisot sequences E(1, 2), L(1, 2), P(1, 2), T(1, 2). See A008776 for definitions of Pisot sequences.
With initial 1 omitted, same as Pisot sequences E(2, 4), L(2, 4), P(2, 4), T(2, 4). - David W. Wilson
Not the sum of two or more consecutive numbers. - Lekraj Beedassy, May 14 2004
Least deficient or near-perfect numbers (i.e., n such that sigma(n) = A000203(n) = 2n - 1). - Lekraj Beedassy, Jun 03 2004. [Comment from Max Alekseyev, Jan 26 2005: All the powers of 2 are least deficient numbers but it is not known if there exists a least deficient number that is not a power of 2.]
Almost-perfect numbers referred to as least deficient or slightly defective (Singh 1997) numbers. Does "near-perfect numbers" refer to both almost-perfect numbers (sigma(n) = 2n - 1) and quasi-perfect numbers (sigma(n) = 2n + 1)? There are no known quasi-perfect or least abundant or slightly excessive (Singh 1997) numbers.
The sum of the numbers in the n-th row of Pascal's triangle; the sum of the coefficients of x in the expansion of (x+1)^n.
The Collatz conjecture (the hailstone sequence will eventually reach the number 1, regardless of which positive integer is chosen initially) may be restated as (the hailstone sequence will eventually reach a power of 2, regardless of which positive integer is chosen initially).
The only hailstone sequence which doesn't rebound (except "on the ground"). - Alexandre Wajnberg, Jan 29 2005
With p(n) as the number of integer partitions of n, p(i) is the number of parts of the i-th partition of n, d(i) is the number of different parts of the i-th partition of n, m(i,j) is the multiplicity of the j-th part of the i-th partition of n, one has: a(n) = Sum_{i = 1..p(n)} (p(i)! / (Product_{j=1..d(i)} m(i,j)!)). - Thomas Wieder, May 18 2005
The number of binary relations on an n-element set that are both symmetric and antisymmetric. Also the number of binary relations on an n-element set that are symmetric, antisymmetric and transitive.
The first differences are the sequence itself. - Alexandre Wajnberg and Eric Angelini, Sep 07 2005
a(n) is the largest number with shortest addition chain involving n additions. - David W. Wilson, Apr 23 2006
Beginning with a(1) = 0, numbers not equal to the sum of previous distinct natural numbers. - Giovanni Teofilatto, Aug 06 2006
For n >= 1, a(n) is equal to the number of functions f:{1, 2, ..., n} -> {1, 2} such that for a fixed x in {1, 2, ..., n} and a fixed y in {1, 2} we have f(x) != y. - Aleksandar M. Janjic and Milan Janjic, Mar 27 2007
Let P(A) be the power set of an n-element set A. Then a(n) is the number of pairs of elements {x,y} of P(A) for which x = y. - Ross La Haye, Jan 09 2008
a(n) is the number of permutations on [n+1] such that every initial segment is an interval of integers. Example: a(3) counts 1234, 2134, 2314, 2341, 3214, 3241, 3421, 4321. The map "p -> ascents of p" is a bijection from these permutations to subsets of [n]. An ascent of a permutation p is a position i such that p(i) < p(i+1). The permutations shown map to 123, 23, 13, 12, 3, 2, 1 and the empty set respectively. - David Callan, Jul 25 2008
2^(n-1) is the largest number having n divisors (in the sense of A077569); A005179(n) is the smallest. - T. D. Noe, Sep 02 2008
a(n) appears to match the number of divisors of the modified primorials (excluding 2, 3 and 5). Very limited range examined, PARI example shown. - Bill McEachen, Oct 29 2008
Successive k such that phi(k)/k = 1/2, where phi is Euler's totient function. - Artur Jasinski, Nov 07 2008
A classical transform consists (for general a(n)) in swapping a(2n) and a(2n+1); examples for Jacobsthal A001045 and successive differences: A092808, A094359, A140505. a(n) = A000079 leads to 2, 1, 8, 4, 32, 16, ... = A135520. - Paul Curtz, Jan 05 2009
This is also the (L)-sieve transform of {2, 4, 6, 8, ..., 2n, ...} = A005843. (See A152009 for the definition of the (L)-sieve transform.) - John W. Layman, Jan 23 2009
a(n) = a(n-1)-th even natural number (A005843) for n > 1. - Jaroslav Krizek, Apr 25 2009
For n >= 0, a(n) is the number of leaves in a complete binary tree of height n. For n > 0, a(n) is the number of nodes in an n-cube. - K.V.Iyer, May 04 2009
Permutations of n+1 elements where no element is more than one position right of its original place. For example, there are 4 such permutations of three elements: 123, 132, 213, and 312. The 8 such permutations of four elements are 1234, 1243, 1324, 1423, 2134, 2143, 3124, and 4123. - Joerg Arndt, Jun 24 2009
Catalan transform of A099087. - R. J. Mathar, Jun 29 2009
a(n) written in base 2: 1,10,100,1000,10000,..., i.e., (n+1) times 1, n times 0 (A011557(n)). - Jaroslav Krizek, Aug 02 2009
Or, phi(n) is equal to the number of perfect partitions of n. - Juri-Stepan Gerasimov, Oct 10 2009
These are the 2-smooth numbers, positive integers with no prime factors greater than 2. - Michael B. Porter, Oct 04 2009
A064614(a(n)) = A000244(n) and A064614(m) < A000244(n) for m < a(n). - Reinhard Zumkeller, Feb 08 2010
a(n) is the largest number m such that the number of steps of iterations of {r - (largest divisor d < r)} needed to reach 1 starting at r = m is equal to n. Example (a(5) = 32): 32 - 16 = 16; 16 - 8 = 8; 8 - 4 = 4; 4 - 2 = 2; 2 - 1 = 1; number 32 has 5 steps and is the largest such number. See A105017, A064097, A175125. - Jaroslav Krizek, Feb 15 2010
a(n) is the smallest proper multiple of a(n-1). - Dominick Cancilla, Aug 09 2010
The powers-of-2 triangle T(n, k), n >= 0 and 0 <= k <= n, begins with: {1}; {2, 4}; {8, 16, 32}; {64, 128, 256, 512}; ... . The first left hand diagonal T(n, 0) = A006125(n + 1), the first right hand diagonal T(n, n) = A036442(n + 1) and the center diagonal T(2*n, n) = A053765(n + 1). Some triangle sums, see A180662, are: Row1(n) = A122743(n), Row2(n) = A181174(n), Fi1(n) = A181175(n), Fi2(2*n) = A181175(2*n) and Fi2(2*n + 1) = 2*A181175(2*n + 1). - Johannes W. Meijer, Oct 10 2010
Records in the number of prime factors. - Juri-Stepan Gerasimov, Mar 12 2011
Row sums of A152538. - Gary W. Adamson, Dec 10 2008
A078719(a(n)) = 1; A006667(a(n)) = 0. - Reinhard Zumkeller, Oct 08 2011
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n>=1, a(n) equals the number of 2-colored compositions of n such that no adjacent parts have the same color. - Milan Janjic, Nov 17 2011
Equals A001405 convolved with its right-shifted variant: (1 + 2x + 4x^2 + ...) = (1 + x + 2x^2 + 3x^3 + 6x^4 + 10x^5 + ...) * (1 + x + x^2 + 2x^3 + 3x^4 + 6x^5 + ...). - Gary W. Adamson, Nov 23 2011
The number of odd-sized subsets of an n+1-set. For example, there are 2^3 odd-sized subsets of {1, 2, 3, 4}, namely {1}, {2}, {3}, {4}, {1, 2, 3}, {1, 2, 4}, {1, 3, 4}, and {2, 3, 4}. Also, note that 2^n = Sum_{k=1..floor((n+1)/2)} C(n+1, 2k-1). - Dennis P. Walsh, Dec 15 2011
a(n) is the number of 1's in any row of Pascal's triangle (mod 2) whose row number has exactly n 1's in its binary expansion (see A007318 and A047999). (The result of putting together A001316 and A000120.) - Marcus Jaiclin, Jan 31 2012
A204455(k) = 1 if and only if k is in this sequence. - Wolfdieter Lang, Feb 04 2012
For n>=1 apparently the number of distinct finite languages over a unary alphabet, whose minimum regular expression has alphabetic width n (verified up to n=17), see the Gruber/Lee/Shallit link. - Hermann Gruber, May 09 2012
First differences of A000225. - Omar E. Pol, Feb 19 2013
This is the lexicographically earliest sequence which contains no arithmetic progression of length 3. - Daniel E. Frohardt, Apr 03 2013
a(n-2) is the number of bipartitions of {1..n} (i.e., set partitions into two parts) such that 1 and 2 are not in the same subset. - Jon Perry, May 19 2013
Numbers n such that the n-th cyclotomic polynomial has a root mod 2; numbers n such that the n-th cyclotomic polynomial has an even number of odd coefficients. - Eric M. Schmidt, Jul 31 2013
More is known now about non-power-of-2 "Almost Perfect Numbers" as described in Dagal. - Jonathan Vos Post, Sep 01 2013
Number of symmetric Ferrers diagrams that fit into an n X n box. - Graham H. Hawkes, Oct 18 2013
Numbers n such that sigma(2n) = 2n + sigma(n). - Jahangeer Kholdi, Nov 23 2013
a(1), ..., a(floor(n/2)) are all values of permanent on set of square (0,1)-matrices of order n>=2 with row and column sums 2. - Vladimir Shevelev, Nov 26 2013
Numbers whose base-2 expansion has exactly one bit set to 1, and thus has base-2 sum of digits equal to one. - Stanislav Sykora, Nov 29 2013
A072219(a(n)) = 1. - Reinhard Zumkeller, Feb 20 2014
a(n) is the largest number k such that (k^n-2)/(k-2) is an integer (for n > 1); (k^a(n)+1)/(k+1) is never an integer (for k > 1 and n > 0). - Derek Orr, May 22 2014
If x = A083420(n), y = a(n+1) and z = A087289(n), then x^2 + 2*y^2 = z^2. - Vincenzo Librandi, Jun 09 2014
The mini-sequence b(n) = least number k > 0 such that 2^k ends in n identical digits is given by {1, 18, 39}. The repeating digits are {2, 4, 8} respectively. Note that these are consecutive powers of 2 (2^1, 2^2, 2^3), and these are the only powers of 2 (2^k, k > 0) that are only one digit. Further, this sequence is finite. The number of n-digit endings for a power of 2 with n or more digits id 4*5^(n-1). Thus, for b(4) to exist, one only needs to check exponents up to 4*5^3 = 500. Since b(4) does not exist, it is clear that no other number will exist. - Derek Orr, Jun 14 2014
The least number k > 0 such that 2^k ends in n consecutive decreasing digits is a 3-number sequence given by {1, 5, 25}. The consecutive decreasing digits are {2, 32, 432}. There are 100 different 3-digit endings for 2^k. There are no k-values such that 2^k ends in '987', '876', '765', '654', '543', '321', or '210'. The k-values for which 2^k ends in '432' are given by 25 mod 100. For k = 25 + 100*x, the digit immediately before the run of '432' is {4, 6, 8, 0, 2, 4, 6, 8, 0, 2, ...} for x = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...}, respectively. Thus, we see the digit before '432' will never be a 5. So, this sequence is complete. - Derek Orr, Jul 03 2014
a(n) is the number of permutations of length n avoiding both 231 and 321 in the classical sense which are breadth-first search reading words of increasing unary-binary trees. For more details, see the entry for permutations avoiding 231 at A245898. - Manda Riehl, Aug 05 2014
Numbers n such that sigma(n) = sigma(2n) - phi(4n). - Farideh Firoozbakht, Aug 14 2014
This is a B_2 sequence: for i < j, differences a(j) - a(i) are all distinct. Here 2*a(n) < a(n+1) + 1, so a(n) - a(0) < a(n+1) - a(n). - Thomas Ordowski, Sep 23 2014
a(n) counts n-walks (closed) on the graph G(1-vertex; 1-loop, 1-loop). - David Neil McGrath, Dec 11 2014
a(n-1) counts walks (closed) on the graph G(1-vertex; 1-loop, 2-loop, 3-loop, 4-loop, ...). - David Neil McGrath, Jan 01 2015
b(0) = 4; b(n+1) is the smallest number not in the sequence such that b(n+1) - Prod_{i=0..n} b(i) divides b(n+1) - Sum_{i=0..n} b(i). Then b(n) = a(n) for n > 2. - Derek Orr, Jan 15 2015
a(n) counts the permutations of length n+2 whose first element is 2 such that the permutation has exactly one descent. - Ran Pan, Apr 17 2015
a(0)-a(30) appear, with a(26)-a(30) in error, in tablet M 08613 (see CDLI link) from the Old Babylonian period (c. 1900-1600 BC). - Charles R Greathouse IV, Sep 03 2015
Subsequence of A028982 (the squares or twice squares sequence). - Timothy L. Tiffin, Jul 18 2016
A000120(a(n)) = 1. A000265(a(n)) = 1. A000593(a(n)) = 1. - Juri-Stepan Gerasimov, Aug 16 2016
Number of monotone maps f : [0..n] -> [0..n] which are order-increasing (i <= f(i)) and idempotent (f(f(i)) = f(i)). In other words, monads on the n-th ordinal (seen as a posetal category). Any monad f determines a subset of [0..n] that contains n, by considering its set of monad algebras = fixed points { i | f(i) = i }. Conversely, any subset S of [0..n] containing n determines a monad on [0..n], by the function i |-> min { j | i <= j, j in S }. - Noam Zeilberger, Dec 11 2016
Consider n points lying on a circle. Then for n>=2 a(n-2) gives the number of ways to connect two adjacent points with nonintersecting chords. - Anton Zakharov, Dec 31 2016
Satisfies Benford's law [Diaconis, 1977; Berger-Hill, 2017] - N. J. A. Sloane, Feb 07 2017
Also the number of independent vertex sets and vertex covers in the n-empty graph. - Eric W. Weisstein, Sep 21 2017
Also the number of maximum cliques in the n-halved cube graph for n > 4. - Eric W. Weisstein, Dec 04 2017
Number of pairs of compositions of n corresponding to a seaweed algebra of index n-1. - Nick Mayers, Jun 25 2018
The multiplicative group of integers modulo a(n) is cyclic if and only if n = 0, 1, 2. For n >= 3, it is a product of two cyclic groups. - Jianing Song, Jun 27 2018
k^n is the determinant of n X n matrix M_(i, j) = binomial(k + i + j - 2, j) - binomial(i+j-2, j), in this case k=2. - Tony Foster III, May 12 2019
Solutions to the equation Phi(2n + 2*Phi(2n)) = 2n. - M. Farrokhi D. G., Jan 03 2020
a(n-1) is the number of subsets of {1,2,...,n} which have an element that is the size of the set. For example, for n = 4, a(3) = 8 and the subsets are {1}, {1,2}, {2,3}, {2,4}, {1,2,3}, {1,3,4}, {2,3,4}, {1,2,3,4}. - Enrique Navarrete, Nov 21 2020
a(n) is the number of self-inverse (n+1)-order permutations with 231-avoiding. E.g., a(3) = 8: [1234, 1243, 1324, 1432, 2134, 2143, 3214, 4321]. - Yuchun Ji, Feb 26 2021
For any fixed k > 0, a(n) is the number of ways to tile a strip of length n+1 with tiles of length 1, 2, ... k, where the tile of length k can be black or white, with the restriction that the first tile cannot be black. - Greg Dresden and Bora Bursalı, Aug 31 2023

Examples

			There are 2^3 = 8 subsets of a 3-element set {1,2,3}, namely { -, 1, 2, 3, 12, 13, 23, 123 }.
		

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 1016.
  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education Journal, Vol. 31, No. 1, pp. 24-28, Winter 1997.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 73, 84.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §4.5 Logarithms and §8.1 Terminology, pp. 150, 264.
  • Paul J. Nahin, An Imaginary Tale: The Story of sqrt(-1), Princeton University Press, Princeton, NJ. 1998, pp. 69-70.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 273.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 124.
  • 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).
  • V. E. Tarakanov, Combinatorial problems on binary matrices, Combin. Analysis, MSU, 5 (1980), 4-15. (Russian)
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 141.
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

This is the Hankel transform (see A001906 for the definition) of A000984, A002426, A026375, A026387, A026569, A026585, A026671 and A032351. - John W. Layman, Jul 31 2000
Euler transform of A001037, A209406 (multisets), inverse binomial transform of A000244, binomial transform of A000012.
Complement of A057716.
Boustrophedon transforms: A000734, A000752.
Range of values of A006519, A007875, A011782, A030001, A034444, A037445, A053644, and A054243.
Cf. A018900, A014311, A014312, A014313, A023688, A023689, A023690, A023691 (sum of 2, ..., 9 distinct powers of 2).
Cf. A090129.
The following are parallel families: A000079 (2^n), A004094 (2^n reversed), A028909 (2^n sorted up), A028910 (2^n sorted down), A036447 (double and reverse), A057615 (double and sort up), A263451 (double and sort down); A000244 (3^n), A004167 (3^n reversed), A321540 (3^n sorted up), A321539 (3^n sorted down), A163632 (triple and reverse), A321542 (triple and sort up), A321541 (triple and sort down).

Programs

  • Haskell
    a000079 = (2 ^)
    a000079_list = iterate (* 2) 1
    -- Reinhard Zumkeller, Jan 22 2014, Mar 05 2012, Dec 29 2011
    
  • Magma
    [2^n: n in [0..40]]; // Vincenzo Librandi, Feb 17 2014
    
  • Magma
    [n le 2 select n else 5*Self(n-1)-6*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Feb 17 2014
    
  • Maple
    A000079 := n->2^n; [ seq(2^n,n=0..50) ];
    isA000079 := proc(n)
        local fs;
        fs := numtheory[factorset](n) ;
        if n = 1 then
            true ;
        elif nops(fs) <> 1 then
            false;
        elif op(1,fs) = 2 then
            true;
        else
            false ;
        end if;
    end proc: # R. J. Mathar, Jan 09 2017
  • Mathematica
    Table[2^n, {n, 0, 50}]
    2^Range[0, 50] (* Wesley Ivan Hurt, Jun 14 2014 *)
    LinearRecurrence[{2}, {2}, {0, 20}] (* Eric W. Weisstein, Sep 21 2017 *)
    CoefficientList[Series[1/(1 - 2 x), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 21 2017 *)
    NestList[2# &, 1, 40] (* Harvey P. Dale, Oct 07 2019 *)
  • Maxima
    A000079(n):=2^n$ makelist(A000079(n),n,0,30); /* Martin Ettl, Nov 05 2012 */
    
  • PARI
    A000079(n)=2^n \\ Edited by M. F. Hasler, Aug 27 2014
    
  • PARI
    unimodal(n)=local(x,d,um,umc); umc=0; for (c=0,n!-1, x=numtoperm(n,c); d=0; um=1; for (j=2,n,if (x[j]x[j-1] && d==1,um=0); if (um==0,break)); if (um==1,print(x)); umc+=um); umc
    
  • Python
    def a(n): return 1<Michael S. Branicky, Jul 28 2022
    
  • Python
    def is_powerof2(n) -> bool: return n and (n & (n - 1)) == 0  # Peter Luschny, Apr 10 2025
  • Scala
    (List.fill(20)(2: BigInt)).scanLeft(1: BigInt)( * ) // Alonso del Arte, Jan 16 2020
    
  • Scheme
    (define (A000079 n) (expt 2 n)) ;; Antti Karttunen, Mar 21 2017
    

Formula

a(n) = 2^n.
a(0) = 1; a(n) = 2*a(n-1).
G.f.: 1/(1 - 2*x).
E.g.f.: exp(2*x).
a(n)= Sum_{k = 0..n} binomial(n, k).
a(n) is the number of occurrences of n in A000523. a(n) = A001045(n) + A001045(n+1). a(n) = 1 + Sum_{k = 0..(n - 1)} a(k). The Hankel transform of this sequence gives A000007 = [1, 0, 0, 0, 0, 0, ...]. - Philippe Deléham, Feb 25 2004
n such that phi(n) = n/2, for n > 1, where phi is Euler's totient (A000010). - Lekraj Beedassy, Sep 07 2004
a(n + 1) = a(n) XOR 3*a(n) where XOR is the binary exclusive OR operator. - Philippe Deléham, Jun 19 2005
a(n) = StirlingS2(n + 1, 2) + 1. - Ross La Haye, Jan 09 2008
a(n+2) = 6a(n+1) - 8a(n), n = 1, 2, 3, ... with a(1) = 1, a(2) = 2. - Yosu Yurramendi, Aug 06 2008
a(n) = ka(n-1) + (4 - 2k)a(n-2) for any integer k and n > 1, with a(0) = 1, a(1) = 2. - Jaume Oliver Lafont, Dec 05 2008
a(n) = Sum_{l_1 = 0..n + 1} Sum_{l_2 = 0..n}...Sum_{l_i = 0..n - i}...Sum_{l_n = 0..1} delta(l_1, l_2, ..., l_i, ..., l_n) where delta(l_1, l_2, ..., l_i, ..., l_n) = 0 if any l_i <= l_(i+1) and l_(i+1) != 0 and delta(l_1, l_2, ..., l_i, ..., l_n) = 1 otherwise. - Thomas Wieder, Feb 25 2009
a(0) = 1, a(1) = 2; a(n) = a(n-1)^2/a(n-2), n >= 2. - Jaume Oliver Lafont, Sep 22 2009
a(n) = A173786(n, n)/2 = A173787(n + 1, n). - Reinhard Zumkeller, Feb 28 2010
If p[i] = i - 1 and if A is the Hessenberg matrix of order n defined by: A[i, j] = p[j - i + 1], (i <= j), A[i, j] = -1, (i = j + 1), and A[i, j] = 0 otherwise. Then, for n >= 1, a(n-1) = det A. - Milan Janjic, May 02 2010
If p[i] = Fibonacci(i-2) and if A is the Hessenberg matrix of order n defined by: A[i, j] = p[j - i + 1], (i <= j), A[i, j] = -1, (i = j + 1), and A[i, j] = 0 otherwise. Then, for n >= 2, a(n-2) = det A. - Milan Janjic, May 08 2010
The sum of reciprocals, 1/1 + 1/2 + 1/4 + 1/8 + ... + 1/(2^n) + ... = 2. - Mohammad K. Azarian, Dec 29 2010
a(n) = 2*A001045(n) + A078008(n) = 3*A001045(n) + (-1)^n. - Paul Barry, Feb 20 2003
a(n) = A118654(n, 2).
a(n) = A140740(n+1, 1).
a(n) = A131577(n) + A011782(n) = A024495(n) + A131708(n) + A024493(n) = A000749(n) + A038503(n) + A038504(n) + A038505(n) = A139761(n) + A139748(n) + A139714(n) + A133476(n) + A139398(n). - Paul Curtz, Jul 25 2011
a(n) = row sums of A007318. - Susanne Wienand, Oct 21 2011
a(n) = Hypergeometric([-n], [], -1). - Peter Luschny, Nov 01 2011
G.f.: A(x) = B(x)/x, B(x) satisfies B(B(x)) = x/(1 - x)^2. - Vladimir Kruchinin, Nov 10 2011
a(n) = Sum_{k = 0..n} A201730(n, k)*(-1)^k. - Philippe Deléham, Dec 06 2011
2^n = Sum_{k = 1..floor((n+1)/2)} C(n+1, 2k-1). - Dennis P. Walsh, Dec 15 2011
A209229(a(n)) = 1. - Reinhard Zumkeller, Mar 07 2012
A001227(a(n)) = 1. - Reinhard Zumkeller, May 01 2012
Sum_{n >= 1} mobius(n)/a(n) = 0.1020113348178103647430363939318... - R. J. Mathar, Aug 12 2012
E.g.f.: 1 + 2*x/(U(0) - x) where U(k) = 6*k + 1 + x^2/(6*k+3 + x^2/(6*k + 5 + x^2/U(k+1) )); (continued fraction, 3-step). - Sergei N. Gladkovskii, Dec 04 2012
a(n) = det(|s(i+2,j)|, 1 <= i,j <= n), where s(n,k) are Stirling numbers of the first kind. - Mircea Merca, Apr 04 2013
a(n) = det(|ps(i+1,j)|, 1 <= i,j <= n), where ps(n,k) are Legendre-Stirling numbers of the first kind (A129467). - Mircea Merca, Apr 06 2013
G.f.: W(0), where W(k) = 1 + 2*x*(k+1)/(1 - 2*x*(k+1)/( 2*x*(k+2) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 28 2013
a(n-1) = Sum_{t_1 + 2*t_2 + ... + n*t_n = n} multinomial(t_1 + t_2 + ... + t_n; t_1, t_2, ..., t_n). - Mircea Merca, Dec 06 2013
Construct the power matrix T(n,j) = [A^*j]*[S^*(j-1)] where A(n)=(1,1,1,...) and S(n)=(0,1,0,0,...) (where * is convolution operation). Then a(n-1) = Sum_{j=1..n} T(n,j). - David Neil McGrath, Jan 01 2015
a(n) = A000005(A002110(n)). - Ivan N. Ianakiev, May 23 2016
From Ilya Gutkovskiy, Jul 18 2016: (Start)
Exponential convolution of A000012 with themselves.
a(n) = Sum_{k=0..n} A011782(k).
Sum_{n>=0} a(n)/n! = exp(2) = A072334.
Sum_{n>=0} (-1)^n*a(n)/n! = exp(-2) = A092553. (End)
G.f.: (r(x) * r(x^2) * r(x^4) * r(x^8) * ...) where r(x) = A090129(x) = (1 + 2x + 2x^2 + 4x^3 + 8x^4 + ...). - Gary W. Adamson, Sep 13 2016
a(n) = A000045(n + 1) + A000045(n) + Sum_{k = 0..n - 2} A000045(k + 1)*2^(n - 2 - k). - Melvin Peralta, Dec 22 2017
a(n) = 7*A077020(n)^2 + A077021(n)^2, n>=3. - Ralf Steiner, Aug 08 2021
a(n)= n + 1 + Sum_{k=3..n+1} (2*k-5)*J(n+2-k), where Jacobsthal number J(n) = A001045(n). - Michael A. Allen, Jan 12 2022
Integral_{x=0..Pi} cos(x)^n*cos(n*x) dx = Pi/a(n) (see Nahin, pp. 69-70). - Stefano Spezia, May 17 2023

Extensions

Clarified a comment T. D. Noe, Aug 30 2009
Edited by Daniel Forgues, May 12 2010
Incorrect comment deleted by Matthew Vandermast, May 17 2014
Comment corrected to match offset by Geoffrey Critzer, Nov 28 2014

A006125 a(n) = 2^(n*(n-1)/2).

Original entry on oeis.org

1, 1, 2, 8, 64, 1024, 32768, 2097152, 268435456, 68719476736, 35184372088832, 36028797018963968, 73786976294838206464, 302231454903657293676544, 2475880078570760549798248448, 40564819207303340847894502572032, 1329227995784915872903807060280344576
Offset: 0

Views

Author

Keywords

Comments

Number of graphs on n labeled nodes; also number of outcomes of labeled n-team round-robin tournaments.
Number of perfect matchings of order n Aztec diamond. [see Speyer]
Number of Gelfand-Zeitlin patterns with bottom row [1,2,3,...,n]. [Zeilberger]
For n >= 1 a(n) is the size of the Sylow 2-subgroup of the Chevalley group A_n(2) (sequence A002884). - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 30 2001
From James Propp: (Start)
a(n) is the number of ways to tile the region
o-----o
|.....|
o--o.....o--o
|...........|
o--o...........o--o
|.................|
o--o.................o--o
|.......................|
|.......................|
|.......................|
o--o.................o--o
|.................|
o--o...........o--o
|...........|
o--o.....o--o
|.....|
o-----o
(top-to-bottom distance = 2n) with dominoes like either of
o--o o-----o
|..| or |.....|
|..| o-----o
|..|
o--o
(End)
The number of domino tilings in A006253, A004003, A006125 is the number of perfect matchings in the relevant graphs. There are results of Jockusch and Ciucu that if a planar graph has a rotational symmetry then the number of perfect matchings is a square or twice a square - this applies to these 3 sequences. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 12 2001
Let M_n denotes the n X n matrix with M_n(i,j)=binomial(2i,j); then det(M_n)=a(n+1). - Benoit Cloitre, Apr 21 2002
Smallest power of 2 which can be expressed as the product of n distinct numbers (powers of 2), e.g., a(4) = 1024 = 2*4*8*16. Also smallest number which can be expressed as the product of n distinct powers. - Amarnath Murthy, Nov 10 2002
The number of binary relations that are both reflexive and symmetric on an n-element set. - Justin Witt (justinmwitt(AT)gmail.com), Jul 12 2005
The number of symmetric binary relations on an (n-1)-element set. - Peter Kagey, Feb 13 2021
To win a game, you must flip n+1 heads in a row, where n is the total number of tails flipped so far. Then the probability of winning for the first time after n tails is A005329 / A006125. The probability of having won before n+1 tails is A114604 / A006125. - Joshua Zucker, Dec 14 2005
a(n) = A126883(n-1)+1. - Zerinvary Lajos, Jun 12 2007
Equals right border of triangle A158474 (unsigned). - Gary W. Adamson, Mar 20 2009
a(n-1) is the number of simple labeled graphs on n nodes such that every node has even degree. - Geoffrey Critzer, Oct 21 2011
a(n+1) is the number of symmetric binary matrices of size n X n. - Nathan J. Russell, Aug 30 2014
Let T_n be the n X n matrix with T_n(i,j) = binomial(2i + j - 3, j-1); then det(T_n) = a(n). - Tony Foster III, Aug 30 2018
k^(n*(n-1)/2) is the determinant of n X n matrix T_(i,j) = binomial(k*i + j - 3, j-1), in this case k=2. - Tony Foster III, May 12 2019
Let B_n be the n+1 X n+1 matrix with B_n(i, j) = Sum_{m=max(0, j-i)..min(j, n-i)} (binomial(i, j-m) * binomial(n-i, m) * (-1)^m), 0<=i,j<=n. Then det B_n = a(n+1). Also, deleting the first row and any column from B_n results in a matrix with determinant a(n). The matrices B_n have the following property: B_n * [x^n, x^(n-1) * y, x^(n-2) * y^2, ..., y^n]^T = [(x-y)^n, (x-y)^(n-1) * (x+y), (x-y)^(n-2) * (x+y)^2, ..., (x+y)^n]^T. - Nicolas Nagel, Jul 02 2019
a(n) is the number of positive definite (-1,1)-matrices of size n X n. - Eric W. Weisstein, Jan 03 2021
a(n) is the number of binary relations on a labeled n-set that are both total and antisymmetric. - José E. Solsona, Feb 05 2023

Examples

			From _Gus Wiseman_, Feb 11 2021: (Start)
This sequence counts labeled graphs on n vertices. For example, the a(0) = 1 through a(2) = 8 graph edge sets are:
  {}  {}  {}    {}
          {12}  {12}
                {13}
                {23}
                {12,13}
                {12,23}
                {13,23}
                {12,13,23}
This sequence also counts labeled graphs with loops on n - 1 vertices. For example, the a(1) = 1 through a(3) = 8 edge sets are the following. A loop is represented as an edge with two equal vertices.
  {}  {}    {}
      {11}  {11}
            {12}
            {22}
            {11,12}
            {11,22}
            {12,22}
            {11,12,22}
(End)
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 547 (Fig. 9.7), 573.
  • G. Everest, A. van der Poorten, I. Shparlinski, and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; p. 178.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 517.
  • F. Harary, Graph Theory. Addison-Wesley, Reading, MA, 1969, p. 178.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 3, Eq. (1.1.2).
  • J. Propp, Enumeration of matchings: problems and progress, in: New perspectives in geometric combinatorics, L. Billera et al., eds., Mathematical Sciences Research Institute series, vol. 38, Cambridge University Press, 1999.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000568 for the unlabeled analog, A053763, A006253, A004003.
Cf. A001187 (connected labeled graphs).
Cf. A158474. - Gary W. Adamson, Mar 20 2009
Cf. A136652 (log). - Paul D. Hanna, Dec 04 2009
The unlabeled version is A000088, or A002494 without isolated vertices.
The directed version is A002416.
The covering case is A006129.
The version for hypergraphs is A058891, or A016031 without singletons.
Row sums of A143543.
The case of connected edge set is A287689.

Programs

Formula

Sequence is given by the Hankel transform of A001003 (Schroeder's numbers) = 1, 1, 3, 11, 45, 197, 903, ...; example: det([1, 1, 3, 11; 1, 3, 11, 45; 3, 11, 45, 197; 11, 45, 197, 903]) = 2^6 = 64. - Philippe Deléham, Mar 02 2004
a(n) = 2^floor(n^2/2)/2^floor(n/2). - Paul Barry, Oct 04 2004
G.f. satisfies: A(x) = 1 + x*A(2x). - Paul D. Hanna, Dec 04 2009
a(n) = 2 * a(n-1)^2 / a(n-2). - Michael Somos, Dec 30 2012
G.f.: G(0)/x - 1/x, where G(k) = 1 + 2^(k-1)*x/(1 - 1/(1 + 1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 26 2013
E.g.f. satisfies A'(x) = A(2x). - Geoffrey Critzer, Sep 07 2013
Sum_{n>=1} 1/a(n) = A299998. - Amiram Eldar, Oct 27 2020
a(n) = s_lambda(1,1,...,1) where s is the Schur polynomial in n variables and lambda is the partition (n,n-1,n-2,...,1). - Leonid Bedratyuk, Feb 06 2022
a(n) = Product_{1 <= j <= i <= n-1} (i + j)/(2*i - 2*j + 1). Cf. A007685. - Peter Bala, Oct 25 2024

Extensions

More terms from Vladeta Jovovic, Apr 09 2000

A001850 Central Delannoy numbers: a(n) = Sum_{k=0..n} C(n,k)*C(n+k,k).

Original entry on oeis.org

1, 3, 13, 63, 321, 1683, 8989, 48639, 265729, 1462563, 8097453, 45046719, 251595969, 1409933619, 7923848253, 44642381823, 252055236609, 1425834724419, 8079317057869, 45849429914943, 260543813797441, 1482376214227923, 8443414161166173, 48141245001931263
Offset: 0

Views

Author

Keywords

Comments

Number of paths from (0,0) to (n,n) in an n X n grid using only steps north, northeast and east (i.e., steps (1,0), (1,1), and (0,1)).
Also the number of ways of aligning two sequences (e.g., of nucleotides or amino acids) of length n, with at most 2*n gaps (-) inserted, so that while unnecessary gappings: - -a a- - are forbidden, both b- and -b are allowed. (If only other of the latter is allowed, then the sequence A000984 gives the number of alignments.) There is an easy bijection from grid walks given by Dickau to such set of alignments (e.g., the straight diagonal corresponds to the perfect alignment with no gaps). - Antti Karttunen, Oct 10 2001
Also main diagonal of array A008288 defined by m(i,1) = m(1,j) = 1, m(i,j) = m(i-1,j-1) + m(i-1,j) + m(i,j-1). - Benoit Cloitre, May 03 2002
So, as a special case of Dmitry Zaitsev's Dec 10 2015 comment on A008288, a(n) is the number of points in Z^n that are L1 (Manhattan) distance <= n from any given point. These terms occur in the crystal ball sequences: a(n) here is the n-th term in the sequence for the n-dimensional cubic lattice. See A008288 for a list of crystal ball sequences (rows or columns of A008288). - Shel Kaphan, Dec 26 2022
a(n) is the number of n-matchings of a comb-like graph with 2*n teeth. Example: a(2) = 13 because the graph consisting of a horizontal path ABCD and the teeth Aa, Bb, Cc, Dd has 13 2-matchings: any of the six possible pairs of teeth and {Aa, BC}, {Aa, CD}, {Bb, CD}, {Cc, AB}, {Dd, AB}, {Dd, BC}, {AB, CD}. - Emeric Deutsch, Jul 02 2002
Number of ordered trees with 2*n+1 edges, having root of odd degree, nonroot nodes of outdegree at most 2 and branches of odd length. - Emeric Deutsch, Aug 02 2002
The sum of the first n coefficients of ((1 - x) / (1 - 2*x))^n is a(n-1). - Michael Somos, Sep 28 2003
Row sums of A063007 and A105870. - Paul Barry, Apr 23 2005
The Hankel transform (see A001906 for definition) of this sequence is A036442: 1, 4, 32, 512, 16384, ... . - Philippe Deléham, Jul 03 2005
Also number of paths from (0,0) to (n,0) using only steps U = (1,1), H = (1,0) and D =(1,-1), U can have 2 colors and H can have 3 colors. - N-E. Fahssi, Jan 27 2008
Equals row sums of triangle A152250 and INVERT transform of A109980: (1, 2, 8, 36, 172, 852, ...). - Gary W. Adamson, Nov 30 2008
Number of overpartitions in the n X n box (treat a walk of the type in the first comment as an overpartition, by interpreting a NE step as N, E with the part thus created being overlined). - William J. Keith, May 19 2017
Diagonal of rational functions 1/(1 - x - y - x*y), 1/(1 - x - y*z - x*y*z). - Gheorghe Coserea, Jul 03 2018
Dimensions of endomorphism algebras End(R^{(n)}) in the Delannoy category attached to the oligomorphic group of order preserving self-bijections of the real line. - Noah Snyder, Mar 22 2023
a(n) is the number of ways to tile a strip of length n with white squares, black squares, and red dominos, where we must have an equal number of white and black squares. - Greg Dresden and Leo Zhang, Jul 11 2025

Examples

			G.f. = 1 + 3*x + 13*x^2 + 63*x^3 + 321*x^4 + 1683*x^5 + 8989*x^6 + ...
		

References

  • Frits Beukers, Arithmetic properties of Picard-Fuchs equations, Séminaire de Théorie des nombres de Paris, 1982-83, Birkhäuser Boston, Inc.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 593.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 81.
  • L. Moser and W. Zayachkowski, Lattice paths with diagonal steps, Scripta Math., 26 (1961), 223-229.
  • 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).
  • R. P. Stanley, Enumerative Combinatorics, Wadsworth, Vol. 2, 1999; see Example 6.3.8 and Problem 6.49.
  • D. B. West, Combinatorial Mathematics, Cambridge, 2021, p. 28.

Crossrefs

Main diagonal of A064861.
Column k=2 of A262809 and A263159.

Programs

  • Maple
    seq(add(multinomial(n+k,n-k,k,k),k=0..n),n=0..20); # Zerinvary Lajos, Oct 18 2006
    seq(orthopoly[P](n,3), n=0..100); # Robert Israel, Nov 03 2015
  • Mathematica
    f[n_] := Sum[ Binomial[n, k] Binomial[n + k, k], {k, 0, n}]; Array[f, 21, 0] (* Or *)
    a[0] = 1; a[1] = 3; a[n_] := a[n] = (3(2 n - 1)a[n - 1] - (n - 1)a[n - 2])/n; Array[a, 21, 0] (* Or *)
    CoefficientList[ Series[1/Sqrt[1 - 6x + x^2], {x, 0, 20}], x] (* Robert G. Wilson v *)
    Table[LegendreP[n, 3], {n, 0, 22}] (* Jean-François Alcover, Jul 16 2012, from first formula *)
    a[n_] := Hypergeometric2F1[-n, n+1, 1, -1]; Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Feb 26 2013 *)
    a[ n_] := With[ {m = If[n < 0, -1 - n, n]}, SeriesCoefficient[ (1 - 6 x + x^2)^(-1/2), {x, 0, m}]]; (* Michael Somos, Jun 10 2015 *)
  • Maxima
    a(n):=coeff(expand((1+3*x+2*x^2)^n),x,n);
    makelist(a(n),n,0,12); /* Emanuele Munarini, Mar 02 2011 */
    
  • PARI
    {a(n) = if( n<0, n = -1 - n); polcoeff( 1 / sqrt(1 - 6*x + x^2 + x * O(x^n)), n)}; /* Michael Somos, Sep 23 2006 */
    
  • PARI
    {a(n) = if( n<0, n = -1 - n); subst( pollegendre(n), x, 3)}; /* Michael Somos, Sep 23 2006 */
    
  • PARI
    {a(n) = if( n<0, n = -1 - n); n++; subst( Pol(((1 - x) / (1 - 2*x) + O(x^n))^n), x, 1);} /* Michael Somos, Sep 23 2006 */
    
  • PARI
    a(n)=if(n<0, 0, polcoeff((1+3*x+2*x^2)^n, n)) \\ Paul Barry, Aug 22 2007
    
  • PARI
    /* same as in A092566 but use */
    steps=[[1,0], [0,1], [1,1]]; /* Joerg Arndt, Jun 30 2011 */
    
  • PARI
    a(n)=sum(k=0,n,binomial(n,k)*binomial(n+k,k)); \\ Joerg Arndt, May 11 2013
    
  • PARI
    my(x='x+O('x^30)); Vec(1/sqrt(1 - 6*x + x^2)) \\ Altug Alkan, Oct 17 2015
    
  • Python
    # from Nick Hobson.
    def f(a, b):
        if a == 0 or b == 0:
            return 1
        return f(a, b - 1) + f(a - 1, b) + f(a - 1, b - 1)
    [f(n, n) for n in range(7)]
    
  • Python
    from gmpy2 import divexact
    A001850 = [1, 3]
    for n in range(2,10**3):
        A001850.append(divexact(A001850[-1]*(6*n-3)-(n-1)*A001850[-2],n))
    # Chai Wah Wu, Sep 01 2014
    
  • Sage
    a = lambda n: hypergeometric([-n, -n], [1], 2)
    [simplify(a(n)) for n in range(23)] # Peter Luschny, Nov 19 2014

Formula

a(n) = P_n(3), where P_n is n-th Legendre polynomial.
G.f.: 1 / sqrt(1 - 6*x + x^2).
a(n) = a(n-1) + 2*A002002(n) = Sum_{j} A063007(n, j). - Henry Bottomley, Jul 02 2001
Dominant term in asymptotic expansion is binomial(2*n, n)/2^(1/4)*((sqrt(2) + 1)/2)^(2*n + 1)*(1 + c_1/n + c_2/n^2 + ...). - Michael David Hirschhorn
a(n) = Sum_{i=0..n} (A000079(i)*A008459(n, i)) = Sum_{i=0..n} (2^i * C(n, i)^2). - Antti Karttunen, Oct 10 2001
a(n) = Sum_{k=0..n} C(n+k, n-k)*C(2*k, k). - Benoit Cloitre, Feb 13 2003
a(n) = Sum_{k=0..n} C(n, k)^2 * 2^k. - Michael Somos, Oct 08 2003
a(n - 1) = coefficient of x^n in A120588(x)^n if n>=0. - Michael Somos, Apr 11 2012
G.f. of a(n-1) = 1 / (1 - x / (1 - 2*x / (1 - 2*x / (1 - x / (1 - 2*x / (1 - x / ...)))))). - Michael Somos, May 11 2012
INVERT transform is A109980. BINOMIAL transform is A080609. BINOMIAL transform of A006139. PSUM transform is A089165. PSUMSIGN transform is A026933. First backward difference is A110170. - Michael Somos, May 11 2012
E.g.f.: exp(3*x)*BesselI(0, 2*sqrt(2)*x). - Vladeta Jovovic, Mar 21 2004
a(n) = Sum_{k=0..n} C(2*n-k, n)*C(n, k). - Paul Barry, Apr 23 2005
a(n) = Sum_{k>=n} binomial(k, n)^2/2^(k+1). - Vladeta Jovovic, Aug 25 2006
a(n) = a(-1 - n) for all n in Z. - Michael Somos, Sep 23 2006
D-finite with recurrence: a(-1) = a(0) = 1; n*a(n) = 3*(2*n-1)*a(n-1) - (n-1)*a(n-2). Eq (4) in T. D. Noe's article in JIS 9 (2006) #06.2.7.
Define general Delannoy numbers by (i,j > 0): d(i,0) = d(0,j) = 1 =: d(0,0) and d(i,j) = d(i-1,j-1) + d(i-2,j-1) + d(i-1,j). Then a(k) = Sum_{j >= 0} d(k,j)^2 + d(k-1,j)^2 = A026933(n)+A026933(n-1). This is a special case of the following formula for general Delannoy numbers: d(k,j) = Sum_{i >= 0, p=0..n} d(p, i) * d(n-p, j-i) + d(p-1, i) * d(n-p-1, j-i-1). - Peter E John, Oct 19 2006
Coefficient of x^n in (1 + 3*x + 2*x^2)^n. - N-E. Fahssi, Jan 11 2008
a(n) = A008288(A046092(n)). - Philippe Deléham, Apr 08 2009
G.f.: 1/(1 - x - 2*x/(1 - x - x/(1 - x - x/(1 - x - x/(1 - ... (continued fraction). - Paul Barry, May 28 2009
G.f.: d/dx log(1/(1 - x*A001003(x))). - Vladimir Kruchinin, Apr 19 2011
G.f.: 1/(2*Q(0) + x - 1) where Q(k) = 1 + k*(1-x) - x - x*(k + 1)*(k + 2)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Mar 14 2013
a(n) = Sum_{k=0..n} C(n,k) * C(n+k,k). - Joerg Arndt, May 11 2013
G.f.: G(0), where G(k) = 1 + x*(6 - x)*(4*k + 1)/(4*k + 2 - 2*x*(6-x)*(2*k + 1)*(4*k + 3)/(x*(6 - x)*(4*k + 3) + 4*(k + 1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 22 2013
G.f.: 2/G(0), where G(k) = 1 + 1/(1 - x*(6 - x)*(2*k - 1)/(x*(6 - x)*(2*k - 1) + 2*(k + 1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 16 2013
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(6 - x)*(2*k + 1)/(x*(6 - x)*(2*k + 1) + 2*(k + 1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jul 17 2013
a(n)^2 = Sum_{k=0..n} 2^k * C(2*k, k)^2 * C(n+k, n-k) = A243949(n). - Paul D. Hanna, Aug 17 2014
a(n) = hypergeom([-n, -n], [1], 2). - Peter Luschny, Nov 19 2014
a(n) = Sum_{k=0..n/2} C(n-k,k) * 3^(n-2*k) * 2^k * C(n,k). - Vladimir Kruchinin, Jun 29 2015
a(n) = A049600(n, n-1).
a(n) = Sum_{0 <= j, k <= n} (-1)^(n+j)*C(n,k)*C(n,j)*C(n+k,k)*C(n+k+j,k+j). Cf. A126086 and A274668. - Peter Bala, Jan 15 2020
a(n) ~ c * (3 + 2*sqrt(2))^n / sqrt(n), where c = 1/sqrt(4*Pi*(3*sqrt(2)-4)) = 0.572681... (Banderier and Schwer, 2005). - Amiram Eldar, Jun 07 2020
a(n+1) = 3*a(n) + 2*Sum_{l=1..n} A006318(l)*a(n-l). [Eq. (1.16) in Qi-Shi-Guo (2016)]
a(n) ~ (1 + sqrt(2))^(2*n+1) / (2^(5/4) * sqrt(Pi*n)). - Vaclav Kotesovec, Jan 09 2023
a(n-1) + a(n) = A241023(n) for n >= 1. - Peter Bala, Sep 18 2024
a(n) = Sum_{k=0..n} C(n+k, 2*k) * C(2*k, k). - Greg Dresden and Leo Zhang, Jul 11 2025

Extensions

New name and reference Sep 15 1995
Formula and more references from Don Knuth, May 15 1996

A006139 n*a(n) = 2*(2*n-1)*a(n-1) + 4*(n-1)*a(n-2) with a(0) = 1.

Original entry on oeis.org

1, 2, 8, 32, 136, 592, 2624, 11776, 53344, 243392, 1116928, 5149696, 23835904, 110690816, 515483648, 2406449152, 11258054144, 52767312896, 247736643584, 1164829376512, 5484233814016, 25852072517632, 121997903495168
Offset: 0

Views

Author

Keywords

Comments

a(n) = number of Delannoy paths (A001850) from (0,0) to (n,n) in which every Northeast step is immediately preceded by an East step. - David Callan, Mar 14 2004
The Hankel transform (see A001906 for definition) of this sequence is A036442 : 1, 4, 32, 512, 16384, ... . - Philippe Deléham, Jul 03 2005
In general, 1/sqrt(1-4*r*x-4*r*x^2) has e.g.f. exp(2rx)BesselI(0,2r*sqrt((r+1)/r)x), a(n) = Sum_{k=0..n} C(2k,k)*C(k,n-k)*r^k, gives the central coefficient of (1+(2r)x+r(r+1)x^2) and is the (2r)-th binomial transform of 1/sqrt(1-8*C(n+1,2)x^2). - Paul Barry, Apr 28 2005
Also number of paths from (0,0) to (n,0) using steps U=(1,1), H=(1,0) and D=(1,-1), the H and U steps can have two colors. - N-E. Fahssi, Feb 05 2008
Self-convolution of a(n)/2^n gives Pell numbers A000129(n+1). - Vladimir Reshetnikov, Oct 10 2016
This sequence gives the integer part of an integral approximation to Pi, and also appears in Frits Beukers's "A Rational Approach to Pi" (cf. Links, Example). Despite quality M ~ 0.9058... reported by Beukers, measurements between n = 10000 and 30000 lead to a contentious quality estimate, M ~ 0.79..., at the 99% confidence level. In "Searching for Apéry-Style Miracles" Doron Zeilberger Quotes that M = 0.79119792... and also gives a closed form. The same rational approximation to Pi also follows from time integration on a quartic Hamiltonian surface, 2*H=(q^2+p^2)*(1-4*q*(q-p)). - Bradley Klee, Jul 19 2018, updated Mar 17 2019
Diagonal of rational function 1/(1 - (x + y + x*y^2)). - Gheorghe Coserea, Aug 06 2018

Examples

			G.f. = 1 + 2*x + 8*x^2 + 32*x^3 + 136*x^4 + 592*x^5 + 2624*x^6 + 11776*x^7 + ...
J_3 = Integral_{y=0..Pi/4} 4*(4*(sin(y)-cos(y))*sin(y))^3*dy = 32*Pi - (304/3), |J_3| < 1. - _Bradley Klee_, Jul 19 2018
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

First column of A110446. A higher-quality Pi approximation: A123178.

Programs

  • GAP
    a:=[1,2];; for n in [3..25] do a[n]:=1/(n-1)*(2*(2*n-3)*a[n-1]+4*(n-2)*a[n-2]); od; a; # Muniru A Asiru, Aug 06 2018
  • Maple
    seq(add(binomial(2*k, k)*binomial(k, n-k), k=0..n), n=0..30 ); # Detlef Pauly (dettodet(AT)yahoo.de), Nov 08 2001
    A006139 := n -> 2^n*hypergeom([-n/2, 1/2-n/2], [1], 2):
    seq(simplify(A006139(n)), n=0..29); # Peter Luschny, Sep 18 2014
  • Mathematica
    Table[SeriesCoefficient[1/(1-4x-4x^2)^(1/2),{x,0,n}],{n,0,20}] (* Vaclav Kotesovec, Oct 05 2012 *)
    Table[Abs[LegendreP[n, I]] 2^n, {n, 0, 20}] (* Vladimir Reshetnikov, Oct 22 2015 *)
    Table[Sum[Binomial[2*k, k]*Binomial[k, n - k], {k,0,n}], {n,0,50}] (* G. C. Greubel, Feb 28 2017 *)
    a[n_] := If[n == 0, 1, Coefficient[(1 + 2 x + 2 x^2)^n, x^n]] (* Emanuele Munarini, Aug 04 2017 *)
    CoefficientList[Series[1/Sqrt[(-4 x^2 - 4 x + 1)], {x, 0, 24}], x] (* Robert G. Wilson v, Jul 28 2018 *)
  • Maxima
    a(n) := coeff(expand((1+2*x+2*x^2)^n),x,n);
    makelist(a(n),n,0,12); /* Emanuele Munarini, Aug 04 2017 */
    
  • PARI
    for(n=0,30,t=polcoeff((1+2*x+2*x^2)^n,n,x); print1(t","))
    
  • PARI
    for(n=0,25, print1(sum(k=0,n, binomial(2*k,k)*binomial(k,n-k)), ", ")) \\ G. C. Greubel, Feb 28 2017
    
  • PARI
    {a(n) = (-2*I)^n * pollegendre(n, I)}; /* Michael Somos, Aug 04 2018 */
    

Formula

a(n) = Sum_{k=0..n} C(2*k, k)*C(k, n-k). - Detlef Pauly (dettodet(AT)yahoo.de), Nov 08 2001
G.f.: 1/(1-4x-4x^2)^(1/2); also, a(n) is the central coefficient of (1+2x+2x^2)^n. - Paul D. Hanna, Jun 01 2003
Inverse binomial transform of central Delannoy numbers A001850. - David Callan, Mar 14 2004
E.g.f.: exp(2*x) * BesselI(0, 2*sqrt(2)*x). - Vladeta Jovovic, Mar 21 2004
a(n) = Sum_{k=0..floor(n/2)} C(n,2k) * C(2k,k) * 2^(n-k). - Paul Barry, Sep 19 2006
a(n) ~ 2^(n - 3/4) * (1 + sqrt(2))^(n + 1/2) / sqrt(Pi*n). - Vaclav Kotesovec, Oct 05 2012, simplified Jan 31 2023
G.f.: 1/(1 - 2*x*(1+x)*Q(0)), where Q(k)= 1 + (4*k+1)*x*(1+x)/(k+1 - x*(1+x)*(2*k+2)*(4*k+3)/(2*x*(1+x)*(4*k+3)+(2*k+3)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 14 2013
a(n) = 2^n*hypergeom([-n/2, 1/2-n/2], [1], 2). - Peter Luschny, Sep 18 2014
0 = a(n)*(+16*a(n+1) + 24*a(n+2) - 8*a(n+3)) + a(n+1)*(+8*a(n+1) + 16*a(n+2) - 6*a(n+3)) + a(n+2)*(-2*a(n+2) + a(n+3)) for all n in Z. - Michael Somos, Oct 13 2016
It appears that Pi/2 = Sum_{n >= 1} (-1)^(n-1)*4^n/(n*a(n-1)*a(n)). - Peter Bala, Feb 20 2017
G.f.: G(x) = (1/(2*Pi))*Integral_{y=0..2*Pi} 1/(1-x*(4*(sin(y)-cos(y))*sin(y)))*dy, also satisfies: (2+4*x)*G(x)-(1-4*x-4*x^2)*G'(x)=0. - Bradley Klee, Jul 19 2018
a(n) = Sum_{k=0..n} (1-i)^k * (1+i)^(n-k) * binomial(n,k)^2, where i is the imaginary unit. - Seiichi Manyama, Aug 29 2025

A059304 a(n) = 2^n * (2*n)! / (n!)^2.

Original entry on oeis.org

1, 4, 24, 160, 1120, 8064, 59136, 439296, 3294720, 24893440, 189190144, 1444724736, 11076222976, 85201715200, 657270374400, 5082890895360, 39392404439040, 305870434467840, 2378992268083200, 18531097667174400
Offset: 0

Views

Author

Henry Bottomley, Jan 25 2001

Keywords

Comments

Number of lattice paths from (0,0) to (n,n) using steps (0,1), and two kinds of steps (1,0). - Joerg Arndt, Jul 01 2011
The convolution square root of this sequence is A004981. - T. D. Noe, Jun 11 2002
Also main diagonal of array: T(i,1)=2^(i-1), T(1,j)=1, T(i,j) = T(i,j-1) + 2*T(i-1,j). - Benoit Cloitre, Feb 26 2003
The Hankel transform (see A001906 for definition) of this sequence with interpolated zeros(1, 0, 4, 0, 24, 0, 160, 0, 1120, ...) = is A036442: 1, 4, 32, 512, 16384, ... . - Philippe Deléham, Jul 03 2005
The Hankel transform of this sequence gives A103488. - Philippe Deléham, Dec 02 2007
Equals the central column of the triangle A038207. - Zerinvary Lajos, Dec 08 2007
Equals number of permutations whose reverse shares the same recording tableau in the Robinson-Schensted correspondence with n=(k-1)/2 for k odd. - Dang-Son Nguyen, Jul 02 2024
Number of ternary strings of length 2*n that have the same number of 0's as the combined number of 1's and 2's. For example, a(2)=24 since the strings of length 4 are the 6 permutations of 0011, the 12 permutations of 0012, and the 6 permutations of 0022. - Enrique Navarrete, Jul 30 2025

Crossrefs

Diagonal of A013609.
Column k=0 of A067001.

Programs

  • Magma
    [2^n*Binomial(2*n,n): n in [0..25]]; // Vincenzo Librandi, Oct 08 2015
    
  • Maple
    seq(binomial(2*n,n)*2^n,n=0..19); # Zerinvary Lajos, Dec 08 2007
  • Mathematica
    Table[2^n Binomial[2n,n],{n,0,30}] (* Harvey P. Dale, Dec 16 2014 *)
  • PARI
    {a(n)=if(n<0, 0, 2^n*(2*n)!/n!^2)} /* Michael Somos, Jan 31 2007 */
    
  • PARI
    { for (n = 0, 200, write("b059304.txt", n, " ", 2^n * (2*n)! / n!^2); ) } \\ Harry J. Smith, Jun 25 2009
    
  • PARI
    /* as lattice paths: same as in A092566 but use */
    steps=[[1, 0], [1, 0], [0, 1]]; /* note the double [1, 0] */
    /* Joerg Arndt, Jul 01 2011 */
    
  • SageMath
    def A059304(n): return pow(2,n)*binomial(2*n,n)
    print([A059304(n) for n in range(41)]) # G. C. Greubel, Jan 18 2025

Formula

a(n) = 2^n * C(2*n,n).
D-finite with recurrence a(n) = 4*(2-1/n)*a(n-1).
a(n) = A000079(n)*A000984(n)
G.f.: 1/sqrt(1-8*x) - T. D. Noe, Jun 11 2002
E.g.f.: exp(4*x)*BesselI(0, 4*x). - Vladeta Jovovic, Aug 20 2003
a(n) = A038207(n,n). - Joerg Arndt, Jul 01 2011
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - 4*x*(2*k+1)/(4*x*(2*k+1) + (k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 24 2013
E.g.f.: E(0)/2, where E(k) = 1 + 1/(1 - 4*x/(4*x + (k+1)^2/(2*k+1)/E(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 01 2013
G.f.: Q(0)/(1+2*sqrt(x)), where Q(k) = 1 + 2*sqrt(x)/(1 - 2*sqrt(x)*(2*k+1)/(2*sqrt(x)*(2*k+1) + (k+1)/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 09 2013
O.g.f.: hypergeom([1/2], [], 8*x). - Peter Luschny, Oct 08 2015
a(n) = Sum_{k = 0..2*n} (-1)^(n+k)*binomial(2*n,k)*binomial(3*n-2*k,n)* binomial(n+k,n). - Peter Bala, Aug 04 2016
a(n) ~ 8^n/sqrt(Pi*n). - Ilya Gutkovskiy, Aug 04 2016
From Amiram Eldar, Jul 21 2020: (Start)
Sum_{n>=0} 1/a(n) = 8/7 + 8*sqrt(7)*arcsin(1/sqrt(8))/49.
Sum_{n>=0} (-1)^n/a(n) = (8/27)*(3 - arcsinh(1/sqrt(8))). (End)
a(n) = Sum_{k = n..2*n} binomial(2*n,k)*binomial(k,n). In general, for m >= 1, Sum_{k = n..m*n} binomial(m*n,k)*binomial(k,n) = 2^((m-1)*n)*binomial(m*n,n). - Peter Bala, Mar 25 2023
Conjecture: a(n) = Sum_{0 <= j, k <= n} binomial(n, j)*binomial(n, k)* binomial(k+j, n). - Peter Bala, Jul 16 2024

A246534 a(n) = Sum_{k=1..n} 2^(T(k)-1), where T(k)=k(k+1)/2 = A000217(k).

Original entry on oeis.org

0, 1, 5, 37, 549, 16933, 1065509, 135283237, 34495021605, 17626681066021, 18032025190548005, 36911520172609651237, 151152638972001256489509, 1238091191924352276155613733, 20283647694843594776223406899749, 664634281540152780046679753547072037
Offset: 0

Views

Author

M. F. Hasler, Aug 28 2014

Keywords

Comments

Similar to A181388, this occurs as binary encoding of a straight n-omino lying on the y-axis, when the grid points of the first quadrant (N x N, N={0,1,2,...}) are given the weight 2^k, with k=0, 1,2, 3,4,5, ... filled in by antidiagonals.
Numbers k such that the k-th composition in standard order (row k of A066099) is a reversed initial interval. - Gus Wiseman, Apr 02 2020

Examples

			Label the cells of an infinite square matrix with 0,1,2,3,... along antidiagonals:
  0 1 3 6 10 ...
  2 4 7 ...
  5 8 ...
  9 ...
  ....
Now any subset of these cells can be represented by the sum of 2 raised to the power written in the given cells. In particular, the subset consisting of the first cell in the first 1, 2, 3, ... rows is represented by 2^0, 2^0+2^2, 2^0+2^2+2^5, ...
		

Crossrefs

The version for prime (rather than binary) indices is A002110.
The non-strict generalization is A114994.
The non-reversed version is A164894.
Intersection of A333256 and A333217.
Partial sums of A036442.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
    Select[Range[0,1000],normQ[stc[#]]&&Greater@@stc[#]&] (* Gus Wiseman, Apr 02 2020 *)
  • PARI
    t=0;vector(20,n,t+=2^(n*(n+1)/2-1)) \\ yields the vector starting with a[1]=1
    
  • PARI
    t=0;vector(20,n,if(n>1,t+=2^(n*(n-1)/2-1))) \\ yields the vector starting with 0
    
  • Python
    a = 0
    for n in range(1,17): print(a, end =', '); a += 1<<(n-1)*(n+2)//2 # Ya-Ping Lu, Jan 23 2024

A084601 Coefficients of 1/(1-2*x-7*x^2)^(1/2); also, a(n) is the central coefficient of (1+x+2*x^2)^n.

Original entry on oeis.org

1, 1, 5, 13, 49, 161, 581, 2045, 7393, 26689, 97285, 355565, 1305745, 4808545, 17760965, 65753693, 243954113, 906758785, 3375949829, 12587460557, 46995614449, 175669746209, 657370655045, 2462383495357, 9232029156001
Offset: 0

Views

Author

Paul D. Hanna, Jun 01 2003

Keywords

Comments

The Hankel transform (see A001906 for definition) of this sequence is A036442 : 1, 4, 32, 512, 16384, ... . - Philippe Deléham, Jul 03 2005
Also number of paths from (0,0) to (n,0) using steps U=(1,1), H=(1,0) and D=(1,-1), U (or D) can have 2 colors. - N-E. Fahssi, Feb 05 2008
Diagonal of the rational function 1 / (1 - 2*x^2 - y^2 - x*y). - Ilya Gutkovskiy, Apr 22 2025

Crossrefs

Programs

  • Maple
    a := n -> hypergeom([1/2 - n/2, -n/2], [1], 8):
    seq(simplify(a(n)), n=0..24); # Peter Luschny, Mar 18 2018
  • Mathematica
    CoefficientList[Series[1/Sqrt[1-2x-7x^2],{x,0,30}],x] (* Harvey P. Dale, Sep 18 2011 *)
  • Maxima
    a(n):=coeff(expand((1+x+2*x^2)^n),x,n);
    makelist(a(n),n,0,12); /* Emanuele Munarini, Mar 02 2011 */
  • PARI
    for(n=0,30,t=polcoeff((1+x+2*x^2)^n,n,x); print1(t","))
    

Formula

E.g.f.: exp(x)*BesselI(0, 2*sqrt(2)*x). - Vladeta Jovovic, Mar 21 2004
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*binomial(n, k)*2^k. - Paul Barry, Aug 26 2004
a(n) = Sum_{k=0..n} Trinomial(k, n)*Binomial(n, k), with Trinomial=A027907 and Binomial=A007318. - Ralf Stephan, Jan 28 2005
a(n) is also the central coefficient of (2+x+x^2)^n; a(n) = Sum_{k=0..n} C(n,k) T(k,n), where T(k,n) is the triangle of trinomial coefficients = coefficient of x^n of (1+x+x^2)^k : A027907 - N-E. Fahssi, Feb 05 2008
a(n+2) = ((2*n+3)*a(n+1) + 7*(n+1)*a(n))/(n+2); a(0)=a(1)=1. - Sergei N. Gladkovskii, Aug 01 2012
G.f.: G(0), where G(k)= 1 + x*(2+7*x)*(4*k+1)/( 4*k+2 - x*(2+7*x)*(4*k+2)*(4*k+3)/(x*(2+7*x)*(4*k+3) + 4*(k+1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 06 2013
a(n) ~ sqrt(8+2*sqrt(2)) * (1+2*sqrt(2))^n / (4*sqrt(Pi*n)). - Vaclav Kotesovec, May 09 2014
a(n) = hypergeom([1/2 - n/2, -n/2], [1], 8). - Peter Luschny, Mar 18 2018

A015502 a(1) = 1, a(n) = Sum_{k=1..n-1} (3^k - 1)/2 * a(k).

Original entry on oeis.org

1, 1, 5, 70, 2870, 350140, 127801100, 139814403400, 458731057555400, 4514831068460246800, 133300387296288786770000, 11806948504381482999365980000, 3137354163532752044074527571580000, 2500979519710095684958538548015855960000
Offset: 1

Views

Author

Keywords

Crossrefs

Sequences with the recurrence a(n) = (m^(n-1) + m-2)*a(n-1)/(m-1): A036442 (m=2), this sequence (m=3), A015503 (m=4), A015506 (m=5), A015507 (m=6), A015508 (m=7), A015509 (m=8), A015511 (m=9), A015512 (m=10), A015513 (m=11), A015515 (m=12).
Cf. A156296.

Programs

  • Magma
    [n le 2 select 1 else ((3^(n-1)+1)/2)*Self(n-1): n in [1..15]]; // Vincenzo Librandi, Nov 11 2012
    
  • Mathematica
    Flatten[{1, Table[QPochhammer[-1, 3, n]/2^(n+1), {n, 2, 15}]}] (* Vaclav Kotesovec, Mar 24 2017 *)
    a[n_, m_]:= a[n, m]= If[n<3, 1, (m^(n-1)+m-2)*a[n-1,m]/(m-1)];
    Table[a[n,3], {n,20}] (* G. C. Greubel, Apr 29 2023 *)
  • SageMath
    @CachedFunction # a = A015502
    def a(n,m): return 1 if (n<3) else (m^(n-1) + m-2)*a(n-1,m)/(m-1)
    [a(n,3) for n in range(1,31)] # G. C. Greubel, Apr 29 2023

Formula

a(n) = ((3^(n-1) + 1)/2) * a(n-1). - Vincenzo Librandi, Nov 11 2012
a(n) ~ c * 3^(n*(n-1)/2) / 2^(n+1), where c = A132323 = QPochhammer(-1, 1/3) = 3.129868... . - Vaclav Kotesovec, Mar 24 2017

A015503 a(1) = 1, a(n) = Sum_{k=1..n-1} ((4^k - 1)/3)*a(k).

Original entry on oeis.org

1, 1, 6, 132, 11352, 3882384, 5303336544, 28966824203328, 632809241545903488, 55296137144764138588416, 19327437631660830304254690816, 27021729207700270170039091739231232, 151116480551518237100547636877027177224192
Offset: 1

Views

Author

Keywords

Crossrefs

Sequences with the recurrence a(n) = (m^(n-1) + m-2)*a(n-1)/(m-1): A036442 (m=2), A015502 (m=3), this sequence (m=4), A015506 (m=5), A015507 (m=6), A015508 (m=7), A015509 (m=8), A015511 (m=9), A015512 (m=10), A015513 (m=11), A015515 (m=12).

Programs

  • Magma
    [n le 2 select 1 else ((4^(n-1)+2)/3)*Self(n-1): n in [1..15]]; // Vincenzo Librandi, Nov 11 2012
    
  • Mathematica
    a[n_, m_]:= a[n, m]= If[n<3, 1, (m^(n-1)+m-2)*a[n-1,m]/(m-1)];
    Table[a[n,4], {n,30}] (* G. C. Greubel, Apr 29 2023 *)
  • SageMath
    @CachedFunction # a = A015503
    def a(n,m): return 1 if (n<3) else (m^(n-1) + m-2)*a(n-1,m)/(m-1)
    [a(n,4) for n in range(1,31)] # G. C. Greubel, Apr 29 2023

Formula

a(n) = ((4^(n-1) + 2)/3) * a(n-1). - Vincenzo Librandi, Nov 11 2012

A015506 a(1) = 1, a(n) = Sum_{k=1}^{n-1} (5^k - 1)/4 a(k).

Original entry on oeis.org

1, 1, 7, 224, 35168, 27501376, 107447876032, 2098671914657024, 204950003169660992768, 100073397447688408870744576, 244319893042568615235897903058432, 2982420752607212448380293251367177293824
Offset: 1

Views

Author

Keywords

Crossrefs

Sequences with the recurrence a(n) = (m^(n-1) + m-2)*a(n-1)/(m-1): A036442 (m=2), A015502 (m=3), A015503 (m=4), this sequence (m=5), A015507 (m=6), A015508 (m=7), A015509 (m=8), A015511 (m=9), A015512 (m=10), A015513 (m=11), A015515 (m=12).

Programs

  • Magma
    [n le 2 select 1 else ((5^(n-1)+3)/4)*Self(n-1): n in [1..15]]; // Vincenzo Librandi, Nov 12 2012
    
  • Mathematica
    a[n_, m_]:= a[n, m]= If[n<3, 1, (m^(n-1)+m-2)*a[n-1,m]/(m-1)];
    Table[a[n, 5], {n, 20}] (* G. C. Greubel, Apr 29 2023 *)
  • SageMath
    @CachedFunction # a = A015506
    def a(n,m): return 1 if (n<3) else (m^(n-1) + m-2)*a(n-1,m)/(m-1)
    [a(n,5) for n in range(1,31)] # G. C. Greubel, Apr 29 2023

Formula

a(n) = ((5^(n-1) + 3)/4) * a(n-1). - Vincenzo Librandi, Nov 12 2012
Showing 1-10 of 28 results. Next