login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A130722 The twice repeated nonnegative integers at even indices, the non-repeated nonnegative integers at odd indices. 1
0, 0, 0, 1, 1, 2, 1, 3, 2, 4, 2, 5, 3, 6, 3, 7, 4, 8, 4, 9, 5, 10, 5, 11, 6, 12, 6, 13, 7, 14, 7, 15, 8, 16, 8, 17, 9, 18, 9, 19, 10, 20, 10, 21, 11, 22, 11, 23, 12, 24, 12, 25, 13, 26, 13, 27, 14, 28, 14, 29, 15, 30, 15, 31, 16, 32, 16, 33, 17, 34, 17, 35, 18, 36, 18, 37, 19, 38, 19, 39 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,6

LINKS

Table of n, a(n) for n=0..79.

FORMULA

a(2*n) = A004526(n) = floor(n/2). a(2*n+1) = A001477(n) = n.

O.g.f.: (x^2+x+1)*x^3/((x-1)^2*(1+x)^2*(1+x^2)). - R. J. Mathar, Jul 07 2008

a(n) = A005044(n+2) - A005044(n-7). - Johannes W. Meijer, Oct 08 2013

a(n) = Sum_{i=1..floor(n/2)} sign((n-2i) mod 4). - Wesley Ivan Hurt, Apr 10 2018

a(n) = A106466(n-3) for n>=3. - Georg Fischer, Oct 07 2018

MAPLE

a := n -> A005044(n+2) - A005044(n-7): A005044 := n -> floor((1/48)*(n^2 + 3*n + 21 + (-1)^(n-1)*3*n)): seq(a(n), n=0..79); # Johannes W. Meijer, Oct 08 2013

MATHEMATICA

Table[Sum[Sign[Mod[n - 2 i, 4]], {i, Floor[n/2]}], {n, 0, 100}] (* Wesley Ivan Hurt, Apr 10 2018 *)

PROG

(PARI) a(n) = if(n%2, n\2, n\4); \\ Altug Alkan, Apr 16 2018

CROSSREFS

Cf. A001477, A004526, A005044.

Sequence in context: A289440 A290636 A106466 * A308307 A147541 A308308

Adjacent sequences:  A130719 A130720 A130721 * A130723 A130724 A130725

KEYWORD

nonn,easy

AUTHOR

Paul Curtz, Aug 16 2007

EXTENSIONS

Edited by R. J. Mathar, Jul 07 2008

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 6 17:06 EDT 2020. Contains 336255 sequences. (Running on oeis4.)