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 A292163 #23 Oct 26 2017 02:59:00 %S A292163 3,3,337,23,0,373,37,839,421,7,0,1447,2113,29,43,17,0,1789,523,84737, %T A292163 7669,397,0,3851,3583,99149,146023,157,0,14173,38329,1229,8017,1021,0, %U A292163 18979,5437,17207,6571,47,0,347,43669,25847,257353,2887,0,33889,71287 %N A292163 a(n) is the least prime p such that the orderly concatenation of the n successive powers of p yields a prime number; a(n)=0 if n is a multiple of 6. %C A292163 See in the Prime Puzzle link the discussion for when n is a multiple of 6. %H A292163 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_892.htm">Puzzle 892. Primes as a concatenation of a series of powers of a prime</a>, The Prime Puzzles and Problems Connection. %e A292163 For n=2, the concatenation of 3^0 and 3^1 is 13 which is prime (while 12 was not prime); so a(2) = 3. %e A292163 For n=3, the concatenation of 3^0, 3^1 and 3^2 is 139 which is prime (while 124 was not prime); so a(3) = 3. %p A292163 g:= proc(p,n) local i,t; %p A292163 t:= p^(n-1): %p A292163 for i from n-2 to 0 by -1 do %p A292163 t:= t + 10^(1+ilog10(t))*p^i %p A292163 od; %p A292163 t %p A292163 end proc: %p A292163 f:= proc(n) %p A292163 local p; %p A292163 if n mod 6 = 0 then return 0 fi; %p A292163 p:= 3; %p A292163 while not isprime(g(p,n)) do %p A292163 p:= nextprime(p); %p A292163 if n mod 3 = 0 then while p mod 3 = 1 do p:= nextprime(p) od fi: %p A292163 od; %p A292163 p %p A292163 end proc: %p A292163 map(f, [$2..30]); # _Robert Israel_, Sep 10 2017 %o A292163 (PARI) pconc(p, n) = {my(s = "1"); for (k=1, n, s = concat(s, Str(p^k));); eval(s);} %o A292163 a(n) = {if (!(n % 6), return (0)); n --; my(p = 2); while (! isprime(pconc(p, n)), p = nextprime(p+1)); p;} %Y A292163 Cf. A047253. %K A292163 nonn,base %O A292163 2,1 %A A292163 _Michel Marcus_, Sep 10 2017 %E A292163 a(27)-a(50) from _Robert Israel_, Sep 10 2017