

A004526


Nonnegative integers repeated, floor(n/2).


464



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, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,5


COMMENTS

Number of elements in the set {k: 1 <= 2k <= n}.
Dimension of the space of weight 2n+4 cusp forms for Gamma_0(2).
Dimension of the space of weight 1 modular forms for Gamma_1(n+1).
Number of ways 2^n is expressible as r^2  s^2 with s > 0. Proof: (r+s) and (rs) both should be powers of 2, even and distinct hence a(2k) = a(2k1) = (k1) etc.  Amarnath Murthy, Sep 20 2002
Number of partitions of n into two parts. A008619 gives partitions of n into at most two parts, so A008619(n) = a(n) + 1 for all n >= 0. Partial sums are A002620 (Quartersquares).  Rick L. Shepherd, Feb 27 2004
a(n+1) is the number of 1's in the binary expansion of the Jacobsthal number A001045(n).  Paul Barry, Jan 13 2005
Number of 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
Number of binary bracelets of n beads, two of them 0. For n >= 2, a(n2) is the number of binary bracelets of n beads, two of them 0, with 00 prohibited.  Washington Bomfim, Aug 27 2008
Let A be the Hessenberg n X n matrix defined by: A[1,j] = j mod 2, A[i,i]:=1, A[i,i1] = 1, and A[i,j] = 0 otherwise. Then, for n >= 1, a(n+1) = (1)^n det(A).  Milan Janjic, Jan 24 2010
Let RT abbreviate rank transform (A187224). Then
RT(this sequence without 1st term) = A026371;
RT(this sequence without 1st 2 terms) = A026367;
RT(this sequence without 1st 3 terms) = A026363. (End)
The diameter (longest path) of the ncycle.  Cade Herron, Apr 14 2011
For n >= 3, a(n1) is the number of twocolor bracelets of n beads, three of them are black, having a diameter of symmetry.  Vladimir Shevelev, May 03 2011
Pelesko (2004) refers erroneously to this sequence instead of A008619.  M. F. Hasler, Jul 19 2012
Number of degree 2 irreducible characters of the dihedral group of order 2(n+1).  Eric M. Schmidt, Feb 12 2013
For n >= 3 the sequence a(n1) is the number of noncongruent regions with infinite area in the exterior of a regular ngon with all diagonals drawn. See A217748.  Martin Renner, Mar 23 2013
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
Number of the distinct rectangles and square in a regular ngon is a(n/2) for even n and n >= 4. For odd n, such number is zero, see illustration in link.  Kival Ngaokrajang, Jun 25 2013
xcoordinate 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
a(n) is the number of partitions of 2n into exactly two distinct odd parts. a(n1) is the number of partitions of 2n into exactly two distinct even parts, n > 0.  Wesley Ivan Hurt, Jul 21 2013
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 breadthfirst search reading words of increasing unarybinary trees. For more details, see the entry for permutations avoiding 231 at A245898.  Manda Riehl, Aug 05 2014
Also a(n) is the number of different patterns of 2color, 2partition of n.  Ctibor O. Zizka, Nov 19 2014
Minimum in and outdegree for a directed K_n (see link).  Jon Perry, Nov 22 2014
For n >= 3, a(n+4) is the least positive integer m such that every melement 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
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
a(n) is the number of numbers of the form F(i)*F(j) between F(n+3) and F(n+4), where 2 < i < j and F = A000045 (Fibonacci numbers).  Clark Kimberling, May 02 2016
a(n) is also the total domination number of the (n3)gear graph.  Eric W. Weisstein, Apr 07 2018
Consider the numbers 1, 2, ..., n; a(n) is the largest integer t such that these numbers can be arranged in a row so that all consecutive terms differ by at least t. Example: a(6) = a(7) = 3, because of respectively (4, 1, 5, 2, 6, 3) and (1, 5, 2, 6, 3, 7, 4) (see link BMO  Problem 2).  Bernard Schott, Mar 07 2020
a(n1) is also the number of integersided triangles whose sides a < b < c are in arithmetic progression with a middle side b = n (see A307136). Example, for b = 4, there exists a(3) = 1 such triangle corresponding to Pythagorean triple (3, 4, 5). For the triples, miscellaneous properties and references, see A336750.  Bernard Schott, Oct 15 2020
For n >= 1, a(n1) is the greatest remainder on division of n by any k in 1..n.  David James Sycamore, Sep 05 2021
Number of incongruent right triangles that can be formed from the vertices of a regular ngon is given by a(n/2) for n even. For n odd such number is zero. For a regular ngon, the number of incongruent triangles formed from its vertices is given by A069905(n). The number of incongruent acute triangles is given by A005044(n). The number of incongruent obtuse triangles is given by A008642(n4) for n > 3 otherwise 0, with offset 0.  Frank M Jackson, Nov 26 2022
The inverse binomial transform is 0, 0, 1, 2, 4, 8, 16, 32, ... (see A122803).  R. J. Mathar, Feb 25 2023


REFERENCES

G. L. Alexanderson et al., The William Powell Putnam Mathematical Competition  Problems and Solutions: 19651984, M.A.A., 1985; see Problem A1 of 27th Competition.
L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 120, P(n,2).
Graham, Knuth and Patashnik, Concrete Mathematics, AddisonWesley, NY, 1989, page 77 (partitions of n into at most 2 parts).


LINKS

Eric Weisstein's World of Mathematics, Gear Graph.


FORMULA

G.f.: x^2/((1+x)*(x1)^2).
a(n) = floor(n/2).
a(n) = 1 + a(n2).
a(n) = a(n1) + a(n2)  a(n3).
a(2*n) = a(2*n+1) = n.
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
a(n) = (2*n1)/4 + (1)^n/4; a(n+1) = Sum_{k=0..n} k*(1)^(n+k).  Paul Barry, May 20 2003
E.g.f.: ((2*x1)*exp(x) + exp(x))/4.  Paul Barry, Sep 03 2003
G.f.: (1/(1x)) * Sum_{k >= 0} t^2/(1t^4) where t = x^2^k.  Ralf Stephan, Feb 24 2004
For n >= 2, a(n) = floor(log_2(2^a(n1) + 2^a(n2))).  Vladimir Shevelev, Jun 22 2010
Euler transform of length 2 sequence [1, 1].  Michael Somos, Jul 03 2014


EXAMPLE

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 + ...


MAPLE

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


MATHEMATICA

f[n_] := If[OddQ[n], (n  1)/2, n/2]; Array[f, 74, 0] (* Robert G. Wilson v, Apr 20 2012 *)
With[{c=Range[0, 40]}, Riffle[c, c]] (* Harvey P. Dale, Aug 26 2013 *)
CoefficientList[Series[x^2/(1  x  x^2 + x^3), {x, 0, 75}], x] (* Robert G. Wilson v, Feb 05 2015 *)


PROG

(PARI) x='x+O('x^100); concat([0, 0], Vec(x^2/((1+x)*(x1)^2))) \\ Altug Alkan, Mar 21 2016
(Haskell)
a004526 = (`div` 2)
a004526_list = concatMap (\x > [x, x]) [0..]
(Maxima) makelist(floor(n/2), n, 0, 50); /* Martin Ettl, Oct 17 2012 */
(Sage) def a(n) : return( dimension_cusp_forms( Gamma0(2), 2*n+4) ); # Michael Somos, Jul 03 2014
(Sage) def a(n) : return( dimension_modular_forms( Gamma1(n+1), 1) ); # Michael Somos, Jul 03 2014
(Python)
def a(n): return n//2


CROSSREFS

Zero followed by the partial sums of A000035.


KEYWORD

nonn,easy,core,nice


AUTHOR



EXTENSIONS



STATUS

approved



