This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A187787 #36 Aug 15 2021 15:01:17 %S A187787 1,3,15,35,119,255,455,1295,2555,2703,3815,3855,4355,5543,6479,8007, %T A187787 9215,10439,10619,11951,16211,22895,23435,26319,26795,27839,28679, %U A187787 35207,43055,44099,47519,47879,49679,51119,57239,61919,62567,63167,63935,65535,74447,79055 %N A187787 Numbers k such that 2^(k+1) == 1 (mod k). %C A187787 Prime factorizations of the first ten terms: 3, 3*5, 5*7, 7*17, 3*5*17, 5*7*13, 5*7*37, 5*7*73, 3*17*53, 5*7*109. %H A187787 Amiram Eldar, <a href="/A187787/b187787.txt">Table of n, a(n) for n = 1..10000</a> %e A187787 3 is in the sequence because 2^(3+1) mod 3 = 16 mod 3 = 1. %p A187787 for n from 1 to 100000 do if 2&^(n+1) mod n = 1 then print(n) fi od; %t A187787 m = 1; Join[Select[Range[1, m], Divisible[2^(# + 1), #] &], %t A187787 Select[Range[m + 1, 10^5], PowerMod[2, # + 1, #] == m &]] (* _Robert Price_, Oct 11 2018 *) %t A187787 Join[{1},Select[Range[80000],PowerMod[2,#+1,#]==1&]] (* _Harvey P. Dale_, Aug 19 2019 *) %o A187787 (PARI) for (n=1,10^7, if (Mod(2,n)^(n+1)==1,print1(n,", "))); /* _Joerg Arndt_, Jan 06 2013 */ %Y A187787 Cf. A055685, A069927, A112983. %K A187787 nonn %O A187787 1,2 %A A187787 _Franz Vrabec_, Jan 06 2013 %E A187787 Term a(1)=1 prepended by _Max Alekseyev_, Nov 29 2014