|
|
A268035
|
|
a(n) is the smallest integer m such that each of the numbers m, 2*m, 3*m, ..., n*m is the sum of two successive primes.
|
|
0
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
If exactly n multiples were requested, then a(2) would be 18. - Michel Marcus, Jan 25 2016
|
|
LINKS
|
|
|
EXAMPLE
|
a(4)=30 because each of the numbers 30, 60, 90, and 120 is the sum of 2 successive prime numbers: 13+17=30, 29+31=60, 43+47=90, and 59+61=120.
|
|
MATHEMATICA
|
Table[m = 1; While[! AllTrue[m Range@ n, Function[m, If[PrimeQ@ #, # + NextPrime@ #, NextPrime@ # + NextPrime[#, -1]] == m &@((m - 1)/2)]], m++]; m, {n, 5}] (* Michael De Vlieger, Jan 27 2016 *)
|
|
PROG
|
(PARI) is(n)=precprime((n-1)/2)+nextprime(n/2)==n&&n>2; \\ from A001043
isok(m, n) = {for (k=1, n, if (! is(m*k), return (0)); ); return(1); }
a(n) = {my(j=1); while (! isok(j, n), j++); j; } \\ Michel Marcus, Jan 25 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|