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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A026239 Beginning with the natural numbers, swap the k-th prime and k-th composite. 1
1, 4, 6, 2, 8, 3, 9, 5, 7, 11, 10, 13, 12, 17, 19, 23, 14, 29, 15, 31, 37, 41, 16, 43, 47, 53, 59, 61, 18, 67, 20, 71, 73, 79, 83, 89, 21, 97, 101, 103, 22, 107, 24, 109, 113, 127, 25, 131, 137, 139, 149, 151, 26, 157, 163, 167, 173, 179, 27, 181, 28, 191, 193, 197, 199 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

Self-inverse permutation of natural numbers.

LINKS

Index entries for sequences that are permutations of the natural numbers

FORMULA

a(1) = 1 and a(n) = if n is prime then A002808(A049084(n)) else A000040(A066246(n)) for n>1. - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Dec 13, 2001

MATHEMATICA

Composite[n_Integer] := FixedPoint[n + PrimePi@# + 1 &, n + PrimePi@n + 1]; f[1] = 1; f[n_] := If[ PrimeQ@n, Composite@ PrimePi@n, Prime[n - 1 - PrimePi@n]]; Array[f, 65] [From Robert G. Wilson v (rgwv(AT)rgwv.com), Jun 08 2010]

CROSSREFS

Sequence in context: A088516 A114538 A181096 * A171547 A114579 A021220

Adjacent sequences:  A026236 A026237 A026238 * A026240 A026241 A026242

KEYWORD

nonn

AUTHOR

Clark Kimberling (ck6(AT)evansville.edu)

EXTENSIONS

More terms from Robert G. Wilson v (rgwv(AT)rgwv.com), Jun 08 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 08:13 EST 2012. Contains 205893 sequences.