OFFSET
1,2
COMMENTS
1) It is known that this sequence is infinite.
2) L and m with odd sum L + m are necessarily coprime if L^2 + M^2 is prime.
3) The "singular" case m = L = 1, L + m = 2 (even) with 1^2 + 1^2 = 2 is skipped. It would define a(0)=1.
4) a(n) <= n.
EXAMPLE
n=1: 1^2 + 2^2 = 5; a(1)=1.
n=2: 2^2 + 3^2 = 13 < 1^2 + 4^2 = 17; a(2)=2.
n=3: 2^2 + 5^2 = 29 < 1^2 + 6^2 = 37. 3^2 + 4^2 = 5^2 not prime; a(3)=2.
n=27: 23^2 + 32^2 = 1553 < 1597, 1657, 1693, 1733, 1777, 1877, 1933, 1993, 2273, 2437, 2617, 2713, 2917, a(27)=23.
MAPLE
A159296 := proc(n) local a, pmin, l, m ; a := 0 ; pmin := 2*(2*n+1)^2 ; for l from 1 to n do m := 2*n+1-l ; if isprime(m^2+l^2) then if m^2+l^2 < pmin then pmin := m^2+l^2 ; a := l ; fi; fi; od: RETURN(a) ; end: seq(A159296(n), n=1..80) ; # R. J. Mathar, Apr 18 2009
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 09 2009
EXTENSIONS
Edited and extended by R. J. Mathar, Apr 18 2009
STATUS
approved