Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

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

2,2

COMMENT

This is a permutation of the nonnegative integers.

LINKS

Leroy Quet, Home Page (listed in lieu of email address)

MAPLE

A000040 := proc(n) ithprime(n) ; end: A002808 := proc(n) local a; if n = 1 then 4; else for a from A002808(n-1)+1 do if not isprime(a) then RETURN(a) ; fi ; od: fi ; end: A066246 := proc(n) local k ; if isprime(n) then 0 ; else for k from 1 do if A002808(k) = n then RETURN(k) ; fi ; od: fi ; end: A049084 := proc(n) if not isprime(n) then 0; else numtheory[pi](n) ; fi ; end: A139637 := proc(n) local k; if n = 2 then 1; elif n = 4 then 0 ; else if isprime(n) then k := A049084(n) ; A000040(k-1) ; else k := A066246(n) ; A002808(k-1) ; fi ; fi ; end: seq(A139637(n), n=2..160) ; - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), May 12 2008

CROSSREFS

Cf. A139636.

Sequence in context: A087819 A066246 A109921 this_sequence A110990 A035347 A094126

Adjacent sequences: A139634 A139635 A139636 this_sequence A139638 A139639 A139640

KEYWORD

nonn

AUTHOR

Leroy Quet, Apr 28 2008

EXTENSIONS

More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), May 12 2008

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 December 10 12:37 EST 2009. Contains 170569 sequences.


AT&T Labs Research