|
|
A168285
|
|
a(n) = ((n-th nonprime)-th prime) - (n-th nonprime).
|
|
1
|
|
|
1, 3, 7, 11, 14, 19, 25, 29, 32, 37, 43, 51, 52, 57, 65, 72, 75, 76, 79, 83, 99, 104, 105, 114, 115, 125, 128, 133, 139, 149, 152, 153, 175, 178, 179, 182, 187, 197, 202, 207, 212, 213, 221, 231, 244, 247, 248, 251, 269, 278, 279, 287, 299, 304, 307, 312, 319
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
The 1st nonprime is 1, the 1st prime is 2, so a(1) = 2 - 1 = 1.
The 2nd nonprime is 4, the 4th prime is 7, so a(2) = 7 - 4 = 3.
|
|
MAPLE
|
A018252 := proc(n) if n = 1 then 1; else for a from procname(n-1)+1 do if not isprime(a) then return a ; fi; od: fi; end proc: A168285 := proc(n) local c; c := A018252(n) ; ithprime(c)-c ; end proc: seq(A168285(n), n=1..100) ; # R. J. Mathar, Nov 30 2009
|
|
MATHEMATICA
|
Prime[#]-#&/@Select[Range[100], !PrimeQ[#]&] (* Harvey P. Dale, Jun 16 2024 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|