login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Robert Israel, Table of n, a(n) for n = 1..10000

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

Cf. A007304, A000040.

Subsequence of A016825.

Sequence in context: A160350 A053858 A075819 * A034683 A328328 A302574

Adjacent sequences:  A306214 A306215 A306216 * A306218 A306219 A306220

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 26 20:11 EST 2020. Contains 331288 sequences. (Running on oeis4.)