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 26 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

A000749 a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3), n > 3, with a(0)=a(1)=a(2)=0, a(3)=1.

Original entry on oeis.org

0, 0, 0, 1, 4, 10, 20, 36, 64, 120, 240, 496, 1024, 2080, 4160, 8256, 16384, 32640, 65280, 130816, 262144, 524800, 1049600, 2098176, 4194304, 8386560, 16773120, 33550336, 67108864, 134225920, 268451840, 536887296, 1073741824, 2147450880
Offset: 0

Views

Author

Keywords

Comments

Number of strings over Z_2 of length n with trace 1 and subtrace 1.
Same as number of strings over GF(2) of length n with trace 1 and subtrace 1.
Also expansion of bracket function.
a(n) is also the number of induced subgraphs with odd number of edges in the complete graph K(n-1). - Alessandro Cosentino (cosenal(AT)gmail.com), Feb 02 2009
From Gary W. Adamson, Mar 13 2009: (Start)
M^n * [1,0,0,0] = [A038503(n), a(n), A038505(n), A038504(n)];
where M = the 4 X 4 matrix [1,1,0,0; 0,1,1,0; 0,0,1,1; 1,0,0,1].
Sum of the 4 terms = 2^n.
Example; M^6 * [1,0,0,0] = [16, 20, 16, 12] sum = 64 = 2^6. (End)
Binomial transform of the period 4 repeat: [0,0,0,1], which is the same as A011765 with offset 0. - Wesley Ivan Hurt, Dec 30 2015
{A038503, A038504, A038505, A000749} is the difference analog of the hyperbolic functions of order 4, {h_1(x), h_2(x), h_3(x), h_4(x)}. For a definition see the reference "Higher Transcendental Functions" and the Shevelev link. - Vladimir Shevelev, Jun 14 2017
This is the p-INVERT of (1,1,1,1,1,...) for p(S) = 1 - S^4; see A291000. - Clark Kimberling, Aug 24 2017

Examples

			a(4;1,1)=4 since the four binary strings of trace 1, subtrace 1 and length 4 are { 0111, 1011, 1101, 1110 }.
		

References

  • Higher Transcendental Functions, Bateman Manuscript Project, Vol. 3, ed. A. Erdelyi, 1983 (chapter XVIII).
  • 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

Sequences of the form 1/((1-x)^m - x^m): A000079 (m=1,2), A024495 (m=3), this sequence (m=4), A049016 (m=5), A192080 (m=6), A049017 (m=7), A290995 (m=8), A306939 (m=9).

Programs

  • Haskell
    a000749 n = a000749_list !! n
    a000749_list = 0 : 0 : 0 : 1 : zipWith3 (\u v w -> 4 * u - 6 * v + 4 * w)
       (drop 3 a000749_list) (drop 2 a000749_list) (drop 1 a000749_list)
    -- Reinhard Zumkeller, Jul 15 2013
    
  • Magma
    I:=[0,0,0,1]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Dec 31 2015
    
  • Maple
    A000749 := proc(n) local k; add(binomial(n,4*k+3),k=0..floor(n/4)); end;
    A000749:=-1/((2*z-1)*(2*z**2-2*z+1)); # Simon Plouffe in his 1992 dissertation
    a:= n-> if n=0 then 0 else (Matrix(3, (i,j)-> if (i=j-1) then 1 elif j=1 then [4,-6,4][i] else 0 fi)^(n-1))[1,3] fi: seq(a(n), n=0..33); # Alois P. Heinz, Aug 26 2008
    # Alternatively:
    s := sqrt(2): h := n -> [0,-s,-2,-s,0,s,2,s][1+(n mod 8)]:
    a := n -> `if`(n=0,0,(2^n+2^(n/2)*h(n))/4):
    seq(a(n),n=0..33); # Peter Luschny, Jun 14 2017
  • Mathematica
    Join[{0},LinearRecurrence[{4,-6,4},{0,0,1},40]] (* Harvey P. Dale, Mar 31 2012 *)
    CoefficientList[Series[x^3/(1 -4x +6x^2 -4x^3), {x,0,80}], x] (* Vincenzo Librandi, Dec 31 2015 *)
  • PARI
    a(n)=sum(k=0,n\4,binomial(n,4*k+3))
    
  • SageMath
    @CachedFunction
    def a(n): # a = A000749
        if (n<4): return (n//3)
        else: return 4*a(n-1) -6*a(n-2) +4*a(n-3)
    [a(n) for n in range(41)] # G. C. Greubel, Apr 11 2023

Formula

G.f.: x^3/((1-x)^4 - x^4).
a(n) = Sum_{k=0..n} binomial(n, 4*k+3).
a(n) = a(n-1) + A038505(n-2) = 2*a(n-1) + A009545(n-2) for n>=2.
Without the two initial zeros, binomial transform of A007877. - Henry Bottomley, Jun 04 2001
From Paul Barry, Aug 30 2004: (Start)
a(n) = (2^n - 2^(n/2+1)*sin(Pi*n/4) - 0^n)/4.
a(n+1) is the binomial transform of A021913. (End)
a(n; t, s) = a(n-1; t, s) + a(n-1; t+1, s+t+1) where t is the trace and s is the subtrace.
Without the initial three zeros, = binomial transform of [1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1, 3, ...]. - Gary W. Adamson, Jun 19 2008
From Vladimir Shevelev, Jun 14 2017: (Start)
1) For n>=1, a(n) = (1/4)*(2^n + i*(1+i)^n - i*(1-i)^n), where i=sqrt(-1);
2) a(n+m) = a(n)*H_1(m) + H_3(n)*H_2(m) + H_2(n)*H_3(m) + H_1(n)*a(m),
where H_1 = A038503, H_2 = A038504, H_3 = A038505. (End)
a(n) = (2^n - 2*A009545(n) - [n=0])/4. - G. C. Greubel, Apr 11 2023

Extensions

Additional comments from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Nov 22 2002
New definition from Paul Curtz, Oct 29 2007
Edited by N. J. A. Sloane, Jun 13 2008

A038504 Sum of every 4th entry of row n in Pascal's triangle, starting at "n choose 1".

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 12, 28, 64, 136, 272, 528, 1024, 2016, 4032, 8128, 16384, 32896, 65792, 131328, 262144, 523776, 1047552, 2096128, 4194304, 8390656, 16781312, 33558528, 67108864, 134209536, 268419072, 536854528, 1073741824
Offset: 0

Views

Author

Keywords

Comments

Number of strings over Z_2 of length n with trace 1 and subtrace 0.
Same as number of strings over GF(2) of length n with trace 1 and subtrace 0.
From Gary W. Adamson, Mar 13 2009: (Start)
M^n * [1,0,0,0] = [A038503(n), A000749(n), A038505(n), a(n)]; where
M = a 4x4 matrix [1,1,0,0; 0,1,1,0; 0,0,1,1; 1,0,0,1]. Sum of terms = 2^n
Example: M^6 * [1,0,0,0] = [16, 20, 16, 12], Sum = 2^6 = 64. (End)
{A038503, A038504, A038505, A000749} is the difference analog of the hyperbolic functions {h_1(x), h_2(x), h_3(x), h_4(x)} of order 4. For the definitions of {h_i(x)} and the difference analog {H_i (n)} see [Erdelyi] and the Shevelev link respectively. - Vladimir Shevelev, Jul 31 2017

Examples

			a(2;1,0) = 3 since the two binary strings of trace 1, subtrace 0 and length 2 are { 10, 01 }.
		

References

  • A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Chapter XVIII.

Crossrefs

Programs

  • Magma
    [0] cat [n le 3 select n else 4*Self(n-1) -6*Self(n-2) + 4*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jun 22 2012
    
  • Mathematica
    CoefficientList[Series[x(1-x)^2/((1-2x)(1-2x+2x^2)),{x,0,40}],x] (* Vincenzo Librandi, Jun 22 2012 *)
    LinearRecurrence[{4,-6,4},{0,1,2,3},40] (* Harvey P. Dale, Aug 23 2017 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A038504
        if (n<4): return n
        else: return 4*a(n-1) - 6*a(n-2) + 4*a(n-3)
    [a(n) for n in range(51)] # G. C. Greubel, Apr 20 2023

Formula

a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3), n > 3. - Paul Curtz, Mar 01 2008
G.f.: x*(1-x)^2/((1-2*x)*(1-2*x+2*x^2)).
From Paul Barry, Jul 25 2004: (Start)
Binomial transform of x/(1-x^4).
G.f.: x*(1-x)^2/((1-x)^4 - x^4) = x/(1-2*x) - x^3/((1-x)^4 - x^4).
a(n) = Sum_{k=0..floor(n/4)} binomial(n, 4*k+1).
a(n) = Sum_{k=0..n} binomial(n, k)*(sin(Pi*k/2)/2 + (1 - (-1)^k)/4).
a(n) = 2^(n-2) + 2^((n-2)/2)*sin(Pi*n/4) - 0^n/4. (End)
a(n; t, s) = a(n-1; t, s) + a(n-1; t+1, s+t+1) where t is the trace and s is the subtrace.
(1, 2, 3, 4, 6, ...) is the binomial transform of (1, 1, 0, 0, 1, 1, ...). - Gary W. Adamson, May 15 2007
From Vladimir Shevelev, Jul 31 2017: (Start)
For n >= 1, {H_i(n)} are linearly dependent sequences: a(n) = H_2(n) = H_1(n) + H_3(n) - H_4(n);
a(n+m) = a(n)*H_1(m) + H_1(n)*a(m) + H_4(n)*H_3(m) + H_3(n)*H_4(m), where H_1 = A038503, H_3 = A038505, H_4 = A000749.
For proofs, see Shevelev's link, Theorems 2, 3. (End)
a(n) = (1/4)*(2^((n+1)/2)*ChebyshevU(n-1, 1/sqrt(2)) + 2^n - [n=0]). - G. C. Greubel, Apr 20 2023

A038505 Sum of every 4th entry of row n in Pascal's triangle, starting at binomial(n,2).

Original entry on oeis.org

0, 0, 1, 3, 6, 10, 16, 28, 56, 120, 256, 528, 1056, 2080, 4096, 8128, 16256, 32640, 65536, 131328, 262656, 524800, 1048576, 2096128, 4192256, 8386560, 16777216, 33558528, 67117056, 134225920, 268435456, 536854528, 1073709056
Offset: 0

Views

Author

Keywords

Comments

Number of strings over Z_2 of length n with trace 0 and subtrace 1.
Same as number of strings over GF(2) of length n with trace 0 and subtrace 1.
Binomial transform of (0,1,1,0,0,1,1,0,...) gives a(n) for n >= 1. - Paul Barry, Jul 07 2003
From Gary W. Adamson, Mar 13 2009: (Start)
M^n * [1,0,0,0] = [A038503(n), A000749(n), a(n), A038504(n)]; where M = a 4 X 4 matrix [1,1,0,0; 0,1,1,0; 0,0,1,1; 1,0,0,1]. Sum of terms = 2^n.
Example: M^6 * [1,0,0,0] [16, 20, 16, 12]; sum = 2^6 = 64. (End)
{A038503, A038504, A038505, A000749} is the difference analog of the hyperbolic functions of order 4, {h_1(x), h_2(x), h_3(x), h_4(x)}. For a definition of {h_i(x)} and the difference analog {H_i (n)} see [Erdelyi] and the Shevelev link respectively. - Vladimir Shevelev, Jun 14 2017

Examples

			a(3; 0, 1) = 3 since the three binary strings of trace 0, subtrace 1 and length 3 are { 011, 101, 110 }.
		

References

  • A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Chapter XVIII.

Crossrefs

Programs

  • GAP
    List([0..35],n->Sum([0..n],k->Binomial(n,2+4*k))); # Muniru A Asiru, Feb 21 2019
  • Haskell
    a038505 n = a038505_list !! n
    a038505_list = tail $ zipWith (-) (tail a000749_list) a000749_list
    -- Reinhard Zumkeller, Jul 15 2013
    
  • Magma
    I:=[0, 0, 1, 3]; [n le 3 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jun 22 2012
    
  • Maple
    # From Peter Luschny, Jun 15 2017: (Start)
    s := sqrt(2): h := n -> [-2, -s, 0, s, 2, s, 0, -s][1 + (n mod 8)]:
    a := n -> `if`(n=0, 0, (2^n + 2^(n/2)*h(n))/4): seq(a(n), n=0..32);
    # Alternatively:
    egf := (1 + exp(2*x) - 2*exp(x)*cos(x))/4:
    series(egf, x, 33): seq(n!*coeff(%,x,n), n=0..32); # (End)
  • Mathematica
    LinearRecurrence[{4, -6, 4}, {0, 0, 1, 3}, 40] (* Vincenzo Librandi, Jun 22 2012 *)
    Table[If[n==0, 0, 2^(n-2) - 2^(n/2-1) Cos[Pi*n/4]], {n, 0, 32}] (* Vladimir Reshetnikov, Sep 16 2016 *)
  • Sage
    A = lambda n: (2^n - (1-I)^n - (1+I)^n) / 4 if n != 0 else 0
    print([A(n) for n in (0..32)]) # Peter Luschny, Jun 16 2017
    

Formula

a(n; t, s) = a(n-1; t, s) + a(n-1; t+1, s+t+1) where t is the trace and s is the subtrace.
a(n) = Sum_{k=0..n} binomial(n, 2 + 4*k), n >= 0.
a(n) = Sum_{k=0..n} (1/2)*C(n, k)*(-1)^C(k+3, 3) for n >= 1. - Paul Barry, Jul 07 2003
From Paul Barry, Nov 29 2004: (Start)
G.f.: x^2*(1-x)/((1-x)^4-x^4) = x^2*(1-x)/((1-2*x)*(1-2*x+2*x^2));
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2*k)*(1-(-1)^k)/2. (End)
Conjecture: 2*a(n+2) = A038504(n+2) + A000749(n+2) + 2*A009545(n). - Creighton Dement, May 22 2005
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3), n > 3; sequence is identical to its fourth differences. - Paul Curtz, Dec 21 2007
a(n) = A000749(n+1) - A000749(n). - Reinhard Zumkeller, Jul 15 2013
a(n+m) = a(n)*H_1(m) + H_2(n)*H_2(m) + H_1(n)*a(m) + H_4(n)*H_4(m),
where H_1=A038503, H_2=A038504, H_4=A000749. - Vladimir Shevelev, Jun 14 2017
From Peter Luschny, Jun 15 2017: (Start)
a(n) = n! [x^n] (1 + exp(2*x) - 2*exp(x)*cos(x))/4.
a(n) = A038503(n+2) - 2*A038503(n+1) + A038503(n).
a(n) = 2^(n-2) - A046980(n)*2^(A004525(n-3)) for n >= 1.
a(n) = (2^n - (1-i)^n - (1+i)^n) / 4 for n >= 1. Compare V. Shevelevs' formula (1) in A000749. (End)
From Vladimir Shevelev, Jun 16 2017: (Start)
Proof of the conjecture by Creighton Dement (May 22 2005): using the first formula of Theorem 1 in [Shevelev link] for n=4, omega=i=sqrt(-1), i:=1,2,3,4, m:=n>=1, we have
a(n) = (1/2)*(2^(n-1)-2^(n/2)*cos(Pi*n/4)), A038504(n) = (1/2)*(2^(n-1)+2^(n/2)* sin(Pi*n/4)), A000749(n) = (1/2)*(2^(n-1)-2^(n/2)*sin(Pi*n/4)). Finally we use the formula by Paul Barry: A009545(n) = 2^(n/2)*sin(Pi*n/4) = 2^(n/2)*(-cos(Pi*(n+2)/4)). Now it is easy to obtain the hypothetical formula. (End)

Extensions

Missing 0 prepended by Vladimir Shevelev, Jun 14 2017
Edited by Peter Luschny, Jun 16 2017

A139398 a(n) = Sum_{k >= 0} binomial(n,5*k).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 7, 22, 57, 127, 254, 474, 859, 1574, 3004, 6008, 12393, 25773, 53143, 107883, 215766, 427351, 843756, 1669801, 3321891, 6643782, 13333932, 26789257, 53774932, 107746282, 215492564, 430470899, 859595529, 1717012749, 3431847189, 6863694378
Offset: 0

Views

Author

N. J. A. Sloane, Jun 13 2008

Keywords

Comments

From Gary W. Adamson, Mar 13 2009: (Start)
M^n * [1,0,0,0,0] = [a(n), A139761(n), A139748(n), A139714(n), A133476(n)]
where M = the 5 X 5 matrix [1,1,0,0,0; 0,1,1,0,0; 0,0,1,1,0; 0,0,0,1,1; 1,0,0,0,1]
Sum of terms = 2^n. Example: M^6 * [1,0,0,0,0] = [7, 15, 20, 15, 7]; sum = 2^6 = 64. (End)
{A139398, A133476, A139714, A139748, A139761} is the difference analog of the hyperbolic functions of order 5, {h_1(x), h_2(x), h_3(x), h_4(x), h_5 (x)}. For a definition see the reference "Higher Transcendental Functions" and the Shevelev link. - Vladimir Shevelev, Jun 14 2017

References

  • A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Ch. 18.

Crossrefs

Programs

  • Magma
    [n le 5 select 1 else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+2*Self(n-5): n in [1..40]]; // Vincenzo Librandi, Jun 27 2017
  • Maple
    f:=(n,r,a) -> add(binomial(n,r*k+a),k=0..n); fs:=(r,a)->[seq(f(n,r,a),n=0..40)];
    A139398_list := proc(n) local i; (exp(z)^2+2*exp(3/4*z+1/4*z*sqrt(5))* cos(1/4*z*sqrt(2)*sqrt(5+sqrt(5)))+2*exp(3/4*z-1/4*z*sqrt(5))* cos(1/4*z*sqrt(2)*sqrt(5-sqrt(5))))/5; series(%,z,n+2): seq(simplify(i!*coeff(%,z,i)), i=0..n) end: A139398_list(35); # Peter Luschny, Jul 10 2012
  • Mathematica
    LinearRecurrence[{5,-10,10,-5,2},{1,1,1,1,1},40] (* Harvey P. Dale, Jun 11 2015 *)
    Expand@Table[(2^n + Sqrt[5] (Cos[Pi n/5] - (-1)^n Cos[2 Pi n/5]) Fibonacci[n] + (Cos[Pi n/5] + (-1)^n Cos[2 Pi n/5]) LucasL[n])/5, {n, 0, 20}] (* Vladimir Reshetnikov, Oct 04 2016 *)

Formula

G.f.: -(x-1)^4/((2*x-1)*(x^4-2*x^3+4*x^2-3*x+1)). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 12 2009
E.g.f.: (exp(z)^2+2*exp(3/4*z+1/4*z*sqrt(5))*cos(1/4*z*sqrt(2)*sqrt(5+sqrt(5)))+ 2*exp(3/4*z-1/4*z*sqrt(5))*cos(1/4*z*sqrt(2)*sqrt(5-sqrt(5))))/5. - Peter Luschny, Jul 10 2012
a(n) = (2^n + sqrt(5)*(cos(Pi*n/5) - (-1)^n*cos(2*Pi*n/5))*A000045(n) + (cos(Pi*n/5) + (-1)^n*cos(2*Pi*n/5))*A000032(n))/5. - Vladimir Reshetnikov, Oct 04 2016
From Vladimir Shevelev, Jun 17 2017: (Start)
a(n) = round((2/5)*(2^(n-1) + phi^n*cos(Pi*n/5))), where phi is the golden ratio and round(x) is the integer nearest to x.
The formula follows from the identity a(n)=1/5*Sum_{j=1..5}((omega_5)^j + 1)^n, where omega_5=exp(2*Pi*i)/5 (cf. Theorem 1 of [Shevelev] link for i=1, n=5, m:=n). Further note that for a=cos(x)+i*sin(x), a+1 = 2*cos ^2 (x/2) + i*sin(x), and for the argument y of a+1 we have tan(y)=tan(x/2) and r^2 = 4*cos^4(x/2) + sin^2(x) = 4*cos^2(x/2). So (a+1)^n = (2*cos(x /2))^n*(cos(n*x/2) + i*sin(n*x/2)). Using this, for x=2*Pi/5, we have (omega_5+1)^n = phi^n(cos(Pi*n/5) + i*sin(Pi*n/5)). Since (omega_5)^4+1=(1+omega_5)/omega_5, we easily find that ((omega_5)^4+1)^n is conjugate to (omega_5+1)^n. So (omega_5+1)^n+((omega_5)^4+1)^n = phi^n*cos(Pi*n/5). Further, we similarly obtain that (omega_5)^2+1 is conjugate to (omega_5) ^3+1=(1+(omega_5)^2)/(omega_5)^2 and ((omega_5)^2+1)^n +((omega_5)^3+1)^n = 2*(sqrt(2-phi))^n*cos(2*Pi*n/5). The absolute value of the latter <= 2*(2-phi)^(n/2) and quickly tends to 0. Finally, ((omega_5)^5+1)^n=2^n, and the formula follows. (End)
a(n+m) = a(n)*a(m) + H_2(n)*H_5(m) + H_3(n)*H_4(m) + H_4(n)*H_3(m) + H_5(n)*H_2(m), where H_2=A133476, H_3=A139714, H_4=A139748, H_5=A139761. - Vladimir Shevelev, Jun 17 2017

A135356 Triangle T(n,k) read by rows: coefficients in the recurrence of sequences which equal their n-th differences.

Original entry on oeis.org

2, 2, 0, 3, -3, 2, 4, -6, 4, 0, 5, -10, 10, -5, 2, 6, -15, 20, -15, 6, 0, 7, -21, 35, -35, 21, -7, 2, 8, -28, 56, -70, 56, -28, 8, 0, 9, -36, 84, -126, 126, -84, 36, -9, 2, 10, -45, 120, -210, 252, -210, 120, -45, 10, 0, 11, -55, 165, -330, 462, -462, 330, -165, 55, -11, 2
Offset: 1

Views

Author

Paul Curtz, Dec 08 2007, Mar 25 2008, Apr 28 2008

Keywords

Comments

Sequences which equal their p-th differences obey recurrences a(n) = Sum_{s=1..p} T(p,s)*a(n-s).
This defines T(p,s) as essentially a signed version of a chopped Pascal triangle A014410, see A130785.
For cases like p=2, 4, 6, 8, 10, 12, 14, the denominator of the rational generating function of a(n) contains a factor 1-x; depending on the first terms in the sequences a(n), additional, simpler recurrences may exist if this cancels with a factor in the numerator. - R. J. Mathar, Jun 10 2008

Examples

			Triangle begins with row n=1:
  2;
  2,   0;
  3,  -3,  2;
  4,  -6,  4,    0;
  5, -10, 10,   -5,   2;
  6, -15, 20,  -15,   6,   0;
  7, -21, 35,  -35,  21,  -7,  2;
  8, -28, 56,  -70,  56, -28,  8,  0;
  9, -36, 84, -126, 126, -84, 36, -9, 2;
		

Crossrefs

Related sequences: A000079 (n=1), A131577 (n=2), (A131708 , A130785, A131562, A057079) (n=3), (A000749, A038503, A009545, A038505) (n=4), A133476 (n=5), A140343 (n=6), A140342 (n=7).

Programs

  • Magma
    A135356:= func< n,k | k eq n select 1-(-1)^n else (-1)^(k+1)*Binomial(n,k) >;
    [A135356(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 09 2023
    
  • Maple
    T:= (p, s)->  `if`(p=s, 2*irem(p, 2), (-1)^(s+1) *binomial(p, s)):
    seq(seq(T(p, s), s=1..p), p=1..11);  # Alois P. Heinz, Aug 26 2011
  • Mathematica
    T[p_, s_]:= If[p==s, 2*Mod[s, 2], (-1)^(s+1)*Binomial[p, s]];
    Table[T[p, s], {p, 12}, {s, p}]//Flatten (* Jean-François Alcover, Feb 19 2015, after Alois P. Heinz *)
  • SageMath
    def A135356(n,k):
        if (k==n): return 2*(n%2)
        else: return (-1)^(k+1)*binomial(n,k)
    flatten([[A135356(n,k) for k in range(1,n+1)] for n in range(1,13)]) # G. C. Greubel, Apr 09 2023

Formula

T(n,k) = (-1)^(k+1)*A007318(n, k). T(n,n) = 1 - (-1)^n.
Sum_{k=1..n} T(n, k) = 2.
From G. C. Greubel, Apr 09 2023: (Start)
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = 2*A051049(n-1).
Sum_{k=1..n-1} T(n, k) = (1 + (-1)^n).
Sum_{k=1..n-1} (-1)^(k-1)*T(n, k) = A000225(n-1).
T(2*n, n) = (-1)^(n-1)*A000984(n), n >= 1. (End)

Extensions

Edited by R. J. Mathar, Jun 10 2008

A306846 Square array A(n,k), n >= 0, k >= 1, read by antidiagonals, where column k is the expansion of g.f. ((1-x)^(k-1))/((1-x)^k-x^k).

Original entry on oeis.org

1, 1, 2, 1, 1, 4, 1, 1, 2, 8, 1, 1, 1, 4, 16, 1, 1, 1, 2, 8, 32, 1, 1, 1, 1, 5, 16, 64, 1, 1, 1, 1, 2, 11, 32, 128, 1, 1, 1, 1, 1, 6, 22, 64, 256, 1, 1, 1, 1, 1, 2, 16, 43, 128, 512, 1, 1, 1, 1, 1, 1, 7, 36, 85, 256, 1024, 1, 1, 1, 1, 1, 1, 2, 22, 72, 170, 512, 2048
Offset: 0

Views

Author

Seiichi Manyama, Mar 13 2019

Keywords

Examples

			Square array begins:
     1,   1,  1,  1,  1,  1, 1, 1, 1, ...
     2,   1,  1,  1,  1,  1, 1, 1, 1, ...
     4,   2,  1,  1,  1,  1, 1, 1, 1, ...
     8,   4,  2,  1,  1,  1, 1, 1, 1, ...
    16,   8,  5,  2,  1,  1, 1, 1, 1, ...
    32,  16, 11,  6,  2,  1, 1, 1, 1, ...
    64,  32, 22, 16,  7,  2, 1, 1, 1, ...
   128,  64, 43, 36, 22,  8, 2, 1, 1, ...
   256, 128, 85, 72, 57, 29, 9, 2, 1, ...
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := Sum[Binomial[n, k*j], {j, 0, Floor[n/k]}]; Table[T[k, n - k + 1], {n, 0, 11}, {k, 0, n}] // Flatten (* Amiram Eldar, Jun 21 2021 *)

Formula

A(n,k) = Sum_{j=0..floor(n/k)} binomial(n,k*j).

A038518 Number of elements of GF(2^n) with trace 0 and subtrace 0.

Original entry on oeis.org

0, 1, 1, 1, 6, 6, 16, 36, 56, 136, 256, 496, 1056, 2016, 4096, 8256, 16256, 32896, 65536, 130816, 262656, 523776, 1048576, 2098176, 4192256, 8390656, 16777216, 33550336, 67117056, 134209536, 268435456, 536887296, 1073709056, 2147516416
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    0,seq(1/4*2^k-1/4*(-1-I)^k-1/4*(-1+I)^k,k=1..40); seq(coeff(convert(series((-x^3+x^2+x)/((1-2*x)*(1+2*x+2*x^2)),x,50),polynom),x,i),i=0..40); # C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 16 2004
  • Mathematica
    LinearRecurrence[{0,2,4},{0,1,1,1},40] (* Harvey P. Dale, Mar 31 2020 *)
  • PARI
    concat(0, Vec(x*(1 + x - x^2) / ((1 - 2*x)*(1 + 2*x + 2*x^2)) + O(x^40))) \\ Colin Barker, Aug 02 2019

Formula

C(n, r+0)+C(n, r+4)+C(n, r+8)+... where r = 0 if n odd, r = 2 if n even.
G.f.: (-x^3+x^2+x)/[(1-2x)(1+2x+2x^2)].
a(0)=0; a(n) = ( 2^n - (-1-i)^n - (-1+i)^n )/4, i=sqrt(-1). - C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 16 2004
a(n) = 2*a(n-2) + 4*a(n-3) for n>3. - Colin Barker, Aug 02 2019

A038519 Number of elements of GF(2^n) with trace 0 and subtrace 1.

Original entry on oeis.org

1, 0, 1, 3, 2, 10, 16, 28, 72, 120, 256, 528, 992, 2080, 4096, 8128, 16512, 32640, 65536, 131328, 261632, 524800, 1048576, 2096128, 4196352, 8386560, 16777216, 33558528, 67100672, 134225920, 268435456, 536854528, 1073774592
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[1,0,1,3]; [m le 4 select I[m] else 2*Self(m-2)+4*Self(m-3):m in [1..33]]; // Marius A. Burtea, Aug 02 2019
  • PARI
    Vec((1 - x^2 - x^3) / ((1 - 2*x)*(1 + 2*x + 2*x^2)) + O(x^40)) \\ Colin Barker, Aug 02 2019
    

Formula

a(n) = C(n, r+0) + C(n, r+4) + C(n, r+8) + ... where r = 2 if n odd, r = 0 if n even.
From Colin Barker, Aug 02 2019: (Start)
G.f.: (1 - x^2 - x^3) / ((1 - 2*x)*(1 + 2*x + 2*x^2)). - Creighton Dement, Apr 29 2005, corrected by Colin Barker, Aug 02 2019
a(n) = ((-1-i)^n + (-1+i)^n + 2^n) / 4 for n>0.
a(n) = 2*a(n-2) + 4*a(n-3) for n>3.
(End)

A090407 a(n) = Sum_{k = 0..n} C(4*n + 1, 4*k).

Original entry on oeis.org

1, 6, 136, 2016, 32896, 523776, 8390656, 134209536, 2147516416, 34359607296, 549756338176, 8796090925056, 140737496743936, 2251799780130816, 36028797153181696, 576460751766552576, 9223372039002259456
Offset: 0

Views

Author

Paul Barry, Nov 29 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Binomial[4n+1,4k],{k,0,n}],{n,0,30}] (* or *) LinearRecurrence[ {12,64},{1,6},30] (* Harvey P. Dale, Jan 19 2012 *)

Formula

From Harvey P. Dale, Jan 19 2012: (Start)
a(0) = 1, a(1) = 6, a(n) = 12*a(n-1)+64*a(n-2).
G.f.: (6*x-1)/(64*x^2+12*x-1). (End)
a(n) = (1/2) * 4^n * (4^n + (-1)^n). - Peter Bala, Feb 06 2019
Showing 1-10 of 26 results. Next