login
Primes p such that p-3 and p+3 are divisible by a cube.
3

%I #21 Mar 27 2021 07:59:59

%S 683,1747,2659,3253,4253,4397,7253,7549,8747,9829,10253,12253,13037,

%T 14747,16253,16747,17747,18253,18637,19891,20747,21269,23747,25253,

%U 25747,27253,28123,29501,30253,31253,34253,34603,34747,35747,37253

%N Primes p such that p-3 and p+3 are divisible by a cube.

%H Amiram Eldar, <a href="/A089201/b089201.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..330 from R. J. Mathar)

%F {p in A000040: p+3 in A046099 and p-3 in A046099}. - _R. J. Mathar_, Dec 08 2015

%e 683-3=2^3*5*17,683+3=2*7^3.

%p isA089201 := proc(n)

%p if isprime(n) then

%p isA046099(n-3) and isA046099(n+3) ;

%p else

%p false;

%p end if;

%p end proc: # _R. J. Mathar_, Dec 08 2015

%t Select[Prime[Range[4000]],Max[Transpose[FactorInteger[#-3]][[2]]]>2 && Max[ Transpose[FactorInteger[#+3]][[2]]]>2&] (* _Harvey P. Dale_, Jan 26 2013 *)

%o (PARI) powerfreep4(n,p,k) = { c=0; pc=0; forprime(x=2,n, pc++; if(!ispowerfree(x-k,p) && !ispowerfree(x+k,p), c++; print1(x","); ) ); print(); print(c","pc","c/pc+.0) }

%o ispowerfree(m,p1) = { flag=1; y=component(factor(m),2); for(i=1,length(y), if(y[i] >= p1,flag=0;break); ); return(flag) }

%Y Cf. A046099.

%K easy,nonn

%O 1,1

%A _Cino Hilliard_, Dec 08 2003