OFFSET
1,1
COMMENTS
The selection criterion is that p-1 and p+1 are in the subsequence 8=2^3, 24=2^3*3, 27=3^3, 40=2^3*5, 54=2*3^3,... of cubeful numbers (A046099) which actually display at least one cube in their standard prime factorization (A176297).
So at least one of the e_i in p-1=product p_i^e_i, and at least one of the e_j in p+1=product p_j^e_j must equal 3. This is more restrictive than being cubeful, so the sequence becomes a subsequence of A086708.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
271 is not in the sequence although 271 - 1 = 2*3^3*5 contains a third cube in the prime factorization, because 271 + 1 = 2^4*17 does not.
919 is in the sequence because 919 - 1 = 2*3^3*17 contains a third cube in the prime factorization and so does 919 + 1 = 2^3*5*23.
MAPLE
isA162870 := proc(n)
if isprime(n) then
isA176297(n-1) and isA176297(n+1) ;
else
false;
end if;
end proc:
for n from 1 to 40000 do
if isA162870(n) then
printf("%d, ", n) ;
end if;
end do: # R. J. Mathar, Dec 08 2015
N:= 10^6: # to get all terms < N, where N is even
V:= Vector(N/2):
for i from 1 do
p:= ithprime(i);
if p^3 > N+1 then break fi;
if p = 2 then inds:= 4*[seq(i, i=1..floor(N/8), 2)]
else inds:= p^3*select(t -> t mod p <> 0, [$1..floor(N/2/p^3)])
fi;
V[inds]:= 1;
od:
select(t -> V[(t-1)/2] = 1 and V[(t+1)/2] = 1 and isprime(t), [seq(t, t=3..N, 2)]); # Robert Israel, Dec 08 2015
MATHEMATICA
f[n_]:=Module[{a=m=0}, Do[If[FactorInteger[n][[m, 2]]==3, a=1], {m, Length[FactorInteger[n]]}]; a]; lst={}; Do[p=Prime[n]; If[f[p-1]==1&&f[p+1]==1, AppendTo[lst, p]], {n, 7!}]; lst
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Jul 15 2009
EXTENSIONS
Role of cubefree numbers clarified by R. J. Mathar, Jul 31 2007
STATUS
approved