[go: up one dir, main page]

login
Distance between 2*(n-th prime) and nearest prime.
2

%I #4 Oct 15 2013 22:30:57

%S 1,1,1,1,1,3,3,1,1,1,1,1,1,3,3,1,5,5,3,3,3,1,1,1,1,3,5,3,5,1,3,1,3,1,

%T 5,5,1,5,3,1,1,3,1,3,3,1,1,3,3,1,1,1,3,1,5,3,3,1,3,1,3,1,1,3,5,3,1,1,

%U 3,3,3,1,1,3,1,3,5,3,5,3,1,3,1,3,1,1,9,3,3,3,3,5,3,1,1,3,1,3,3,5,1,3,3,9,9

%N Distance between 2*(n-th prime) and nearest prime.

%e Distance 1 means that either 2p+1 or 2p-1 is also prime.

%p with(numtheory): [seq(min(2*ithprime(k)-prevprime(2*ithprime(k)), nextprime(2*ithprime(k))-2*ithprime(k)),k=1..256)];

%Y A005382-A005385.

%K nonn

%O 0,6

%A _Labos Elemer_, Feb 22 2001