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.
%I A020522 #170 Aug 06 2025 09:28:52 %S A020522 0,2,12,56,240,992,4032,16256,65280,261632,1047552,4192256,16773120, %T A020522 67100672,268419072,1073709056,4294901760,17179738112,68719214592, %U A020522 274877382656,1099510579200,4398044413952,17592181850112,70368735789056,281474959933440 %N A020522 a(n) = 4^n - 2^n. %C A020522 Number of walks of length 2*n+2 between any two diametrically opposite vertices of the cycle graph C_8. - _Herbert Kociemba_, Jul 02 2004 %C A020522 If we consider a(4*k+2), then 2^4 == 3^4 == 3 (mod 13); 2^(4*k+2) + 3^(4*k+2) == 3^k*(4+9) == 3*0 == 0 (mod 13). So a(4*k+2) can never be prime. - Jose Brox, Dec 27 2005 %C A020522 If k is odd, then a(n*k) is divisible by a(n), since: a(n*k) = (2^n)^k + (3^n)^k = (2^n + 3^n)*((2^n)^(k-1) - (2^n)^(k-2) (3^n) + - ... + (3^n)^(k-1)). So the only possible primes in the sequence are a(0) and a(2^n) for n>=1. I've checked that a(2^n) is composite for 3 <= n <= 15. As with Fermat primes, a probabilistic argument suggests that there are only finitely many primes in the sequence. - _Dean Hickerson_, Dec 27 2005 %C A020522 Let x,y,z be elements from some power set P(n), i.e., the power set of a set of n elements. Define a function f(x,y,z) in the following manner: f(x,y,z) = 1 if x is a subset of y and y is a subset of z and x does not equal z; f(x,y,z) = 0 if x is not a subset of y or y is not a subset of z or x equals z. Now sum f(x,y,z) for all x,y,z of P(n). This gives a(n). - _Ross La Haye_, Dec 26 2005 %C A020522 Number of monic (irreducible) polynomials of degree 1 over GF(2^n). - _Max Alekseyev_, Jan 13 2006 %C A020522 Let P(A) be the power set of an n-element set A and B be the Cartesian product of P(A) with itself. Then a(n) = the number of (x,y) of B for which x does not equal y. - _Ross La Haye_, Jan 02 2008 %C A020522 For n>1: central terms of the triangle in A173787. - _Reinhard Zumkeller_, Feb 28 2010 %C A020522 Pronic numbers of the form: (2^n - 1)*2^n, which is the n-th Mersenne number times 2^n, see A000225 and A002378. - _Fred Daniel Kline_, Nov 30 2013 %C A020522 Indices where records of A037870 occur. - _Philippe Beaudoin_, Sep 03 2014 %C A020522 Half the total edge length for a minimum linear arrangement of a hypercube of dimension n. (See Harper's paper below for proof). - _Eitan Frachtenberg_, Apr 07 2017 %C A020522 Number of pairs in GF(2)^{n+1} whose dot product is 1. - _Christopher Purcell_, Dec 11 2021 %H A020522 Vincenzo Librandi, <a href="/A020522/b020522.txt">Table of n, a(n) for n = 0..170</a> %H A020522 M. Archibald, A. Blecher, A. Knopfmacher, and M. E. Mays, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL23/Archibald/arch3.html">Inversions and Parity in Compositions of Integers</a>, J. Int. Seq., Vol. 23 (2020), Article 20.4.1. %H A020522 Tom Copeland, <a href="http://tcjpn.wordpress.com/2015/10/04/the-kervaire-milnor-formula/">The Kervaire-Milnor formula</a> %H A020522 John Elias, <a href="/A020522/a020522_1.png">Illustration of initial terms: Twin 2^n hexagonal numbers</a> %H A020522 L. H. Harper, <a href="https://doi.org/10.1137/0112012">Optimal Assignment of Numbers to Vertices</a>, J. SIAM 12(1), p. 131--135, March 1964; <a href="https://www.jstor.org/stable/2946514">alternative link</a>. %H A020522 Ross La Haye, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL12/LaHaye/lahaye5.html">Binary Relations on the Power Set of an n-Element Set</a>, Journal of Integer Sequences, Vol. 12 (2009), Article 09.2.6. %H A020522 The Sixtieth William Lowell Putnam Mathematical Competition, <a href="http://www.jstor.org/stable/2695469">Question A6</a>, Amer. Math. Monthly 107 (Oct 2000), 721-732; see p. 725. %H A020522 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (6,-8). %F A020522 From _Herbert Kociemba_, Jul 02 2004: (Start) %F A020522 G.f.: 2*x/((-1 + 2*x)*(-1 + 4*x)). %F A020522 a(n) = 6*a(n-1) - 8*a(n-2). (End) %F A020522 E.g.f.: exp(4*x) - exp(2*x). - _Mohammad K. Azarian_, Jan 14 2009 %F A020522 From _Reinhard Zumkeller_, Feb 07 2006, _Jaroslav Krizek_, Aug 02 2009: (Start) %F A020522 a(n) = A099393(n)-A000225(n+1) = A083420(n)-A099393(n). %F A020522 In binary representation, n>0: n 1's followed by n 0's (A138147(n)). %F A020522 A000120(a(n)) = n. %F A020522 A023416(a(n)) = n. %F A020522 A070939(a(n)) = 2*n. %F A020522 2*a(n)+1 = A030101(A099393(n)). (End) %F A020522 a(n) = A085812(n) - A001700(n). - _John Molokach_, Sep 28 2013 %F A020522 a(n) = 2*A006516(n) = A000079(n)*A000225(n) = A265736(A000225(n)). - _Reinhard Zumkeller_, Dec 15 2015 %F A020522 a(n) = (4^(n/2) - 4^(n/4))*(4^(n/2) + 4^(n/4)). - _Bruno Berselli_, Apr 09 2018 %F A020522 Sum_{n>0} 1/a(n) = E - 1, where E is the Erdős-Borwein constant (A065442). - _Peter McNair_, Dec 19 2022 %F A020522 a(n) = A000302(n) - A000079(n). - _John Reimer Morales_, Aug 04 2025 %e A020522 n=5: a(5) = 4^5 - 2^5 = 1024 - 32 = 992 -> '1111100000'. %p A020522 A020522:=n->4^n-2^n; seq(A020522(n), n=0..50); # _Wesley Ivan Hurt_, Nov 29 2013 %t A020522 Table[4^n - 2^n, {n, 40}] (* or *) LinearRecurrence[{6, -8}, {0, 2}, 40] (* _Vladimir Joseph Stephan Orlovsky_, Feb 20 2012 *) %o A020522 (Sage) [4^n - 2^n for n in range(0,23)] # _Zerinvary Lajos_, Jun 05 2009 %o A020522 (Magma) [4^n - 2^n: n in [0..60]]; // _Vincenzo Librandi_, Apr 26 2011 %o A020522 (PARI) a(n)=4^n-2^n \\ _Charles R Greathouse IV_, Jan 30 2012 %o A020522 (Haskell) %o A020522 a020522 = (* 2) . a006516 -- _Reinhard Zumkeller_, Dec 15 2015 %o A020522 (Python) %o A020522 def A020522(n): return (1<<n)-1<<n # _Chai Wah Wu_, Mar 10 2025 %Y A020522 Ratio of successive terms of A028365. %Y A020522 Cf. A000225, A060867, A161168, A006516, A059153, A065442. %Y A020522 Cf. A000079, A265736, A020988, A047849. %Y A020522 Cf. A000079, A000302. %K A020522 nonn,easy %O A020522 0,2 %A A020522 _N. J. A. Sloane_, _Simon Plouffe_