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 A228175 #43 Feb 28 2025 05:53:33 %S A228175 1,1,1,2,1,6,5,2,7,10,8 %N A228175 Least positive k such that n^n * k^k + 1 is a prime, or 0 if no such k exists. %C A228175 The next terms after the missing a(11) are 31, 58, 4, 596, 3. %C A228175 a(11) > 20000 or a(11) = 0, a(17) = 4308, a(18) = 1073, a(19) > 20000 or a(19) = 0. - _Jason Yuen_, May 21 2024 %C A228175 a(11) > 10^5 or a(11) = 0. a(19) > 10^5 or a(19) = 0. - _Jason Yuen_, Feb 27 2025 %F A228175 a(n) = A231119(n^n). - _Jason Yuen_, Nov 15 2024 %e A228175 3^3 * 1 + 1 = 28 is not a prime, 3^3 * 2^2 + 1 = 109 is a prime, so a(3) = 2. %o A228175 (Java) %o A228175 import java.math.BigInteger; %o A228175 public class A228175 { %o A228175 public static void main (String[] args) { %o A228175 for (int n = 0; n < 333; n++) { %o A228175 BigInteger nn = BigInteger.valueOf(n).pow(n); %o A228175 int k = 1; %o A228175 for (; k<10000; k++) { %o A228175 BigInteger kk = BigInteger.valueOf(k).pow(k).multiply(nn).add(BigInteger.ONE); %o A228175 if (kk.isProbablePrime(80)) { %o A228175 System.out.printf("%d, ", k); %o A228175 break; %o A228175 } %o A228175 } %o A228175 if (k==10000) System.out.printf("- "); %o A228175 } %o A228175 } %o A228175 } %o A228175 (PARI) A228175(n,L=9e9,s=1)={forstep(k=s+(bittest(n,0)&&n>1&&bittest(s,0)), L, 1+bittest(n,0), ispseudoprime(n^n*k^k+1)&&return(k))} \\ Optional args allow specification of start and limit for search; for odd n > 1, only check even k. - _M. F. Hasler_, Nov 03 2013 %Y A228175 Cf. A000040, A000312, A156223, A231119, A380903. %K A228175 nonn,hard,more %O A228175 0,4 %A A228175 _Alex Ratushnyak_, Nov 02 2013