Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A135044
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A135044 a(1)=1, then a(p_n)=c_a(n), a(c_n)=p_a(n), where p_n - n-th prime, c_n - n-th composite. +0
2
1, 4, 9, 2, 16, 7, 6, 13, 3, 19, 26, 17, 8, 23, 41, 5, 12, 67, 10, 29, 59, 37, 14, 83, 179, 11, 43, 331, 20, 47, 39, 109, 277, 157, 53, 431, 22, 1063, 31, 191, 15, 2221, 27, 61, 211, 71, 30, 599, 1787, 919, 241, 3001, 35, 73, 8527, 127, 1153, 79, 21, 19577, 44, 89, 283 (list; graph; listen)
OFFSET

1,2

COMMENT

Exchanges primes with composites, primeth primes with composith composites, etc.

Exchange the k-th prime of order j with the k-th composite of order j and vice versa.

Self-inverse permutation of positive integers.

LINKS

N. Fernandez, An order of primeness, F(p).

EXAMPLE

a(6)=p_a(2)=p_c_a(1)=p_4=7

MATHEMATICA

Composite[n_Integer] := Block[{k = n + PrimePi@n + 1}, While[k != n + PrimePi@k + 1, k++ ]; k]; Compositeness[n_] := Block[{c = 1, k = n}, While[ !(PrimeQ@k || k == 1), k = k - 1 - PrimePi@k; c++ ]; c]; Primeness[n_] := Block[{c = 1, k = n}, While[ PrimeQ@k, k = PrimePi@k; c++ ]; c];

ckj[k_, j_] := Select[ Table[Composite@n, {n, 10000}], Compositeness@# == j &][[k]]; pkj[k_, j_] := Select[ Table[Prime@n, {n, 3000}], Primeness@# == j &][[k]]; f[0]=0; f[1] = 1;

f[n_] := If[ PrimeQ@ n, pn = Primeness@n; ckj[ Position[ Select[ Table[ Prime@ i, {i, 150}], Primeness@ # == pn &], n][[1, 1]], pn], cn = Compositeness@n; pkj[ Position[ Select[ Table[ Composite@ i, {i, 500}], Compositeness@ # == cn &], n][[1, 1]], cn]]; Array[f, 64] (* Robert G. Wilson v *)

CROSSREFS

Cf. A000040, A007097, A049076, A049078, A049079, A049080, A049081, A058322, A058324.

Cf. A058325, A058326, A058327, A058328, A093046, A002808, A006508, A059981, A078442.

Adjacent sequences: A135041 A135042 A135043 this_sequence A135045 A135046 A135047

Sequence in context: A128204 A079049 A114578 this_sequence A064505 A048798 A007914

KEYWORD

nonn

AUTHOR

Katarzyna Matylla (erina(AT)poczta.onet.pl), Feb 11 2008

EXTENSIONS

Edited, corrected and extended by Robert G. Wilson v (rgwv(AT)rgwv.com), Feb 18 2008

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 January 8 02:43 EST 2009. Contains 152824 sequences.


AT&T Labs Research