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

 

Logo

The submissions stack has been unacceptably high for several months now. Please voluntarily restrict your submissions and please help with the editing. (We don't want to have to impose further limits.)

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004718 The Danish composer Per Nørgård's "infinity sequence", invented in an attempt to unify in a perfect way repetition and variation: a(2n) = -a(n), a(2n+1) = a(n) + 1, a(0)=0. 9
0, 1, -1, 2, 1, 0, -2, 3, -1, 2, 0, 1, 2, -1, -3, 4, 1, 0, -2, 3, 0, 1, -1, 2, -2, 3, 1, 0, 3, -2, -4, 5, -1, 2, 0, 1, 2, -1, -3, 4, 0, 1, -1, 2, 1, 0, -2, 3, 2, -1, -3, 4, -1, 2, 0, 1, -3, 4, 2, -1, 4, -3, -5, 6, 1, 0, -2, 3, 0, 1, -1, 2, -2, 3, 1, 0, 3, -2, -4, 5, 0, 1, -1, 2, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

Minima are at n=2^i-2, maxima at 2^i-1, zeros at A083866.

a(n) has parity of Thue-Morse sequence on {0,1} (A010060).

a(n) = A000120(n) for all n in A060142.

The composer Per Nørgård's name is also written in the OEIS as Per Noergaard.

REFERENCES

J.-P. Allouche and J. Shallit, The ring of k-regular sequences, II, Theoret. Computer Sci., 307 (2003), 3-29.

LINKS

N. J. A. Sloane, First 10000 terms

J.-P. Allouche, J. Shallit, The Ring of k-regular Sequences, II

Christopher Drexler-Lemire, Jeffrey Shallit, Notes and Note-Pairs in Noergaard's Infinity Series, arXiv:1402.3091 [math.CO]

Per Nørgård [Noergaard], Home Page

Per Nørgård [Noergaard], "Voyage into the golden screen", 2nd movement

Per Nørgård [Noergaard], "Voyage into the golden screen" (MP3 Recording)

Per Nørgård [Noergaard], First 128 notes of the infinity series (MP3 Recording)

R. Stephan, Divide-and-conquer generating functions. I. Elementary sequences

Robert Walker, Self Similar Sloth Canon Number Sequences

Wikipedia, Unendlichkeitsreihe

FORMULA

Write n in binary and read from left to write, starting with 0 and interpreting 1 as "add 1" and 0 as "change sign". For example 19 = binary 10011, giving 0 -> 1 -> -1 -> 1 -> 2 -> 3, so a(19) = 3.

G.f.: sum{k>=0, x^(2^k)/[1-x^(2*2^k)] * prod{l=0, k-1, x^(2^l)-1}}.

The g.f. satisfies F(x^2)*(1-x) = F(x)-x/(1-x^2).

a(n) = (2 * (n mod 2) - 1) * a(floor(n/2)) + n mod 2. - Reinhard Zumkeller, Mar 20 2015

MAPLE

f:=proc(n) option remember; if n=0 then RETURN(0); fi; if n mod 2 = 0 then RETURN(-f(n/2)); else RETURN(f((n-1)/2)+1); fi; end;

MATHEMATICA

a[n_?EvenQ] := a[n]= -a[n/2]; a[0]=0; a[n_] := a[n]= a[(n-1)/2]+1; Table[a[n], {n, 0, 85}](* Jean-François Alcover, Nov 18 2011 *)

PROG

(PARI) a=vector(100); a[1]=1; a[2]=-1; for(n=3, #a, a[n]=if(n%2, a[n\2]+1, -a[n\2])); a \\ Charles R Greathouse IV, Nov 18 2011

(Haskell)

import Data.List (transpose)

a004718 n = a004718_list !! n

a004718_list = 0 : concat

   (transpose [map (+ 1) a004718_list, map negate $ tail a004718_list])

-- Reinhard Zumkeller, Mar 19 2015, Nov 10 2012

CROSSREFS

Cf. A083866, A256187 (first differences); variants: A256184, A256185, A255723.

Sequence in context: A145579 A167655 A157218 * A157225 A055347 A055288

Adjacent sequences:  A004715 A004716 A004717 * A004719 A004720 A004721

KEYWORD

sign,nice,easy,hear

AUTHOR

Jorn B. Olsson (olsson(AT)math.ku.dk)

EXTENSIONS

Edited by Ralf Stephan, Mar 07 2003

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 August 28 05:09 EDT 2015. Contains 261118 sequences.