login
Smallest number m such that m^2+1 is divisible by A002144(n)^2 (= squares of primes congruent to 1 mod 4).
9

%I #11 May 04 2024 02:54:37

%S 7,70,38,41,117,378,500,682,776,3861,4052,515,5744,1710,6613,1744,

%T 11018,13241,3458,5099,1393,16610,26884,15006,2072,13637,31361,4443,

%U 26508,7850,37520,31152,39922,37107,6072,4005,32491,4030,43211,12238

%N Smallest number m such that m^2+1 is divisible by A002144(n)^2 (= squares of primes congruent to 1 mod 4).

%C a(2) = 70 since A002144(2)=13, 70^2+1 = 4091 = 13^2 * 29 and for no k<70 does 13^2 divide k^2+1. Related to period-1 continued fractions.

%H Chai Wah Wu, <a href="/A059321/b059321.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..2000 from Klaus Brockhaus)

%o (Python)

%o from itertools import islice

%o from sympy import nextprime, sqrt_mod_iter

%o def A059321_gen(): # generator of terms

%o p = 1

%o while (p:=nextprime(p)):

%o if p&3==1:

%o yield min(sqrt_mod_iter(-1,p**2))

%o A059321_list = list(islice(A059321_gen(),20)) # _Chai Wah Wu_, May 04 2024

%Y Cf. A002144, A059591, A059592.

%K easy,nonn

%O 1,1

%A _Marc LeBrun_, Jan 26 2001