This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A004526 Nonnegative integers repeated, floor(n/2). 324

%I

%S 0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,

%T 14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,

%U 26,26,27,27,28,28,29,29,30,30,31,31,32,32,33,33,34,34,35,35,36,36

%N Nonnegative integers repeated, floor(n/2).

%C Number of elements in the set {k: 1 <= 2k <= n}.

%C Dimension of the space of weight 2n+4 cusp forms for Gamma_0(2).

%C Dimension of the space of weight 1 modular forms for Gamma_1(n+1).

%C Number of ways 2^n is expressible as r^2-s^2 with s > 0. Proof: (r+s) and (r-s) both should be powers of 2, even and distinct hence a(2k) = a(2k-1) = (k-1) etc. - _Amarnath Murthy_, Sep 20 2002

%C Lengths of sides of Ulam square spiral; i.e., lengths of runs of equal terms in A063826. - _Donald S. McDonald_, Jan 09 2003

%C Number of partitions of n into two parts. A008619 gives partitions of n into at most two parts, so A008619(n) = A004526(n) + 1 for all n >= 0. Partial sums are A002620 (Quarter-squares). - _Rick L. Shepherd_, Feb 27 2004

%C a(n+1) is the number of 1's in the binary expansion of the Jacobsthal number A001045(n). - _Paul Barry_, Jan 13 2005

%C Partitions of n+1 into two distinct (nonzero) parts. Example: a(8) = 4 because we have [8,1],[7,2],[6,3] and [5,4]. - _Emeric Deutsch_, Apr 14 2006

%C Complement of A000035, since A000035(n)+2*a(n) = n. Also equal to the partial sums of A000035. - _Hieronymus Fischer_, Jun 01 2007

%C Number of binary bracelets of n beads, two of them 0. For n >= 2, a(n-2) is the number of binary bracelets of n beads, two of them 0, with 00 prohibited. - _Washington Bomfim_, Aug 27 2008

%C Let A be the Hessenberg n X n matrix defined by: A[1,j] = j mod 2, A[i,i]:=1, A[i,i-1] = -1, and A[i,j] = 0 otherwise. Then, for n >= 1, a(n+1) = (-1)^n det(A). - _Milan Janjic_, Jan 24 2010

%C Let RT abbreviate rank transform (A187224). Then

%C RT(A004526) = A187484;

%C RT(A004526 without 1st term) = A026371;

%C RT(A004526 without 1st 2 terms) = A026367;

%C RT(A004526 without 1st 3 terms) = A026363. - _Clark Kimberling_, Mar 10 2011

%C The diameter (longest path) of the n-cycle. - _Cade Herron_, Apr 14 2011

%C For n >= 3, a(n-1) is the number of two-color bracelets of n beads, three of them are black, having a diameter of symmetry. - _Vladimir Shevelev_, May 03 2011

%C Pelesko (2004) refers erroneously to this sequence instead of A008619. - _M. F. Hasler_, Jul 19 2012

%C Number of degree 2 irreducible characters of the dihedral group of order 2(n+1). - _Eric M. Schmidt_, Feb 12 2013

%C For n >= 3 the sequence a(n-1) is the number of non-congruent regions with infinite area in the exterior of a regular n-gon with all diagonals drawn. See A217748. - _Martin Renner_, Mar 23 2013

%C a(n) is the number of partitions of 2n into exactly 2 even parts. a(n+1) is the number of partitions of 2n into exactly 2 odd parts. This just rephrases the comment of E. Deutsch above. - _Wesley Ivan Hurt_, Jun 08 2013

%C Number of the distinct rectangles and square in a regular n-gon is A004526(n/2) for even n and n >= 4. For odd n, such number is zero, see illustration in link. - _Kival Ngaokrajang_, Jun 25 2013

%C x-coordinate from the image of the point (0,-1) after n reflections across the lines y = n and y = x respectively (alternating so that one reflection is applied on each step): (0,-1) -> (0,1) -> (1,0) -> (1,2) -> (2,1) -> (2,3) -> ... . - _Wesley Ivan Hurt_, Jul 12 2013

%C a(n) is the number of partitions of 2n into exactly two distinct odd parts. a(n-1) is the number of partitions of 2n into exactly two distinct even parts, n > 0. - _Wesley Ivan Hurt_, Jul 21 2013

%C a(n) is the number of permutations of length n avoiding 213, 231 and 312, or avoiding 213, 312 and 321 in the classical sense which are breadth-first search reading words of increasing unary-binary trees. For more details, see the entry for permutations avoiding 231 at A245898. - _Manda Riehl_, Aug 05 2014

%C Also a(n) is the number of different patterns of 2-color, 2-partition of n. - _Ctibor O. Zizka_, Nov 19 2014

%C Minimum in- and out- degree for a directed K_n (see link). - _Jon Perry_, Nov 22 2014

%C a(n) is also the independence number of the triangular graph T(n). - _Luis Manuel Rivera MartÃ­nez_, Mar 12 2015

%C For n >= 3, a(n+4) is the least positive integer m such that every m-element subset of {1,2,...,n} contains distinct i, j, k with i + j = k (equivalently, with i - j = k). - _Rick L. Shepherd_, Jan 24 2016

%C More generally, the ordinary generating function for the integers repeated k times is x^k/((1 - x)(1 - x^k)). - _Ilya Gutkovskiy_, Mar 21 2016

%C a(n) = number of numbers F(i)*F(j) betweeen F(n+3) and F(n+4), where 2 < i < j and F = A000045 (Fibonacci numbers). - _Clark Kimberling_, May 02 2016

%C The arithmetic function v_2(n,2) as defined in A289187. - _Robert Price_, Aug 22 2017

%C a(n) is also the total domination number of the (n-3)-gear graph. - _Eric W. Weisstein_, Apr 07 2018

%D G. L. Alexanderson et al., The William Powell Putnam Mathematical Competition - Problems and Solutions: 1965-1984, M.A.A., 1985; see Problem A-1 of 27th Competition.

%D L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 120, P(n,2).

%D Graham, Knuth and Patashnik, Concrete Mathematics, Addison-Wesley, NY, 1989, page 77 (partitions of n into at most 2 parts).

%H David Wasserman, <a href="/A004526/b004526.txt">Table of n, a(n) for n = 0..1000</a>

%H Kival Ngaokrajang, <a href="/A004526/a004526.jpg">The distinct rectangles and square in a regular n-gon for n = 4..18</a>

%H John A. Pelesko, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL7/Pelesko/pel11.html">Generalizing the Conway-Hofstadter \$10,000 Sequence</a>, Journal of Integer Sequences, Vol. 7 (2004), Article 04.3.5.

%H Jon Perry, <a href="/A004526/a004526.pdf">Square of a directed graph.</a>

%H William A. Stein, <a href="http://modular.math.washington.edu/Tables/dimskg0n.gp">Dimensions of the spaces S_k(Gamma_0(N))</a>

%H William A. Stein, <a href="http://wstein.org/Tables/">The modular forms database</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GearGraph.html">Gear Graph</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimePartition.html">Prime Partition</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TotalDominationNumber.html">Total Domination Number</a>

%H <a href="/index/Cor#core">Index entries for "core" sequences</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).

%F G.f.: x^2/((1+x)*(x-1)^2).

%F a(n) = floor(n/2).

%F a(n) = 1 + a(n-2).

%F a(n) = a(n-1) + a(n-2) - a(n-3).

%F a(2n) = a(2n+1) = n.

%F a(n+1) = n-a(n). - _Henry Bottomley_, Jul 25 2001

%F For n > 0, a(n) = Sum_{i=1..n} (1/2)/cos(Pi*(2*i-(1-(-1)^n)/2)/(2*n+1))). - _Benoit Cloitre_, Oct 11 2002

%F a(n) = (2n-1)/4+(-1)^n/4; a(n+1) = Sum_{k=0..n} k*(-1)^(n+k)}. - _Paul Barry_, May 20 2003

%F E.g.f.: ((2x-1)*exp(x)+exp(-x))/4. - _Paul Barry_, Sep 03 2003

%F G.f.: 1/(1-x) * Sum_{k >= 0} t^2/(1-t^4) where t = x^2^k. - _Ralf Stephan_, Feb 24 2004

%F a(n+1) = A000120(A001045(n)). - _Paul Barry_, Jan 13 2005

%F a(n) = (n-(1-(-1)^n)/2)/2 = 1/2*(n-|sin(n*Pi/2)|). Likewise: a(n) = (n-A000035(n))/2. Also: a(n) = Sum_{0<=k<=n, A000035(k)}. - _Hieronymus Fischer_, Jun 01 2007

%F The expression floor((x^2-1)/(2*x)) (x >= 1) produces this sequence. - _Mohammad K. Azarian_, Nov 08 2007; corrected by _M. F. Hasler_, Nov 17 2008

%F a(n+1) = A002378(n) - A035608(n). - _Reinhard Zumkeller_, Jan 27 2010

%F a(n+1) = A002620(n+1) - A002620(n) = floor((n+1)/2)*ceiling((n+1)/2) - floor(n^2/4). - _Jonathan Vos Post_, May 20 2010

%F For n >= 2, a(n) = floor(log_2(2^a(n-1)+2^a(n-2))). - _Vladimir Shevelev_, Jun 22 2010

%F a(n) = A180969(2,n). - _Adriano Caroli_, Nov 24 2010

%F A001057(n-1) = (-1)^n*a(n), n > 0. - _M. F. Hasler_, Jul 19 2012

%F a(n) = A008615(n) + A002264(n). - _Reinhard Zumkeller_, Apr 28 2014

%F Euler transform of length 2 sequence [ 1, 1]. - _Michael Somos_, Jul 03 2014

%e G.f. = x^2 + x^3 + 2*x^4 + 2*x^5 + 3*x^6 + 3*x^7 + 4*x^8 + 4*x^9 + 5*x^10 + ...

%p A004526 := n->floor(n/2); seq(floor(i/2),i=0..50);

%t Table[(2n - 1)/4 + (-1)^n/4, {n, 0, 70}] (* _Stefan Steinerberger_, Apr 02 2006 *)

%t f[n_] := If[OddQ[n], (n - 1)/2, n/2]; Array[f, 74, 0] (* _Robert G. Wilson v_, Apr 20 2012 *)

%t With[{c=Range[0,40]},Riffle[c,c]] (* _Harvey P. Dale_, Aug 26 2013 *)

%t CoefficientList[Series[x^2/(1 - x - x^2 + x^3), {x, 0, 75}], x] (* _Robert G. Wilson v_, Feb 05 2015 *)

%t LinearRecurrence[{1, 1, -1}, {0, 0, 1}, 75] (* _Robert G. Wilson v_, Feb 05 2015 *)

%t Floor[Range[0, 40]/2] (* _Eric W. Weisstein_, Apr 07 2018 *)

%o (PARI) a(n)=n\2 /* _Jaume Oliver Lafont_, Mar 25 2009 */

%o (PARI) x='x+O('x^100); concat([0, 0], Vec(x^2/((1+x)*(x-1)^2))) \\ _Altug Alkan_, Mar 21 2016

%o a004526 = (`div` 2)

%o a004526_list = concatMap (\x -> [x, x]) [0..]

%o -- _Reinhard Zumkeller_, Jul 27 2012

%o (Maxima) makelist(floor(n/2),n,0,50); /* _Martin Ettl_, Oct 17 2012 */

%o (Sage) def a(n) : return( dimension_cusp_forms( Gamma0(2), 2*n+4) ); # _Michael Somos_, Jul 03 2014

%o (Sage) def a(n) : return( dimension_modular_forms( Gamma1(n+1), 1) ); # _Michael Somos_, Jul 03 2014

%o (MAGMA) [Floor(n/2): n in [0..100]]; // _Vincenzo Librandi_, Nov 19 2014

%Y a(n+2) = A008619(n). See A008619 for more references.

%Y A001477(n) = A004526(n+1)+A004526(n). A000035(n) = A004526(n+1)-A002456(n).

%Y a(n) = A008284(n, 2), n >= 1.

%Y Zero followed by the partial sums of A000035.

%Y Column 2 of triangle A094953. Second row of A180969.

%Y Cf. A002264, A002265, A002266, A010761, A010762, A110532, A110533.

%Y Partial sums: A002620. Other related sequences: A010872, A010873, A010874.

%Y Cf. similar sequences of the integers repeated k times: A001477 (k = 1), this sequence (k = 2), A002264 (k = 3), A002265 (k = 4), A002266 (k = 5), A152467 (k = 6), A132270 (k = 7), A132292 (k = 8), A059995 (k = 10).

%Y Cf. A289187.

%K nonn,easy,core,nice

%O 0,5

%A _N. J. A. Sloane_

%E Partially edited by _Joerg Arndt_, Mar 11 2010, and _M. F. Hasler_, Jul 19 2012

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

Last modified August 19 05:13 EDT 2018. Contains 313844 sequences. (Running on oeis4.)