Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A097457
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A097457 If n is prime replace with the n-th composite otherwise replace with the n-th prime. +0
1
2, 4, 6, 7, 9, 13, 12, 19, 23, 29, 18, 37, 21, 43, 47, 53, 26, 61, 28, 71, 73, 79, 34, 89, 97, 101, 103, 107, 42, 113, 45, 131, 137, 139, 149, 151, 52, 163, 167, 173, 57, 181, 60, 193, 197, 199, 65, 223, 227, 229, 233, 239, 74, 251, 257, 263, 269, 271, 81, 281, 84, 293 (list; graph; listen)
OFFSET

2,1

EXAMPLE

4 is composite so replace it with prime(4) = 7 the 4-th entry in the table.

PROGRAM

(PARI) flipcomppr(n) = { for(x=1, n, if(isprime(x), y=composite(x), y=prime(x)); print1(y", ") ) } \ the n-th composite composite(n) = { local(c, x); c=1; x=0; while(c <= n, x++; if(!isprime(x), c++); ); return(x) }

CROSSREFS

Adjacent sequences: A097454 A097455 A097456 this_sequence A097458 A097459 A097460

Sequence in context: A076521 A139529 A141437 this_sequence A050095 A102528 A002158

KEYWORD

nonn

AUTHOR

Cino Hilliard (hillcino368(AT)gmail.com), Aug 23 2004

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 October 13 09:05 EDT 2008. Contains 145008 sequences.


AT&T Labs Research