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 A308829 #88 Apr 14 2020 10:39:34 %S A308829 0,1,5,27,45,47,75,8895,11405,29517,84615,218307 %N A308829 Numbers k such that 3^k - k + 1 is prime. %C A308829 Sieving can be limited to odd values of k, because 3^k - k + 1 is even when k is even. In fact, if k is even, 3^k - k is odd and the successor is even. %t A308829 ListA[k_] := Block[{seq = {}, n = 0, i = 0}, While[Length[seq] < k, {n = 3^i - i + 1, If[PrimeQ[n], AppendTo[seq, i]], i += 1}]; seq] %o A308829 (Sage) %o A308829 def list_a(k): %o A308829 return [i for i in range(k) if (3**i) - i + 1 in Primes()] %o A308829 (PARI) isok(k) = isprime(3^k - k + 1); \\ _Jinyuan Wang_, Aug 03 2019 %Y A308829 Cf. A100361, A100362. %K A308829 nonn,hard,more %O A308829 1,3 %A A308829 _Giuseppe Bonaccorso_, Aug 02 2019