

A214750


Least m > 0 such that n  m divides n^2 + m^2.


3



1, 1, 2, 3, 2, 5, 4, 3, 2, 9, 3, 11, 6, 5, 8, 15, 6, 17, 4, 3, 11, 21, 6, 15, 13, 9, 12, 27, 5, 29, 16, 11, 17, 10, 4, 35, 19, 13, 8, 39, 6, 41, 12, 15, 23, 45, 12, 35, 10, 17, 20, 51, 18, 5, 7, 19, 29, 57, 10, 59, 31, 9, 32, 15, 22, 65, 34, 23, 14, 69, 8, 71, 37, 25, 38
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

2,3


COMMENTS

If nm = s, then n = s+m and nm  n^2+m^2 is equivalent to s  (s^2 + 2*s*m + 2*m^2). So nm  n^2+m^2 is equivalent to nm  2*m^2. If nk = s, then n = s+k and nk  n*(n+k) is equivalent to s  (s^2 + 3*s*k + 2*k^2). So nk  n*(n+k) is equivalent to nk  2*k^2. Therefore nm  n^2+m^2 is equivalent to nk  n*(n+k) and the k's from A110357 and the m's from this sequence are the same.  Bob Andriesse, Dec 26 2022
Let nm = s; then m = ns and nm  n^2 + m^2 is equivalent to s  n^2 + (ns)^2 or s  2*n^2. If n is an odd prime, s must be 2. So if n is an odd prime, a(n) = m = n2. Examples: a(7) = 5, a(11) = 9.  Bob Andriesse, Jul 13 2023


LINKS



FORMULA



EXAMPLE

Write x#y if xy is false; then 7#65, 6#68, 5#73, 480, so a(8) = 4.
For n = 11, A110357(11) = 110 and a(11) = H(11, 110)  11 = 20  11 = 9.  Bob Andriesse, Jan 03 2023


MATHEMATICA

Table[m = 1; While[! Divisible[n^2+m^2, nm], m++]; m, {n, 2, 100}]


PROG

(PARI) a(n) = my(m=1); while(denominator((n^2+m^2)/(nm)) != 1, m++); m; \\ Michel Marcus, Aug 16 2019
(Python)
from sympy.abc import x, y
from sympy.solvers.diophantine.diophantine import diop_quadratic
def A214750(n): return min(int(x) for x, y in diop_quadratic(n*(ny)+x*(y+x)) if x>0) # Chai Wah Wu, Oct 06 2023


CROSSREFS



KEYWORD

nonn,easy


AUTHOR



STATUS

approved



