[go: up one dir, main page]

login
A159272
Smallest integer m, in absolute value, such that |m(n+m)| has as prime factors exactly all primes <= sqrt(n); take m > 0 if m and -m both are solutions; a(n) = 0 if no such m exists.
1
0, 0, 0, 0, -2, -1, 2, 1, -4, 3, 2, 1, 6, -1, -2, 3, 2, 1, 6, -1, -2, 3, 2, 1, -6, 5, 4, 3, 2, 1, 30, -1, -2, -3, -4, -5, -6, 3, -8, 6, -10, 4, -12, 2, 6, 15, -6, -2, 12, 21, 70, -21, -10, 7, 30, 15, 70, -15, 12, -14, 150, 9, -20, 42, 6, -30, 60, 3, 30, 15, 140, -15, -30, -3, 10
OFFSET
0,5
COMMENTS
As of today, the first unknown value is a(397).
For all n = 4, ..., 396, we know a way to write n = a +/- b where the prime factors of a*b are exactly all primes <= sqrt(n). This sequence lists min(a,b), with a minus sign if n = a + b (to have a(n) > 0 for most n).
If n is a prime, this value constitutes a proof of its primality, since then either a or b, but not both, and thus n, are nonzero (mod p) for each prime < sqrt(n).
Are a(152) = -42 and a(167) = -35 the last two negative values? - M. F. Hasler, Feb 17 2024
LINKS
M. F. Hasler, Table of n, a(n) for n = 0..315, Feb 17 2024
Several users at mersenneforum.org, A well-known puzzle..., February 2009.
EXAMPLE
For n < 4, a(n) = 0 by convention, or with the justification that there are no primes <= sqrt(n), and 0*(n+0) = 0 also has no prime factors (by convention).
For all larger n, |m*(n+m)| must have at least the prime factor 2, so m = 0 can't be a solution as above for n < 4, nor can it be m = -n.
For n = 4, a(4) = -2 because 2*(4-2) = 2*2 has only 2 as prime factor, and this is also the only prime <= sqrt(n) = 2. One easily checks that m = +-1 and m = 2 is not a solution.
For n = 5, a(5) = -1 because 1*(5-1) = 4 = 2*2 has only 2 as prime factor, which is also the only prime up to sqrt(5) ~ 2.236.
a(30) = 30 because 30*(30+30) = 1800 = 2^3 * 3^2 * 5^2 has exactly all primes < sqrt(30) ~ 5.5 as prime factors, and one can check that no smaller m yields a solution.
PROG
(PARI) A159272(n, oo=oo, start=1)={n>3 || return(0); my(p=primes([1, sqrtint(n)])~, P=p[#p]); for(m=start, oo, m>1 && vecmax(factor(m)[, 1]) > P && next; factor(m*(m+n))[, 1]==p && return(m); factor(m*abs(m-n))[, 1]==p && return(-m))} \\ Edited to simplify, speed up & fix a bug. - M. F. Hasler, Feb 17 2024
CROSSREFS
Sequence in context: A052126 A094521 A321757 * A098372 A177236 A341827
KEYWORD
sign
AUTHOR
M. F. Hasler, Apr 09 2009
EXTENSIONS
a(30) corrected (thanks to a remark from Don Reble) and a(n) changed to 0 for n < 4 by M. F. Hasler, Feb 17 2024
STATUS
approved