login
a(n) is the smallest positive number coprime to prime(n) such that |a(n)^2-prime(n)^2| is divisible by all primes less than sqrt(prime(n)).
2

%I #15 Jan 12 2016 06:10:26

%S 1,1,1,1,1,1,1,1,1,1,1,7,1,7,7,17,11,19,17,1,17,19,13,19,13,11,23,23,

%T 11,13,83,89,17,29,61,179,283,233,13,1213,1999,391,719,1523,2507,529,

%U 1219,2533,1943,541,1223,421,1319,1681,653,1277,1369,821,563,1721

%N a(n) is the smallest positive number coprime to prime(n) such that |a(n)^2-prime(n)^2| is divisible by all primes less than sqrt(prime(n)).

%C Suppose a = a(n)+prime(n), b = |a(n)-prime(n)|, when a(n) > prime(n), prime(n) = (a - b)/2, and gcd(a,b) = 2 since a(n) and prime(n) are coprime. When a*b = |a(n)^2-prime(n)^2|, (a - b)/2 is a primality proof of prime(n) since the prime factors of a and b contains all prime numbers less than sqrt(prime(n)) and gcd(a,b) = 2. - corrected by _Eric M. Schmidt_, Feb 02 2013

%C When a(n) is prime, a(n)=A210529(n); when a(n) is composite, a(n) does not have any prime factors less than sqrt(prime(n)).

%C If the primes less than sqrt(prime(n)) are p_1, ..., p_r, then k = |prime(n) - p_1*...*p_r| is coprime to prime(n), and k^2 - prime(n)^2 is divisible by all of p_1, ..., p_r. So the sequence is defined for all positive integers n. - _Eric M. Schmidt_, Feb 02 2013

%H Lei Zhou, <a href="/A210708/b210708.txt">Table of n, a(n) for n = 1..219</a>

%H A. Granville, T. Agoh, and P. Erdős, <a href="http://www.jstor.org/stable/2974476">Primes at a (somewhat lengthy) glance</a>, American Mathematical Monthly, 104(10):943-945, December 1997.

%H R. K. Guy, C. B. Lacampagne and J. L. Selfridge, <a href="http://dx.doi.org/10.1090/S0025-5718-1987-0866108-3">Primes at a glance</a>, Math. Comp. 48 (1987), 183-202.

%t Table[p = Prime[n]; t = Product[Prime[k], {k, 1, PrimePi[NextPrime[Floor[Sqrt[p]] + 1, -1]]}]; p1 = 1; While[r = Abs[p^2 - p1^2]; (r == 0) || (Mod[r, t] != 0), p1++]; p1, {n, 1, 60}]

%Y Cf. A210529

%K nonn

%O 1,12

%A _Lei Zhou_, Jan 29 2013