Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A108696
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A108696 Generated by a sieve: see comments. +0
3
1, 2, 3, 5, 7, 11, 13, 19, 23, 31, 35, 43, 49, 59, 61, 79, 83, 103, 109, 119, 133, 151, 155, 175, 193, 211, 215, 241, 259, 275, 283, 323, 331, 361, 373, 403, 419, 443, 455, 499, 511, 541, 571, 613, 623, 649, 673, 719, 733, 781, 803, 841, 871, 919 (list; graph; listen)
OFFSET

1,2

COMMENT

Start with the natural numbers:

1 2 3 4 5 6 7 8 9 10 11 ...

Accept the 2nd number, 2 and erase every 2nd number after it, giving:

1 2 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 ...

Accept the 3rd number, 3 and erase every 3rd number after it, giving:

1 2 3 5 7 11 13 17 19 23 25 29 31 35 ...

Accept the 4th number, 5 and erase every 4th number after it, giving:

1 2 3 5 7 11 13 19 23 25 31 35 ...

Repeat!

PROGRAM

(tcl) source /tclutils/utils.tcl

set l [range 0 10000]; set z z

for {set i 2} {$i*2 <= [llength $l]} {incr i} {

set k [expr {[llength $l]-1}]

set k [expr {$k - ($k % $i)}]

while {$k > $i} {

set l [lreplace $l $k $k]

incr k -$i

}

puts "after $i: length [llength $l], prefix [join [lrange $l 0 10] { }]"

}

CROSSREFS

Equals A007952 + 2 or equally A002491(n) + 1.

Sequence in context: A096246 A106639 A078334 this_sequence A092581 A130807 A030145

Adjacent sequences: A108693 A108694 A108695 this_sequence A108697 A108698 A108699

KEYWORD

nonn

AUTHOR

David Applegate (david(AT)research.att.com), Oct 11 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 24 19:42 EST 2009. Contains 167435 sequences.


AT&T Labs Research