login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A115316 Lexicographically earliest permutation of the natural numbers such that each prime number is followed by exactly two composite numbers. 5
1, 2, 4, 6, 3, 8, 9, 5, 10, 12, 7, 14, 15, 11, 16, 18, 13, 20, 21, 17, 22, 24, 19, 25, 26, 23, 27, 28, 29, 30, 32, 31, 33, 34, 37, 35, 36, 41, 38, 39, 43, 40, 42, 47, 44, 45, 53, 46, 48, 59, 49, 50, 61, 51, 52, 67, 54, 55, 71, 56, 57, 73, 58, 60, 79, 62, 63, 83, 64, 65, 89, 66 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Inverse: A115318.
Fixed points = {1,2,27,28,29,30,33,34}, also for A115317, A115318, A115319.
LINKS
FORMULA
a(a(n)) = A115317(n).
a(3*n-2) = A018252(2*n-1), a(3*n-1) = A000040(n), a(3*n) = A018252(2*n);
a(n+1+floor((n+1)/2)) = A002808(n).
MATHEMATICA
terms = 72;
np = Ceiling[terms/3] + 1;
nc = Ceiling[(2/3) terms];
pp = Prime[Range[np]];
cc = Partition[Select[Range[FindRoot[n == nc + PrimePi[n] + 1, {n, nc, 2nc}][[1, 2]] // Floor], CompositeQ], 2];
Join[{1}, Riffle[pp, cc] // Flatten][[1 ;; terms]] (* Jean-François Alcover, Nov 15 2021 *)
CROSSREFS
Sequence in context: A236675 A210771 A359535 * A089088 A251622 A073899
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Jan 20 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 14:46 EDT 2024. Contains 374584 sequences. (Running on oeis4.)