A122746 G.f.: 1/((1-2*x)*(1-2*x^2)).
1, 2, 6, 12, 28, 56, 120, 240, 496, 992, 2016, 4032, 8128, 16256, 32640, 65280, 130816, 261632, 523776, 1047552, 2096128, 4192256, 8386560, 16773120, 33550336, 67100672, 134209536, 268419072, 536854528, 1073709056, 2147450880, 4294901760, 8589869056
Offset: 0
Examples
G.f. = 1 + 2*x + 6*x^2 + 12*x^3 + 28*x^4 + 56*x^5 + 120*x^6 + 240*x^7 + 496*x^8 + ... - _Michael Somos_, Jul 01 2018
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- S. J. Cyvin et al., Theory of polypentagons, J. Chem. Inf. Comput. Sci., 33 (1993), 466-474.
- E. Filiol and C. Fontaine, Highly nonlinear balanced Boolean functions with a good correlation-immunity, Lect. Not. Comp. Sci 1403 (1998), 475-488, NL(F_n).
- Juan B. Gil and Jessica A. Tomasko, Restricted Grassmannian permutations, arXiv:2112.03338 [math.CO], 2021.
- Index entries for linear recurrences with constant coefficients, signature (2,2,-4).
Crossrefs
Programs
-
GAP
List([0..35],n->2^(n+1)-2^(QuoInt(n+1,2))); # Muniru A Asiru, Sep 27 2018
-
Maple
seq(coeff(series(((1-2*x)*(1-2*x^2))^(-1),x,n+1), x, n), n = 0..35); # Muniru A Asiru, Sep 27 2018
-
Mathematica
RecurrenceTable[{a[n] == 2 (BitOr[a[n - 1], a[n - 2]]), a[0] == 1, a[1] == 2}, a, {n, 0, 32}] (* Geoffrey Critzer, Jan 09 2011 *) CoefficientList[Series[1/((1-2x)(1-2x^2)),{x,0,40}],x] (* or *) LinearRecurrence[{2,2,-4},{1,2,6},40] (* Harvey P. Dale, Jun 25 2013 *) Table[(StirlingS2[n,2] - StirlingS2[Floor[n/2]+1,2])/2, {n,3,30}] (* Robert A. Russell, Jan 29 2018 *) a[ n_] := 2^(n + 1) - 2^Quotient[n + 1, 2]; (* Michael Somos, Jul 01 2018 *)
-
PARI
{a(n) = 2^(n+1) - 2^((n+1)\2)}; /* Michael Somos, Jul 01 2018 */
Formula
From Alexander Adamchuk, Sep 25 2006: (Start)
a(n) = 2^(n+1) - 2^(floor((n+1)/2)). - Geoffrey Critzer, Mar 03 2009
a(n) = 2*(a(n-1) bitwiseOR a(n-2)), a(0)=1, a(1)=2. - Pierre Charland, Dec 12 2010
G.f.: (1+x*Q(0))/(1-x)^2, where Q(k)= 1 - 1/(2^k - 2*x*2^(2*k)/(2*x*2^k - 1/(1 + 1/(2*2^k - 8*x*2^(2*k)/(4*x*2^k + 1/Q(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, May 23 2013
a(0)=1, a(1)=2, a(2)=6, a(n) = 2*a(n-1) + 2*a(n-2) - 4*a(n-3). - Harvey P. Dale, Jun 25 2013
a(n) = -a(-3-n) * 2^(n+2 + floor((n+1)/2)) for all n in Z. - Michael Somos, Jul 01 2018
Comments