login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122746 G.f.: 1/((1-2*x)*(1-2*x^2)). 21
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Equals row sums of triangle A156665. - Gary W. Adamson, Feb 12 2009
a(n) is the number of subsets of {1,2,...,n+1} that contain at least one odd integer. - Geoffrey Critzer, Mar 03 2009
a(n-3) is the number of chiral pairs of color patterns of length n using two colors. Two color patterns are equivalent if the colors are permuted. For example, a string of five colors using exactly two different colors has six chiral pairs: AAAAB-ABBBB, AAABA-ABAAA, AAABB-AABBB, AABAB-ABABB, AABBA-ABBAA, and ABAAB-ABBAB. The number of color patterns of length n using exactly k colors when chiral pairs are counted twice is the Stirling subset number S2(n,k). The number of achiral color patterns of length n using exactly 2 colors is S2(floor(n/2)+1,2). The value of a(n-3) is half the difference of these two. - Robert A. Russell, Feb 01 2018
a(n-2) is the number of chiral pairs for a row of n colors with exactly 2 different colors. If the reverse of a sequence is different, the combination of the two is a chiral pair. For a row of 4 colors using exactly 2 different colors, the chiral pairs are AAAB-BAAA, AABA-ABAA, AABB-BBAA, ABAB-BABA, ABBB-BBBA, and BABB-BBAB. Thus a(4-2) = a(2) = 6. - Robert A. Russell, Jun 10 2018
LINKS
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.
FORMULA
From Alexander Adamchuk, Sep 25 2006: (Start)
a(2k) = A006516(k+1) = 2^k*(2^(k+1) - 1) = A020522(k+1) /2.
a(2k+1) = 2*A006516(k+1) = 2^(k+1)*(2^(k+1) - 1) = A020522(k+1). (End)
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) = (A000079(n+2) - A060546(n+2))/ 2. - Robert A. Russell, Jun 19 2018
a(n) = -a(-3-n) * 2^(n+2 + floor((n+1)/2)) for all n in Z. - Michael Somos, Jul 01 2018
a(n) = (A000918(n+2) - A056453(n+2)) / 2 = A000918(n+2) - A056309(n+2) = A056309(n+2) - A056453(n+2). - Robert A. Russell, Sep 26 2018
EXAMPLE
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
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 *)
PROG
(PARI) {a(n) = 2^(n+1) - 2^((n+1)\2)}; /* Michael Somos, Jul 01 2018 */
(GAP) List([0..35], n->2^(n+1)-2^(QuoInt(n+1, 2))); # Muniru A Asiru, Sep 27 2018
CROSSREFS
Essentially the same as A032085.
Sequence in context: A011949 A350271 A089820 * A191394 A237500 A330455
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Sep 24 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 10:22 EDT 2024. Contains 371268 sequences. (Running on oeis4.)