[go: up one dir, main page]

login
A348635
a(n) is the smallest positive number k coprime to (2n+1)!! such that (2n+1)!! + k^2 is a square.
0
1, 1, 4, 4, 29, 17, 436, 356, 569, 1847, 27704, 72944, 1283333, 726079, 23833532, 45232276, 302068799, 616565857, 26369361188, 23157514888, 70991664061, 505527042479, 1150735735948, 13238389944712, 58668785675111, 209280259070287, 7809609503808088, 530566746979816
OFFSET
1,3
COMMENTS
a(n) always exists since the set of k coprime to (2n+1)!! and with (2n+1)!! + k^2 equal to a square is nonempty, because k = ((2n+1)!!-1)/2 is in the set.
EXAMPLE
a(5)=29 since 106^2 - 29^2 = 10395 = 3*5*7*9*11 and 29 is relatively prime to 10395 and is as small as possible.
PROG
(PARI) df(n) = (2*n)! / n! / 2^n; \\ A001147
a(n) = my(d=df(n+1), k=1); while (!((gcd(d, k)==1) && issquare(d+k^2)), k++); k; \\ Michel Marcus, Jan 06 2022
(PARI) df(n) = (2*n)! / n! / 2^n; \\ A001147
a(n) = my(d=df(n+1), m=sqrtint(d), k); while (!(issquare(m^2-d, &k) && gcd(d, k)==1), m++); k; \\ Michel Marcus, Jan 06 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Richard Peterson, Dec 13 2021
EXTENSIONS
a(21)-a(24) and a(28) from Jon E. Schoenfield, Jan 06 2022
a(25)-a(27) from Jinyuan Wang, Jan 07 2022
STATUS
approved