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.

A027306 a(n) = 2^(n-1) + ((1 + (-1)^n)/4)*binomial(n, n/2).

This page as a plain text file.
%I A027306 #126 Sep 08 2022 08:44:49
%S A027306 1,1,3,4,11,16,42,64,163,256,638,1024,2510,4096,9908,16384,39203,
%T A027306 65536,155382,262144,616666,1048576,2449868,4194304,9740686,16777216,
%U A027306 38754732,67108864,154276028,268435456,614429672,1073741824,2448023843
%N A027306 a(n) = 2^(n-1) + ((1 + (-1)^n)/4)*binomial(n, n/2).
%C A027306 Inverse binomial transform of A027914. Hankel transform (see A001906 for definition) is {1, 2, 3, 4, ..., n, ...}. - _Philippe Deléham_, Jul 21 2005
%C A027306 Number of walks of length n on a line that starts at the origin and ends at or above 0. - _Benjamin Phillabaum_, Mar 05 2011
%C A027306 Number of binary integers (i.e., with a leading 1 bit) of length n+1 which have a majority of 1-bits. E.g., for n+1=4: (1011, 1101, 1110, 1111) a(3)=4. - _Toby Gottfried_, Dec 11 2011
%C A027306 Number of distinct symmetric staircase walks connecting opposite corners of a square grid of side n > 1. - _Christian Barrientos_, Nov 25 2018
%C A027306 From _Gus Wiseman_, Aug 20 2021: (Start)
%C A027306 Also the number of integer compositions of n + 1 with alternating sum > 0, where the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. These compositions are ranked by A345917. For example, the a(0) = 1 through a(4) = 11 compositions are:
%C A027306   (1)  (2)  (3)    (4)    (5)
%C A027306             (21)   (31)   (32)
%C A027306             (111)  (112)  (41)
%C A027306                    (211)  (113)
%C A027306                           (122)
%C A027306                           (212)
%C A027306                           (221)
%C A027306                           (311)
%C A027306                           (1121)
%C A027306                           (2111)
%C A027306                           (11111)
%C A027306 The following relate to these compositions:
%C A027306 - The unordered version is A027193.
%C A027306 - The complement is counted by A058622.
%C A027306 - The reverse unordered version is A086543.
%C A027306 - The version for alternating sum >= 0 is A116406.
%C A027306 - The version for alternating sum < 0 is A294175.
%C A027306 - Ranked by A345917. (End)
%C A027306 The Gauss congruences a(n*p^k) == a(n^p^(k-1)) (mod p^k) hold for prime p and positive integers n and k. - _Peter Bala_, Jan 07 2022
%D A027306 A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992, Eq. (4.2.1.6)
%H A027306 Alois P. Heinz, <a href="/A027306/b027306.txt">Table of n, a(n) for n = 0..1000</a>
%H A027306 F. Disanto, A. Frosini, and S. Rinaldi, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Rinaldi/square.html">Square involutions</a>, J. Int. Seq. 14 (2011) # 11.3.5.
%H A027306 Zachary Hamaker and Eric Marberg, <a href="https://arxiv.org/abs/1802.09805">Atoms for signed permutations</a>, arXiv:1802.09805 [math.CO], 2018.
%H A027306 Donatella Merlini and Massimo Nocentini, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL21/Merlini/merlini5.html">Algebraic Generating Functions for Languages Avoiding Riordan Patterns</a>, Journal of Integer Sequences, Vol. 21 (2018), Article 18.1.3.
%H A027306 Y. Puri and T. Ward, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL4/WARD/short.html">Arithmetic and growth of periodic orbits</a>, J. Integer Seqs., Vol. 4 (2001), #01.2.1.
%F A027306 a(n) = Sum_{k=0..floor(n/2)} binomial(n,k).
%F A027306 Odd terms are 2^(n-1). Also a(2n) - 2^(2n-1) is given by A001700. a(n) = 2^n + (n mod 2)*binomial(n, (n-1)/2).
%F A027306 E.g.f.: (exp(2x) + I_0(2x))/2.
%F A027306 O.g.f.: 2*x/(1-2*x)/(1+2*x-((1+2*x)*(1-2*x))^(1/2)). - _Vladeta Jovovic_, Apr 27 2003
%F A027306 a(n) = A008949(n, floor(n/2)); a(n) + a(n-1) = A248574(n), n > 0. - _Reinhard Zumkeller_, Nov 14 2014
%F A027306 From _Peter Bala_, Jul 21 2015: (Start)
%F A027306 a(n) = [x^n]( 2*x - 1/(1 - x) )^n.
%F A027306 O.g.f.: (1/2)*( 1/sqrt(1 - 4*x^2) + 1/(1 - 2*x) ).
%F A027306 Inverse binomial transform is (-1)^n*A246437(n).
%F A027306 exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + ... is the o.g.f. for A001405. (End)
%F A027306 a(n) = Sum_{k=1..floor((n+1)/2)} binomial(n-1,(2n+1-(-1)^n)/4 -k). - _Anthony Browne_, Jun 18 2016
%F A027306 D-finite with recurrence: n*a(n) + 2*(-n+1)*a(n-1) + 4*(-n+1)*a(n-2) + 8*(n-2)*a(n-3) = 0. - _R. J. Mathar_, Aug 09 2017
%e A027306 From _Gus Wiseman_, Aug 20 2021: (Start)
%e A027306 The a(0) = 1 through a(4) = 11 binary numbers with a majority of 1-bits (Gottfried's comment) are:
%e A027306   1   11   101   1011   10011
%e A027306            110   1101   10101
%e A027306            111   1110   10110
%e A027306                  1111   10111
%e A027306                         11001
%e A027306                         11010
%e A027306                         11011
%e A027306                         11100
%e A027306                         11101
%e A027306                         11110
%e A027306                         11111
%e A027306 The version allowing an initial zero is A058622.
%e A027306 (End)
%p A027306 a:= proc(n) add(binomial(n, j), j=0..n/2) end:
%p A027306 seq(a(n), n=0..32); # _Zerinvary Lajos_, Mar 29 2009
%t A027306 Table[Sum[Binomial[n, k], {k, 0, Floor[n/2]}], {n, 1, 35}]
%t A027306 (* Second program: *)
%t A027306 a[0] = a[1] = 1; a[2] = 3; a[n_] := a[n] = (2(n-1)(2a[n-2] + a[n-1]) - 8(n-2) a[n-3])/n; Array[a, 33, 0] (* _Jean-François Alcover_, Sep 04 2016 *)
%o A027306 (PARI) a(n)=if(n<0,0,(2^n+if(n%2,0,binomial(n, n/2)))/2)
%o A027306 (Haskell)
%o A027306 a027306 n = a008949 n (n `div` 2)  -- _Reinhard Zumkeller_, Nov 14 2014
%o A027306 (Magma) [2^(n-1)+(1+(-1)^n)/4*Binomial(n, n div 2): n in [0..40]]; // _Vincenzo Librandi_, Jun 19 2016
%o A027306 (GAP) List([0..35],n->Sum([0..Int(n/2)],k->Binomial(n,k))); # _Muniru A Asiru_, Nov 27 2018
%Y A027306 a(n) = Sum{(k+1)T(n, m-k)}, 0<=k<=[ (n+1)/2 ], T given by A008315.
%Y A027306 Column k=2 of A226873. - _Alois P. Heinz_, Jun 21 2013
%Y A027306 Cf. A008949, A248574, A001405, A246437.
%Y A027306 The even bisection is A000302.
%Y A027306 The odd bisection appears to be A032443.
%Y A027306 Cf. A000984, A001700, A001791, A008549, A011782, A088218, A097805, A163493, A182616, A345197.
%K A027306 nonn,easy,walk
%O A027306 0,3
%A A027306 _Clark Kimberling_
%E A027306 Better description from _Robert G. Wilson v_, Aug 30 2000 and from Yong Kong (ykong(AT)curagen.com), Dec 28 2000