OFFSET
6,1
FORMULA
Let n be a squarefree composite number and r = floor(sqrt(n)). Then the closest surrounding squares of n are r^2 and (r+1)^2. So d = (r+1)^2 - r^2 = 2r+1. If gcd(n, d) > 1 then list d.
EXAMPLE
14 is a squarefree composite number. 3^2 and 4^2 are the closest squares surrounding 14. So the difference, 16-9 = 7 and 14 have a common divisor greater than 1 namely 7, so 7 is the first entry in the table.
PROG
(PARI) surrsqgcd(n) = { local(x, y, j, r, d); for(x=1, n, if(!issquare(x)&!isprime(x), r=floor(sqrt(x)); d=r+r+1; if(gcd(x, d) > 1, print1(d", ") ) ) ) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Nov 12 2005
STATUS
approved