%I #21 May 02 2022 17:29:00
%S 89689,107441,367957,368021,725209,803749,832583,919511,1070753,
%T 1315151,1333027,1353487,1414913,1843357,2001911,2038039,2201273,
%U 2207783,2269537,2356699,2356763,2670817,2696843,2715071,2717929,2731493,2906887,2971841,3032467,3184177,3252217
%N Primes having cube prime gaps to both neighbor primes.
%C Up to prime 669763117 all gaps are 8 and 64 or 64 and 8. Prime 669763117 is the first one with gaps 8 and 216. Possible gaps must be in A016743.
%H Karl-Heinz Hofmann, <a href="/A353550/b353550.txt">Table of n, a(n) for n = 1..10000</a>
%e a(2) = 107441; previous prime is 107377 and the gap is 64 (a cube); next prime is 107449 and the gap is 8 (a cube too).
%p iscube:= proc(n) option remember; is(n=iroot(n, 3)^3) end:
%p q:= n-> isprime(n) and andmap(iscube, [n-prevprime(n), nextprime(n)-n]):
%p select(q, [$3..3500000])[]; # _Alois P. Heinz_, Apr 25 2022
%t p = Prime[Range[3*10^5]]; pos = Position[Differences[p], _?(IntegerQ@Surd[#, 3] &)] // Flatten; p[[pos[[Position[Differences[pos], 1] // Flatten]] + 1]] (* _Amiram Eldar_, Apr 26 2022 *)
%o (Python) from sympy import sieve as p
%o def A016743(totest): return (totest % 2 == 0 and round(totest**(1/3))**3 == totest)
%o print([p[n] for n in range(2,235000) if A016743(p[n]-p[n-1]) and A016743(p[n+1]-p[n])])
%Y Cf. A000040, A000578, A016743, A353088 (square gaps), A163112 (gaps > 20).
%Y Cf. A353137 (gaps are a power of 2), A353135 (Fibonacci gaps).
%Y Cf. A353136 (triangular numbers gaps).
%K nonn
%O 1,1
%A _Karl-Heinz Hofmann_, Apr 25 2022
|