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!)
A256187 First differences of Per Nørgård's "infinity sequence" A004718. 2
1, -2, 3, -1, -1, -2, 5, -4, 3, -2, 1, 1, -3, -2, 7, -3, -1, -2, 5, -3, 1, -2, 3, -4, 5, -2, -1, 3, -5, -2, 9, -6, 3, -2, 1, 1, -3, -2, 7, -4, 1, -2, 3, -1, -1, -2, 5, -1, -3, -2, 7, -5, 3, -2, 1, -4, 7, -2, -3, 5, -7, -2, 11, -5, -1, -2, 5, -3, 1, -2, 3, -4 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Per Nørgård's surname is also written as Noergaard;
a(n) = A004718(n+1) - A004718(n);
a(n) != 0, as A004718 is non-repetitive;
for all integers k > 0, there exist infinitely many m such that abs(a(m)) = k, see link.
LINKS
Christopher Drexler-Lemire, Jeffrey Shallit, Notes and Note-Pairs in Noergaard's Infinity Series, arXiv:1402.3091 [math.CO], 2014.
MATHEMATICA
(* b = A004718 *) b[0] = 0; b[n_?EvenQ] := b[n] = -b[n/2]; b[n_] := b[n] = b[(n-1)/2] + 1;
Table[b[n], {n, 0, 72}] // Differences (* Jean-François Alcover, Dec 15 2018 *)
PROG
(Haskell)
a256187 n = a256187_list !! n
a256187_list = zipWith (-) (tail a004718_list) a004718_list
(Python)
from itertools import groupby
def A256187(n):
c, d = 0, 0
for k, g in groupby(bin(n+1)[2:]):
c = c+len(list(g)) if k == '1' else (-c if len(list(g))&1 else c)
for k, g in groupby(bin(n)[2:]):
d = d+len(list(g)) if k == '1' else (-d if len(list(g))&1 else d)
return c-d # Chai Wah Wu, Mar 02 2023
CROSSREFS
Cf. A004718.
Sequence in context: A046226 A054722 A295260 * A308297 A251045 A300521
KEYWORD
sign
AUTHOR
Reinhard Zumkeller, Mar 19 2015
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 19 07:38 EDT 2024. Contains 371782 sequences. (Running on oeis4.)