The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A111489 Primes of the form prime(k) + composite(k) for some k. 2

%I #25 Sep 01 2016 23:27:54

%S 13,31,47,67,79,89,97,103,113,149,173,179,211,223,241,277,313,349,359,

%T 379,449,457,487,503,509,631,743,769,797,809,887,937,967,1009,1049,

%U 1109,1123,1213,1231,1277,1289,1319,1409,1429,1453,1471,1489,1543,1571,1663

%N Primes of the form prime(k) + composite(k) for some k.

%C Conjecture: This sequence is infinite.

%H Robert Israel, <a href="/A111489/b111489.txt">Table of n, a(n) for n = 1..10000</a>

%e The third prime is 5, the third composite is 8, 8+5=13, the first entry.

%p Primes, Composites:= selectremove(isprime, [$2..10^4]):

%p select(isprime, Primes + Composites[1..nops(Primes)]); # _Robert Israel_, Jul 08 2016

%t nn = 222; Select[Total /@ Transpose@{#, Take[Complement[Range@ Prime@ nn, {1}~Join~#], nn]} &@ Prime@ Range@ nn, PrimeQ] (* _Michael De Vlieger_, Jul 08 2016 *)

%o (PARI) composite(n)= local(c, x); c=1; x=1; while(c <= n, x++; if(!isprime(x), c++); ); return(x);

%o g(n)=for(x=1,n,y=prime(x)+composite(x);if(isprime(y),print1(y",")))

%o (PARI) list(lim)=my(v=List(),p=5,c=8,t); while((t=p+c) <= lim, if(isprime(t), listput(v,t)); p=nextprime(p+1); if(isprime(c++), c++)); Vec(v) \\ _Charles R Greathouse IV_, Sep 01 2016

%Y Cf. A000040, A002808, A097452, A142348.

%K easy,nonn

%O 1,1

%A _Cino Hilliard_, Nov 15 2005

%E Name corrected by _Adam Kubias_, Jul 08 2016

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 May 13 07:22 EDT 2024. Contains 372498 sequences. (Running on oeis4.)