login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A320042 a(n) = a(floor(n/2)) + (-1)^(n*(n+1)/2) with a(1)=0. 1
0, -1, 1, 0, -2, 0, 2, 1, -1, -3, -1, 1, -1, 1, 3, 2, 0, -2, 0, -2, -4, -2, 0, 2, 0, -2, 0, 2, 0, 2, 4, 3, 1, -1, 1, -1, -3, -1, 1, -1, -3, -5, -3, -1, -3, -1, 1, 3, 1, -1, 1, -1, -3, -1, 1, 3, 1, -1, 1, 3, 1, 3, 5, 4, 2, 0, 2, 0, -2, 0, 2, 0, -2, -4, -2, 0, -2, 0, 2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
For 2^(2*k-1) - 1 < n < 2^(2*k), k>0, there's no n such that a(n)=0.
For 2^(2*k) - 1 < n < 2^(2*k+1), k>0, there are A000984(k+1) n's such that a(n)=0.
LINKS
FORMULA
a(1) = 0, a(n) = a(floor(n/2)) + (-1)^(n*(n+1)/2).
a(n) = 2*A092339(n+1) - A000523(n).
EXAMPLE
a(9) = a(4) + (-1)^45 = -1, a(10) = a(5) + (-1)^55 = -3.
For 7 < n < 16, there's no n such that a(n)=0; for 15 < n < 32, there are 6 n's such that a(n)=0.
MAPLE
a:=proc(n) `if`(n=1, 0, a(floor(n/2))+(-1)^(n*(n+1)/2)) end: seq(a(n), n=1..100); # Muniru A Asiru, Oct 07 2018
MATHEMATICA
a[1] = 0; a[n_] := a[n] = a[Floor[n/2]] + (-1)^(n*(n + 1)/2); Table[a@n, {n, 1, 50}]
PROG
(PARI) a(n) = if (n==1, 0, a(n\2) + (-1)^(n*(n+1)/2)); \\ Michel Marcus, Oct 05 2018
CROSSREFS
Sequence in context: A302172 A249338 A046069 * A055651 A175929 A079627
KEYWORD
sign,look,hear
AUTHOR
Jinyuan Wang, Oct 03 2018
EXTENSIONS
More terms from Michel Marcus, Oct 05 2018
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 17 23:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)