login
This site is supported by donations to The OEIS Foundation.

 

Logo

Many excellent designs for a new banner were submitted. We will use the best of them in rotation.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004526 Nonnegative integers repeated, floor(n/2). 244
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 ).

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

Lengths of sides of Ulam square spiral; i.e. lengths of runs of equal terms in A063826. - Donald S. McDonald (don.mcdonald(AT)paradise.net.nz), Jan 09 2003

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

a(n+1) is the number of 1's in the binary expansion of the Jacobsthal number A001045(n). - Paul Barry, Jan 13 2005

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

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

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

Let A be the Hessenberg n by 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

Let RT abbreviate rank transform (A187224).  Then

RT(A004526)=A187484;

RT(A004526 without 1st term)=A026371;

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

RT(A004526 without 1st 3 terms)=A026363. - Clark Kimberling, Mar 10 2011

The diameter (longest path) of the n-cycle. - Cade Herron, Apr 14 2011

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

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(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

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. - Wesley Ivan Hurt, Jun 08 2013

a(n) is the number of partitions of 2n-2 into exactly 2 odd parts. a(n+1) is the number of partitions of 2n+2 into exactly two even parts. - Wesley Ivan Hurt, Jun 13 2013

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

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

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

REFERENCES

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 27-th Competition.

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

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

LINKS

David Wasserman, Table of n, a(n) for n = 0..1000

Kival Ngaokrajang, The distinct rectangles and square in a regular n-gon for n = 4..18

John A. Pelesko, Generalizing the Conway-Hofstadter $10,000 Sequence, Journal of Integer Sequences, Vol. 7 (2004), Article 04.3.5.

William A. Stein, Dimensions of the spaces S_k(Gamma_0(N))

William A. Stein, The modular forms database

Eric Weisstein's World of Mathematics, Prime Partition

Index entries for sequences related to linear recurrences with constant coefficients, signature (1,1,-1).

Index entries for "core" sequences

FORMULA

G.f.: x^2/((1+x)*(x-1)^2). a(n) = floor(n/2). a(n) = 1+a(n-2). a(n) = a(n-1)+a(n-2)-a(n-3). a(2n) = a(2n+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) = (2n-1)/4+(-1)^n/4; a(n+1) = sum{k=0..n, k*(-1)^(n+k)}. - Paul Barry, May 20 2003

E.g.f.: ((2x-1)exp(x)+exp(-x))/4. - Paul Barry, Sep 03 2003

G.f.: 1/(1-x) * sum(k >= 0, t^2/(1-t^4), t = x^2^k). - Ralf Stephan, Feb 24 2004

a(n+1) = A000120(A001045(n)). - Paul Barry, Jan 13 2005

a(n+1) = n-a(n). - Jeremy Bem (jeremy1(AT)gmail.com), Feb 22 2007

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

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

a(n+1) = A002378(n) - A035608(n). - Reinhard Zumkeller, Jan 27 2010

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

For n >= 2, a(n) = floor(log_2(2^a(n-1)+2^a(n-2))). - Vladimir Shevelev, Jun 22 2010

a(n) = A180969(2,n). - Adriano Caroli, Nov 24 2010

A001057(n-1) = (-1)^n*a(n), n > 0. - M. F. Hasler, Jul 19 2012

EXAMPLE

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 + 5*x^11 + ...

MAPLE

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

MATHEMATICA

Table[(2n - 1)/4 + (-1)^n/4, {n, 0, 70}] - Stefan Steinerberger, Apr 02 2006

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 *)

PROG

(PARI) a(n)=n\2 [Jaume Oliver Lafont, Mar 25 2009]

(Haskell)

a004526 = (`div` 2)

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

-- Reinhard Zumkeller, Jul 27 2012

(Maxima) makelist(floor(n/2), n, 0, 50); [Martin Ettl, Oct 17 2012]

(SAGE) def a(n) : return( len( CuspForms( Gamma0( 2), 2*n + 4, prec=1). basis())) # Michael Somos, May 29 2013

CROSSREFS

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

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

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

Zero followed by the partial sums of A000035.

Column 2 of triangle A094953. Second row of A180969.

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

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

Sequence in context: A001057 A130472 A076938 * A140106 A123108 A008619

Adjacent sequences:  A004523 A004524 A004525 * A004527 A004528 A004529

KEYWORD

nonn,easy,core,nice

AUTHOR

N. J. A. Sloane

EXTENSIONS

Partially edited by Joerg Arndt, Mar 11 2010, and M. F. Hasler, Jul 19 2012

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified April 17 17:41 EDT 2014. Contains 240650 sequences.