Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A118319
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A118319 a(n) = (highest power of 2 dividing n)th integer among those positive integers not occurring in {a(1),a(2),a(3),..a(n-1)}. +0
2
1, 3, 2, 7, 4, 6, 5, 15, 8, 10, 9, 14, 11, 13, 12, 31, 16, 18, 17, 22, 19, 21, 20, 30, 23, 25, 24, 29, 26, 28, 27, 63, 32, 34, 33, 38, 35, 37, 36, 46, 39, 41, 40, 45, 42, 44, 43, 62, 47, 49, 48, 53, 50, 52, 51, 61, 54, 56, 55, 60, 57, 59, 58, 127, 64, 66, 65, 70, 67, 69, 68, 78 (list; graph; listen)
OFFSET

1,2

COMMENT

Sequence is a permutation of the positive integers. a(2n-1) is the smallest positive integer not occurring earlier in the sequence.

EXAMPLE

4 is the highest power of 2 dividing 12. Those positive integers not occurring among the first 11 terms of the sequence form the sequence 11, 12, 13, 14, 16,... Now 14 is the 4th of these integers, so a(12) = 14.

MAPLE

A007814 := proc(n) local a, nshf ; a := 0 ; nshf := n ; while nshf mod 2 = 0 do nshf := nshf/2 ; a := a+1 ; od; RETURN(a) ; end: A118319 := proc(nmin) local a, anxt, i, n ; a := [1] ; while nops(a) < nmin do n := nops(a)+1 ; i := 2^A007814(n); anxt := 0 ; while i > 0 do anxt := anxt+1 ; while anxt in a do anxt := anxt+1 ; od ; i := i-1; od ; a := [op(a), anxt] ; od; a ; end: A118319(80) ; - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Sep 06 2007

CROSSREFS

Cf. A118320, A006519.

Sequence in context: A135542 A130109 A108644 this_sequence A085168 A113658 A059029

Adjacent sequences: A118316 A118317 A118318 this_sequence A118320 A118321 A118322

KEYWORD

easy,nonn

AUTHOR

Leroy Quet (qq-quet(AT)mindspring.com), Apr 23 2006

EXTENSIONS

More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Sep 06 2007

page 1

Search completed in 0.002 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 18 20:14 EST 2008. Contains 147244 sequences.


AT&T Labs Research