login
A392773
The smallest x for which x^2 == 2 (mod F(n)), where F(n) is the n-th Fermat number.
1
6, 60, 4080, 16776960, 281474976645120, 79228162514264337589248983040, 6277101735386680763835789423207666416083908700390324961280
OFFSET
2,1
COMMENTS
Useful for factoring algorithms that contain a Gaussian elimination stage (e.g., MPQS, NFS).
There are no values of x for either F(0)=3 or F(1)=5 as they are too small to have defined values for F(n-2), therefore the first value in the sequence applies to F(2)= 17.
Due to quadratic reciprocity, there is always a second reflection value at (F(n) - x). E.g. a(3) = 60, therefore reflection value = (F(3) - a(3)) = (257 - 60) = 197 cf. 197^2 == 2 (mod 257).
REFERENCES
Henri Cohen, A course in Computational Algebraic Number Theory, Springer-Verlag, 1993, pp. 487-492.
David Wells, Prime Numbers (The most mysterious figures in math), John Wiley, 2005, p. 95.
LINKS
FORMULA
a(n) = (F(n-2) - 1)*(F(n-1) - 2) with F(n) = 2^(2^n) + 1.
EXAMPLE
a(2) = (F(0) - 1)*(F(1) - 2) = 2*3 = 6 cf. 6^2 == 2 (mod 17)
a(3) = (F(1) - 1)*(F(2) - 2) = 4*15 = 60 cf. 60^2 == 2 (mod 257)
a(4) = (F(2) - 1)*(F(3) - 2) = 16*255 = 4080 cf. 4080^2 == 2 (mod 65537)
MATHEMATICA
A392773[n_] := 8^# - 2^# & [2^(n-2)]; Array[A392773, 8, 2] (* Paolo Xausa, Feb 02 2026 *)
PROG
(Rexx)
Trace Off
Numeric Digits 1024
out_str = ""
Do inc = 0 To 8
fermat.inc = (2 ** (2 ** inc)) + 1
If inc > 1 Then Do
temp1 = inc - 1 ; temp2 = inc - 2
out_str = out_str||", "||(fermat.temp2 - 1) * (fermat.temp1 - 2)
End
End
Say Substr(out_str, 3)
Exit
(Python)
def A392773(n): return (m:=(1<<(1<<n-2)))*(m**2-1) # Chai Wah Wu, Feb 01 2026
CROSSREFS
Cf. A000215 (F(n)).
Sequence in context: A061431 A261523 A318131 * A202620 A075069 A324200
KEYWORD
nonn,easy
AUTHOR
Martin Hutchings, Jan 22 2026
STATUS
approved