OFFSET
1,1
COMMENTS
All composite terms are included in A177713.
Terms are the difference of two perfect squares k = (b+c)^2 - d^2, where d = sqrt(D), and so if composite are factorizable by Fermat's method k = ((b+c) + d) * ((b+c) - d).
FORMULA
1.6*n < a(n) <= 4n^4 + 1. (Improvements welcome!) - Charles R Greathouse IV, Oct 23 2022
EXAMPLE
8525 is a term since it's not square and b = floor(sqrt(k)) = 92 and c = k - b^2 = 61 gives D = (b+c)^2 - k = 14884 which is square (122^2).
PROG
(Python)
from gmpy2 import *
def is_A357945(n):
if not is_square(n):
b, c = isqrt_rem(n)
return is_square(c*(2*b+c-1))
else:
return False
(PARI) isok(k) = if (!issquare(k), my(b=sqrtint(k), c=k-b^2); issquare((b+c)^2 - k)); \\ Michel Marcus, Oct 23 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Darío Clavijo, Oct 21 2022
STATUS
approved