%I #100 Jan 29 2022 14:39:37
%S 1,1,4,4,29,17,436,356,569,1847,27704,72944,1283333,726079,23833532,
%T 45232276,302068799,616565857,26369361188,23157514888,70991664061,
%U 505527042479,1150735735948,13238389944712,58668785675111,209280259070287,7809609503808088,530566746979816
%N a(n) is the smallest positive number k coprime to (2n+1)!! such that (2n+1)!! + k^2 is a square.
%C 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.
%e 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.
%o (PARI) df(n) = (2*n)! / n! / 2^n; \\ A001147
%o 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
%o (PARI) df(n) = (2*n)! / n! / 2^n; \\ A001147
%o 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
%Y Cf. A001147, A230710, A236381.
%K nonn
%O 1,3
%A _Richard Peterson_, Dec 13 2021
%E a(21)-a(24) and a(28) from _Jon E. Schoenfield_, Jan 06 2022
%E a(25)-a(27) from _Jinyuan Wang_, Jan 07 2022
|