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 A051900 #48 Feb 28 2025 05:56:58 %S A051900 3,5,13,17,113,97,193,257,769,11777,13313,59393,12289,40961,114689, %T A051900 65537,2424833,6946817,786433,5767169,7340033,23068673,155189249, %U A051900 595591169,1224736769,167772161,469762049,2281701377,3489660929,12348030977,3221225473 %N A051900 Minimal 2^n safe-primes: a(n) = 2^n*A051886(n) + 1 (a prime number). %C A051900 Equivalently, a(n) is the smallest prime p such that (p-1)/gpf(p-1) = 2^n where gpf(m) is the greatest prime factor of m, A006530. Subsequence of A074781, primes p such that the ratio (p-1)/gpf(p-1) = 2^k. - _Bernard Schott_, Dec 14 2020 %D A051900 Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B46, p. 154. %H A051900 Amiram Eldar, <a href="/A051900/b051900.txt">Table of n, a(n) for n = 0..1000</a> %e A051900 1 + 2^11*A051886(11) = 2048*29 + 1 = 59393 = a(11) is the smallest q prime so that (q-1)/2048 is also a (minimal, generalized Germain-) prime. The 101st term is 2385718429629527733616795432517633 = 1 + (2^101)*941. %p A051900 alias(pf = NumberTheory:-PrimeFactors): gpf := n -> max(pf(n)): %p A051900 a := proc(n) local p, q; q := 2^n; p := 2; %p A051900 while (p-1) <> gpf(p-1)*q %p A051900 do p := nextprime(p) od; %p A051900 p end: seq(a(n), n=0..14); # _Peter Luschny_, Dec 14 2020 %t A051900 f[n_] := Block[{e = IntegerExponent[n - 1, 2]}, g = (n - 1)/2^e; If[g == 1, e - 1, If[ PrimeQ[g], e, -1]]]; t = Table[0, {50}]; p = 3; While[p < 13000000000, a = f@ p; If[t[[a + 1]] == 0, t[[a + 1]] = p; Print[{a, p}]]; p = NextPrime@ p]; t (* _Robert G. Wilson v_, Jun 17 2012 *) %t A051900 f[n_] := Block[{k = 1}, While[ !PrimeQ[2^n*Prime[k] + 1], k++]; 2^n*Prime[k] + 1]; Array[f, 32, 0] (* _Robert G. Wilson v_, Jun 17 2012 *) %Y A051900 Cf. A005385, A006530, A051886, A074781. %K A051900 nonn %O A051900 0,1 %A A051900 _Labos Elemer_, Dec 16 1999 %E A051900 Name clarified by _Joerg Arndt_, Jun 18 2012 %E A051900 Offset changed to 0 and a(0) prepended by _Amiram Eldar_, Feb 28 2025