A204983 a(n) = 2^(k-1)-2^(j-1), where (2^(k-1),2^(j-1)) is the least pair of distinct positive powers of 2 for which n divides 2^(k-1)-2^(j-1).
1, 2, 3, 4, 15, 6, 7, 8, 63, 30, 1023, 12, 4095, 14, 15, 16, 255, 126, 262143, 60, 63, 2046, 2047, 24, 1048575, 8190, 262143, 28, 268435455, 30, 31, 32, 1023, 510, 4095, 252, 68719476735, 524286, 4095, 120, 1048575, 126, 16383, 4092, 4095
Offset: 1
Keywords
Programs
-
Mathematica
(See the program at A204979.)
-
PARI
a(n) = for (k=1, oo, for (j=1, k-1, my(d=2^(k-1)-2^(j-1)); if (!(d % n), return(d)););); \\ Michel Marcus, Sep 16 2023
Comments