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 A245358 #18 Dec 10 2015 09:29:09 %S A245358 2,12,199,113,14459,223,1133779,1111222,2225,222222666689, %T A245358 111111111222344678,112225556779999,1122233333333444555888888, %U A245358 111111111133333333334444555666 %N A245358 Least number m such that d_1^j + d_2^j + ... + d_k^j is prime for j = 1, 2, 3, ... n and is composite for j = n+1, where d_1, d_2, ... d_k are the digits of m. %C A245358 a(10) > 10^9. %C A245358 a(n) will always be a number with nondecreasing digits. %C A245358 Except for 2, all terms have odd digit sum since the parity of d_1^j + d_2^j + ... + d_k^j does not change with j and the only numbers with nondecreasing digits and digit sum 2 are 2 and 11. - _Chai Wah Wu_, Dec 07 2015 %e A245358 1^1 + 1^1 + 3^1 = 5 is prime. %e A245358 1^2 + 1^2 + 3^2 = 11 is prime. %e A245358 1^3 + 1^3 + 3^3 = 29 is prime. %e A245358 1^4 + 1^4 + 3^4 = 83 is prime. %e A245358 Since 113 is the smallest number that does this for exponents 1, 2, 3, and 4, a(4) = 113. %o A245358 (PARI) %o A245358 a(n) = for(k=1,10^3,d=digits(n);if(!ispseudoprime(sum(i=1,#d,d[i]^k)),return(k-1))) %o A245358 b(m) = for(n=1,10^9,if(a(n)==m,return(n)));return(0) %o A245358 m=1;while(m<100,print1(b(m),", ");m++) %K A245358 nonn,base,more %O A245358 1,1 %A A245358 _Derek Orr_, Jul 18 2014 %E A245358 a(10)-a(14) added and definition corrected by _Chai Wah Wu_, Dec 07 2015