login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A306217 Sphenic numbers with a prime nearest neighbor. 1
30, 42, 66, 70, 78, 102, 110, 114, 130, 138, 174, 182, 190, 222, 230, 238, 258, 282, 310, 318, 354, 366, 374, 402, 410, 418, 430, 434, 438, 442, 498, 598, 602, 606, 618, 642, 646, 654, 658, 678, 682, 710, 742, 762, 786, 822, 826, 830, 854, 906, 938, 942, 946, 970, 978 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Terms are of the form 4k + 2.
LINKS
EXAMPLE
30 is a term because (2*3*5) - 1 = 29 and (2*3*5) + 1 = 31.
42 is a term because (2*3*7) - 1 = 41 and (2*3*7) + 1 = 43.
66 is a term because (2*3*11) + 1 = 67.
70 is a term because (2*5*7) + 1 = 71.
MAPLE
Res:= NULL: count:= 0: last:= 0: p:= 3;
while count < 100 do
p:= nextprime(p);
if p mod 4 = 3 then
if p-1 <> last then
F:= ifactors(p-1)[2];
if nops(F) = 3 and {F[1, 2], F[2, 2], F[3, 2]}={1} then
Res:= Res, p-1;
count:= count+1;
fi fi
else
F:= ifactors(p+1)[2];
last:= p+1;
if nops(F) = 3 and {F[1, 2], F[2, 2], F[3, 2]}={1} then
Res:= Res, p+1;
count:= count+1;
fi
fi
od:
Res; # Robert Israel, Feb 17 2019
MATHEMATICA
Select[Range[2, 10^3, 4], And[AnyTrue[# + {-1, 1}, PrimeQ], SquareFreeQ@ #, PrimeNu@ # == 3] &] (* Michael De Vlieger, Jan 29 2019 *)
PROG
(PARI) lista(nn) = for(n=1, nn, if(bigomega(n)==3 && omega(n)==3 && (isprime(n-1) || isprime(n+1)), print1(n", "))); \\ Michel Marcus, Jan 30 2019
CROSSREFS
Subsequence of A016825.
Sequence in context: A160350 A053858 A075819 * A034683 A328328 A302574
KEYWORD
nonn
AUTHOR
Torlach Rush, Jan 29 2019
EXTENSIONS
Corrected and extended by Michel Marcus, Jan 30 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 19 06:45 EDT 2024. Contains 375284 sequences. (Running on oeis4.)