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 A373063 #13 May 28 2024 11:45:15 %S A373063 1,1,2,3,4,1,1,1,2,1,1,1,1,2,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,4,1,1, %T A373063 1,1,1,1,2,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,2,1,1,1,1,1, %U A373063 1,1,1,2,1,1,1,1,1,1,2,2,1,2,1,2,1,1,1,1,1,1,1,1,1,2,1,2,2 %N A373063 Greatest k >= 1 such that (p + 1 - 2^i) / 2^i is prime for i = 1..k and p is prime from A005385. %C A373063 "k-safe primes" iff (p + 1 - 2^i) / 2^i is prime for i = 0..k, p a prime number. A000040 are 0-safe primes, A005385 are 1-safe primes, A066179 are 2-safe primes. %e A373063 p = 11: (11 + 1 - 2^i) / 2^i is prime for i = 1..2, thus a(3) = 2. %e A373063 p = 47: (47 + 1 - 2^i) / 2^i is prime for i = 1..4, thus a(5) = 4. %o A373063 (PARI) isp(k) = (denominator(k) == 1) && isprime(k); %o A373063 f(p) = my(i=1); while (isp((p+1-2^i)/2^i), i++); i-1; %o A373063 apply(f, select(x->isp((x-1)/2), primes(1000))) \\ _Michel Marcus_, May 28 2024 %Y A373063 Cf. A000040, A005385, A066179. %K A373063 nonn %O A373063 1,3 %A A373063 _Ctibor O. Zizka_, May 21 2024