Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A025480
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A025480 a(2n) = n, a(2n+1) = a(n). +0
26
0, 0, 1, 0, 2, 1, 3, 0, 4, 2, 5, 1, 6, 3, 7, 0, 8, 4, 9, 2, 10, 5, 11, 1, 12, 6, 13, 3, 14, 7, 15, 0, 16, 8, 17, 4, 18, 9, 19, 2, 20, 10, 21, 5, 22, 11, 23, 1, 24, 12, 25, 6, 26, 13, 27, 3, 28, 14, 29, 7, 30, 15, 31, 0, 32, 16, 33, 8, 34, 17, 35, 4, 36, 18, 37, 9, 38, 19, 39, 2, 40, 20, 41, 10 (list; graph; listen)
OFFSET

0,5

COMMENT

These are the nim-values for heaps of n beans in the game where you're allowed to take up to half of the beans in a heap. - R. K. Guy, Mar 30 2006

When n>0 is written as (2k+1)*2^j then k=A000265(n-1) and j=A007814(n), so: when n is written as (2k+1)*2^j-1 then k=A025480(n) and j=A007814(n+1), when n>1 is written as (2k+1)*2^j+1 then k=A025480(n-2) and j=A007814(n-1)

According to the comment from Deuard Worthen, this may be regarded as a triangle where row r=1,2,3... has length 2^(r-1) and values T[r,2k-1]=T[r-1,k], T[r,2k]=2^(r-1)+k-1, i.e. previous row gives 1st, 3rd, 5th... term and 2nd, 4th... terms are numbers 2^(r-1),...,2^r-1 (i.e. those following the last one from the previous row). - M. F. Hasler (www.univ-ag.fr/~mhasler), May 03 2008

Let StB be a Stern-Brocot tree hanging between (pseudo)fractions Left and Right, then StB(1) = mediant(Left,Right) and for n>1: StB(n) = if a(n-1)<>0 and a(n)<>0 then mediant(StB(a(n-1)),StB(a(n))) else if a(n)=0 then mediant(StB(a(n-1)),Right) else mediant(Left,StB(a(n-1))), where mediant(q1,q2) = ((numerator(q1)+numerator(q2)) / (denominator(q1)+denominator(q2))). [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Dec 22 2008]

a(n) = A153733(n)/2. [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Dec 31 2008]

REFERENCES

L. Levine, Fractal sequences and restricted Nim, Ars Comb., Ars Combin. 80 (2006), 113-127.

LINKS

N. J. A. Sloane, Table of n, a(n) for n = 0..10000

L. Levine, Fractal sequences and restricted Nim

R. Stephan, Some divide-and-conquer sequences ...

R. Stephan, Table of generating functions

FORMULA

a(n) = (A000265(n+1)-1)/2 = ((n+1)/A006519(n+1)-1)/2

EXAMPLE

Comment from Deuard Worthen (deuard(AT)raytheon.com), Jan 27 2006: This sequence can be constructed as a triangle, thus:

0

0 1

0 2 1 3

0 4 2 5 1 6 3 7

0 8 4 9 2 10 5 11 1 12 6 13 3 14 7 15

...

-at each stage we interpolate the next 2^m numbers in the previous row.

Left=0/1, Right=1/0: StB=A007305/A047679; Left=0/1, Right=1/1: StB=A007305/A007306; Left=1/3, Right=2/3: StB=A153161/A153162. [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Dec 22 2008]

MAPLE

a:=array[0..10001]; M:=5000; for n from 0 to M do a[2*n]:=n; a[2*n+1]:=a[n]; od: for n from 0 to 2*M do lprint(n, a[n]); od:

MATHEMATICA

a[n_] := a[n] = If[OddQ@n, a[(n - 1)/2], n/2]; Table[ a[n], {n, 0, 83}] (from Robert G. Wilson v (rgwv(at)rgwv.com), Mar 30 2006)

PROGRAM

(PARI) A025480(n)={while(n%2, n\=2); n\2} - M. F. Hasler (www.univ-ag.fr/~mhasler), May 03 2008

CROSSREFS

The Y-projection of A075300.

a(n) = A003602(n)-1.

Cf. A108202.

Cf. A138002.

Sequence in context: A081171 A062778 A108202 this_sequence A088002 A030109 A058208

Adjacent sequences: A025477 A025478 A025479 this_sequence A025481 A025482 A025483

KEYWORD

easy,nonn,nice,tabf

AUTHOR

David W. Wilson (davidwwilson(AT)comcast.net)

EXTENSIONS

Additional comments from Henry Bottomley (se16(AT)btinternet.com), Mar 02 2000

page 1

Search completed in 0.003 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 21 21:21 EST 2009. Contains 167310 sequences.


AT&T Labs Research