cp's OEIS Frontend

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.

A240623 Prime numbers n such that replacing each digit d in the decimal expansion of n with d^d produces a prime. Zeros are allowed with the convention 0^0 = 1.

This page as a plain text file.
%I A240623 #11 Sep 14 2017 03:53:31
%S A240623 11,13,17,31,53,61,71,79,151,167,229,233,251,263,311,313,331,337,349,
%T A240623 367,389,409,419,443,673,751,947,971,991,1433,1531,1699,1733,1993,
%U A240623 2011,2027,2053,2063,2081,2111,2141,2153,2221,2333,2393,2503,2521,2833,2963
%N A240623 Prime numbers n such that replacing each digit d in the decimal expansion of n with d^d produces a prime. Zeros are allowed with the convention 0^0 = 1.
%e A240623 263 is in the sequence because 263 becomes 44665627 which is also prime, where 44665627 is the concatenation of the numbers (2^2, 6^6, 3^3) = (4, 46656, 27).
%e A240623 2503 is in the sequence because 2503 becomes 43125127 which is also prime, where 43125127 is the concatenation of the numbers (2^2, 5^5, 0^0, 3^3) = (4, 3125, 1, 27).
%p A240623 with(numtheory):T:=array(1..10):L:=array(1..10):
%p A240623    for n from 1 to 1000 do:
%p A240623      p:=ithprime(n):k:=0:s:=0:j:=0:
%p A240623      x:=convert(p,base,10):n1:=nops(x):
%p A240623        for m from n1 by -1 to 1 do:
%p A240623        k:=k+1:T[k]:=x[k]^x[k]:L[k]:=length(T[k]):
%p A240623        od:
%p A240623        n2:=sum('L[j]', 'j'=1..n1):s2:=0:
%p A240623          for u from n1 by -1 to 1 do:
%p A240623          s2:=s2+T[u]*10^(n2-L[u]):n2:=n2-L[u]:
%p A240623          od:
%p A240623             if type(s2,prime)=true
%p A240623             then
%p A240623             printf(`%d, `,p):
%p A240623             else
%p A240623             fi:
%p A240623      od:
%Y A240623 Cf. A068492, A240624.
%K A240623 nonn,base
%O A240623 1,1
%A A240623 _Michel Lagneau_, Apr 09 2014