login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A256420 a(n) = 2n unless n is prime, in which case a(n) = first term not yet present in the sequence. 2
2, 1, 3, 8, 4, 12, 5, 16, 18, 20, 6, 24, 7, 28, 30, 32, 9, 36, 10, 40, 42, 44, 11, 48, 50, 52, 54, 56, 13, 60, 14, 64, 66, 68, 70, 72, 15, 76, 78, 80, 17, 84, 19, 88, 90, 92, 21, 96, 98, 100, 102, 104, 22, 108, 110, 112, 114, 116, 23, 120 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

This is a permutation of the positive integers: twice nonprimes (A139270), interspersed with (odd numbers and twice primes, A256421).

REFERENCES

John Mason, Email message, Apr 07 2015

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

MAPLE

N:= 100:

S:= {$1..N}:

R:= NULL;

for n from 1 do

  if isprime(n) then if S = {} then break else t:= min(S) fi else t:= 2*n fi;

  R:= R, t;

  S:= S minus {t}

od:

R;

CROSSREFS

Cf. A139270, A256421.

Sequence in context: A260142 A194505 A137307 * A205391 A078045 A202624

Adjacent sequences:  A256417 A256418 A256419 * A256421 A256422 A256423

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, Apr 07 2015

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 19 03:31 EDT 2021. Contains 347550 sequences. (Running on oeis4.)