|
Search: id:A047160
|
|
|
| A047160 |
|
a(2) = a(3) = 0; for n >= 4, a(n) = smallest number m such that n-m and n+m are both primes, or -1 if no such m exists. |
|
+0 3
|
|
| 0, 0, 1, 0, 1, 0, 3, 2, 3, 0, 1, 0, 3, 2, 3, 0, 1, 0, 3, 2, 9, 0, 5, 6, 3, 4, 9, 0, 1, 0, 9, 4, 3, 6, 5, 0, 9, 2, 3, 0, 1, 0, 3, 2, 15, 0, 5, 12, 3, 8, 9, 0, 7, 12, 3, 4, 15, 0, 1, 0, 9, 4, 3, 6, 5, 0, 15, 2, 3, 0, 1, 0, 15, 4, 3, 6, 5, 0, 9, 2, 15, 0, 5, 12, 3, 14, 9, 0, 7, 12, 9, 4, 15, 6, 7, 0, 9, 2, 3
(list; graph; listen)
|
|
|
OFFSET
|
2,7
|
|
|
COMMENT
|
The even terms of this sequence are of interest for the Goldbach conjecture. - T. D. Noe (noe(AT)sspectra.com), Aug 01 2002
I have confirmed there are no -1 entries through integers to 4.29*10^9 using Pari. - Bill McEachen (bmceache(AT)centralsan.dst.ca.us), Jul 07 2008
|
|
LINKS
|
T. D. Noe, Table of n, a(n) for n=2..10000
|
|
EXAMPLE
|
16-3=13 and 16+3=19 are primes, so a(16)=3.
|
|
MATHEMATICA
|
For[lst={}; n=2, n<=100, n++, If[EvenQ[n]&&n>2, del=1, del=0]; While[del<n&&!(PrimeQ[n-del]&& PrimeQ[n+del]), del=del+2]; If[del==n, del=-1]; AppendTo[lst, del]]; lst
|
|
PROGRAM
|
(UBASIC) 10 N=2// 20 M=0// 30 if and{prmdiv(N-M)=N-M, prmdiv(N+M)=N+M} then print M; :goto 50// 40 inc M:goto 30// 50 inc N: if N>130 then stop// 60 goto 20
|
|
CROSSREFS
|
Cf. A002372, A035026.
Sequence in context: A053370 A016458 A058513 this_sequence A093347 A134676 A103491
Adjacent sequences: A047157 A047158 A047159 this_sequence A047161 A047162 A047163
|
|
KEYWORD
|
nonn,easy,nice
|
|
AUTHOR
|
Lior Manor (lior.manor(AT)gmail.com)
|
|
EXTENSIONS
|
More terms from Patrick De Geest (pdg(AT)worldofnumbers.com), May 15 1999.
|
|
|
Search completed in 0.002 seconds
|