cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A100718 Composite numbers C(p) such that p and C(p)-p are primes.

This page as a plain text file.
%I A100718 #14 Nov 24 2024 03:38:26
%S A100718 8,10,14,30,54,58,62,66,82,108,114,120,178,182,204,210,318,324,330,
%T A100718 352,366,430,506,544,560,586,596,616,704,738,792,858,870,914,918,960,
%U A100718 988,990,1026,1030,1062,1164,1170,1194,1404,1442,1446,1462,1464,1470,1498
%N A100718 Composite numbers C(p) such that p and C(p)-p are primes.
%C A100718 Nextprime(C(n)) = P(C(n) - n) = (C(n) - n)-th prime.
%C A100718 A proof that the sequence is infinite would be nice.
%H A100718 Robert Israel, <a href="/A100718/b100718.txt">Table of n, a(n) for n = 1..10000</a>
%F A100718 C(n)=n+k where k is such that nextprime(C(n))=k-th prime.
%e A100718 a(4)=30 because C(19)=30=19+11, 19 and 11 are prime and P(11)=31=nextprime(30).
%p A100718 R:= NULL: count:= 0: m:= 0:
%p A100718 for c from 2 while count < 100 do
%p A100718   if isprime(c) then next fi;
%p A100718   m:= m+1;
%p A100718   if isprime(m) and isprime(c-m) then
%p A100718     count:= count+1; R:= R,c
%p A100718   fi
%p A100718 od:
%p A100718 R; # _Robert Israel_, Nov 23 2024
%t A100718 Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n]; Composite /@ Select[ Prime[ Range[ 205]], PrimeQ[ Composite[ # ] - # ] &] (* _Robert G. Wilson v_, Dec 11 2004 *)
%t A100718 Reap[For[n = 4; p = 1, n <= 1500, n++, If[! PrimeQ[n], If[PrimeQ[p] && PrimeQ[n-p], Sow[n]]; p++]]] [[2, 1]]  (* _Jean-François Alcover_, Jul 18 2013 *)
%K A100718 nonn
%O A100718 1,1
%A A100718 _Robin Garcia_, Dec 11 2004
%E A100718 Edited and extended by _Robert G. Wilson v_, Dec 11 2004