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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A255769 Primes p such that there are a prime number of composite numbers less than p. 1
 7, 11, 23, 31, 47, 59, 67, 83, 97, 109, 137, 149, 167, 179, 197, 211, 233, 269, 331, 347, 353, 367, 389, 419, 431, 439, 587, 617, 739, 751, 829, 859, 907, 919, 977, 991, 1009, 1031, 1039, 1063, 1117, 1171, 1187, 1237, 1319, 1327, 1427, 1447, 1471, 1499, 1553, 1567, 1723, 1901, 1913, 1933, 2207, 2221, 2269, 2293, 2333 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Alois P. Heinz, Table of n, a(n) for n = 1..10000 EXAMPLE There are two composite numbers less than 7, namely, 4 and 6, and 2 is prime. Therefore 7 is a member of the sequence. MAPLE c:= proc(n) option remember; `if`(n<4, 0,       c(n-1)+`if`(isprime(n-1), 0, 1))     end: a:= proc(n) option remember; local p;       p:= `if`(n=1, 1, a(n-1));       do p:= nextprime(p);          if isprime(c(p)) then break fi       od; p     end: seq(a(n), n=1..100);  # Alois P. Heinz, Jul 23 2015 MATHEMATICA fQ[n_]:=PrimeQ[n-PrimePi[n]-1]; Select[Prime[Range@400], fQ[#]&] (* Ivan N. Ianakiev, Jul 12 2015 *) PROG (PARI) is_ok(n)=my(i, k=0); for(i=2, n-1, if(bigomega(i)>1, k++)); isprime(k)&&isprime(n); first(m)=my(i=1, v=vector(m), k=0); while(i<=m, if(is_ok(k), v[i]=k; i++); k++); v; \\ Anders HellstrÃ¶m, Jul 29 2015 (PARI) listp(nn)=forprime(p=2, nn, if (isprime(p - primepi(p) - 1), print1(p, ", ")); ); \\ Michel Marcus, Aug 27 2016 (PARI) list(lim)=my(v=List(), n=1); forprime(p=2, lim, if(isprime(p - n++), listput(v, p))); Vec(v) \\ Charles R Greathouse IV, Aug 28 2016 CROSSREFS Cf. A072677. Sequence in context: A271043 A089056 A210981 * A175625 A082496 A239733 Adjacent sequences:  A255766 A255767 A255768 * A255770 A255771 A255772 KEYWORD nonn AUTHOR Antonio Gimenez, Jul 11 2015 EXTENSIONS a(16)-a(61) from Ivan N. Ianakiev, Jul 12 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.

Last modified February 19 00:35 EST 2020. Contains 332028 sequences. (Running on oeis4.)