A020522 a(n) = 4^n - 2^n.
0, 2, 12, 56, 240, 992, 4032, 16256, 65280, 261632, 1047552, 4192256, 16773120, 67100672, 268419072, 1073709056, 4294901760, 17179738112, 68719214592, 274877382656, 1099510579200, 4398044413952, 17592181850112, 70368735789056, 281474959933440
Offset: 0
Examples
n=5: a(5) = 4^5 - 2^5 = 1024 - 32 = 992 -> '1111100000'.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..170
- M. Archibald, A. Blecher, A. Knopfmacher, and M. E. Mays, Inversions and Parity in Compositions of Integers, J. Int. Seq., Vol. 23 (2020), Article 20.4.1.
- Tom Copeland, The Kervaire-Milnor formula
- John Elias, Illustration of initial terms: Twin 2^n hexagonal numbers
- L. H. Harper, Optimal Assignment of Numbers to Vertices, J. SIAM 12(1), p. 131--135, March 1964; alternative link.
- Ross La Haye, Binary Relations on the Power Set of an n-Element Set, Journal of Integer Sequences, Vol. 12 (2009), Article 09.2.6.
- The Sixtieth William Lowell Putnam Mathematical Competition, Question A6, Amer. Math. Monthly 107 (Oct 2000), 721-732; see p. 725.
- Index entries for linear recurrences with constant coefficients, signature (6,-8).
Crossrefs
Programs
-
Haskell
a020522 = (* 2) . a006516 -- Reinhard Zumkeller, Dec 15 2015
-
Magma
[4^n - 2^n: n in [0..60]]; // Vincenzo Librandi, Apr 26 2011
-
Maple
A020522:=n->4^n-2^n; seq(A020522(n), n=0..50); # Wesley Ivan Hurt, Nov 29 2013
-
Mathematica
Table[4^n - 2^n, {n, 40}] (* or *) LinearRecurrence[{6, -8}, {0, 2}, 40] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2012 *)
-
PARI
a(n)=4^n-2^n \\ Charles R Greathouse IV, Jan 30 2012
-
Python
def A020522(n): return (1<
Chai Wah Wu, Mar 10 2025 -
Sage
[4^n - 2^n for n in range(0,23)] # Zerinvary Lajos, Jun 05 2009
Formula
From Herbert Kociemba, Jul 02 2004: (Start)
G.f.: 2*x/((-1 + 2*x)*(-1 + 4*x)).
a(n) = 6*a(n-1) - 8*a(n-2). (End)
E.g.f.: exp(4*x) - exp(2*x). - Mohammad K. Azarian, Jan 14 2009
From Reinhard Zumkeller, Feb 07 2006, Jaroslav Krizek, Aug 02 2009: (Start)
In binary representation, n>0: n 1's followed by n 0's (A138147(n)).
A000120(a(n)) = n.
A023416(a(n)) = n.
A070939(a(n)) = 2*n.
a(n) = 2*A006516(n) = A000079(n)*A000225(n) = A265736(A000225(n)). - Reinhard Zumkeller, Dec 15 2015
a(n) = (4^(n/2) - 4^(n/4))*(4^(n/2) + 4^(n/4)). - Bruno Berselli, Apr 09 2018
Sum_{n>0} 1/a(n) = E - 1, where E is the Erdős-Borwein constant (A065442). - Peter McNair, Dec 19 2022
Comments