OFFSET
1,1
COMMENTS
The sequence is conjectural. It depends on a proof of conjecture 1: If condition (*) holds for k and n < u(k), then it holds for k+1 and n, where u(k) is some nondecreasing function of k. Computationally this is confirmed for 1 < k < 300 and n < 100, 2 < k < 250 and n < 238, 3 < k < 250 and n < 282, 5 < k < 200 and n < 652, 8 < k < 200 and n < 2088, 9 < k < 200 and n <= 1000000.
No further terms up to 1000000 were found; this suggests conjecture 2: The sequence is finite and 1848 its last term. Perhaps easier to prove is the stronger conjecture 3: For every n > c there is a k < d such that condition (*) is violated for k and n. Computationally this is confirmed for n <=1000000 and c = 1848, d = 11.
PROG
(PARI) {h=50; m=5000; v=vector(m, x, 1); for(k=1, h, for(n=1, m, if(v[n]>0, r=0; for(x=0, sqrtint(n*k^2+1), for(y=0, sqrtint((n*k^2+1-x^2)\n), if(x^2+n*y^2==n*k^2+1, r++))); q=n*k^2+1; d=numdiv(q); s=if(issquare(q), d+1, d)/2; if(r!=s, v[n]=0)))); for(n=1, m, if(v[n]>0, print1(n, ", ")))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Holger Stephan (stephan(AT)wias-berlin.de), Feb 18 2002
EXTENSIONS
Edited and extended by Klaus Brockhaus, Jun 25 2003
STATUS
approved