A260407 Numbers n such that (n-1)^2+1 divides 2^(n-1)-1.
1, 17, 257, 8209, 65537, 649801, 1382401, 4294967297
Offset: 1
Programs
-
Magma
[n: n in [1..10^6] | (2^(n-1)-1) mod ((n-1)^2+1) eq 0 ]; // Vincenzo Librandi, Jul 25 2015
-
Mathematica
Join [{1},Select[Range[43*10^8],PowerMod[2,#-1,(#-1)^2+1]==1&]] (* Harvey P. Dale, Sep 07 2018 *)
-
PARI
forstep(n=1,1e7,2,Mod(2,(n-1)^2+1)^(n-1)==1&&print1(n","))
Formula
a(n) = A247165(n)+1.
Comments