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!)
A284697 Permutation of natural numbers: a(n) = (A073920(n) + 1) / 2. 0
1, 5, 8, 2, 11, 3, 13, 4, 6, 7, 14, 9, 17, 10, 12, 15, 18, 16, 20, 19, 21, 22, 23, 24, 27, 30, 31, 34, 25, 36, 26, 37, 40, 42, 45, 49, 28, 51, 52, 54, 29, 55, 32, 57, 64, 66, 33, 69, 70, 75, 76, 79, 35, 82, 84, 87, 90, 91, 38, 96, 39, 97, 99, 100, 106, 112, 41, 114, 115, 117 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
PROG
(PARI) nextcomposite(c) = until (!isprime(c), c +=2); c;
listaa(nn) = {print1(1, ", "); vp = [2]; vc = [1]; for (n=2, nn, if (isprime(n), newa = nextcomposite(vecmax(vc)); vc = concat(vc, newa), newa = nextprime(vecmax(vp)+1); vp = concat(vp, newa)); print1((newa+1)/2, ", "); ); }
(PARI) lista(n) = {my(p=3, c=9, l=List([1])); for(i=2, n, if(isprime(i), listput(l, (c+1)/2); until(!isprime(c), c+=2), listput(l, (p+1)/2); p = nextprime(p+1))); l} \\ David A. Corneth, Apr 01 2017, after Michel Marcus
CROSSREFS
Cf. A073920.
Sequence in context: A199379 A198844 A156035 * A361221 A319261 A010489
KEYWORD
nonn
AUTHOR
Michel Marcus, Apr 01 2017
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 April 16 07:57 EDT 2024. Contains 371698 sequences. (Running on oeis4.)