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!)
A174873 Difference d between two distinct primes a and b such that a*b+-d are primes. 3
1, 2, 3, 6, 9, 12, 16, 18, 24, 26, 30, 36, 42, 48, 54, 60, 66, 69, 72, 78, 84, 86, 90, 96, 102, 108, 110, 114, 120, 126, 132, 135, 138, 144, 150, 156, 162, 168, 174, 180, 186, 189, 190, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 280 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
2*3=6;3-2=1;6+-1->primes, 3*5=15;5-3=2;15+-2->primes, 2*5=10;5-2=3;10+-3->primes, 7*11=77;11-7=6;77+-6->primes, 22=2*11;11-2=9;22+-9->primes,..
LINKS
MATHEMATICA
lst={}; Do[pa=Prime[a]; Do[pb=Prime[b]; sp=pa*pb; dp=Abs[pa-pb]; If[PrimeQ[sp-dp]&&PrimeQ[sp+dp], AppendTo[lst, dp]], {b, a+1, 3*6!}], {a, 3*6!}]; Take[Union@lst, 120]
d2dQ[{a_, b_}]:=Module[{c=b-a}, AllTrue[a*b+{c, -c}, PrimeQ]]; With[ {nn= 100}, Take[#[[2]]-#[[1]]&/@Select[Union[Sort/@Tuples[ Prime[ Range[ 3nn]], 2]], d2dQ]//Union, nn]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 11 2017 *)
CROSSREFS
Cf. A088708.
Sequence in context: A302488 A348448 A140495 * A213172 A008810 A280984
KEYWORD
nonn
AUTHOR
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 April 24 15:57 EDT 2024. Contains 371961 sequences. (Running on oeis4.)