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.

A162253 Smallest value of the n-fold nesting prime(prime(...(k)...)) with a prime digital sum.

This page as a plain text file.
%I A162253 #16 May 09 2025 07:11:37
%S A162253 2,3,5,11,1787,5381,5381,5381,648391,648391,414507281407,414507281407
%N A162253 Smallest value of the n-fold nesting prime(prime(...(k)...)) with a prime digital sum.
%C A162253 n-deep nestings prime(prime(...(prime(k))...)) = prime^n(k) can be arranged in a table T(n,k),
%C A162253     2   3    5     7    11    13 : A000040, n=0
%C A162253     3   5   11    17    31    41 : A006450, n=1
%C A162253     5  11   31    59   127   179 : A038580, n=2
%C A162253    11  31  127   277   709  1063 : A049090
%C A162253    31 127  709  1787  5381  8527 : A049203
%C A162253   127 709 5381 15299 52711 87803 : A049202
%C A162253 a(n) is the leftmost value in the n-th row (the one with the smallest k) with a digit sum which is prime.
%C A162253 In order to generate the entries a(11) and a(12), prime2() was used which reads a large 880 gigabyte file of all primes < 10^12.
%F A162253 {min A000040^n(k): A000040^n(k) in A028834}. - _R. J. Mathar_, Jul 16 2009
%e A162253 1st nesting is prime(1) = 2 which has a prime digit sum: a(0). The second nesting is prime(prime(1)) = 3, which has a prime digits sum: a(1)=3. The 3rd and 4th nesting also succeed for k=1 while the fifth nesting prime(prime(prime(prime(prime(4))))) = 1787 is the first occurrence of sum of digits is prime. Here nesting for k = 1,2,3 does not sum to a prime number.
%o A162253 (PARI) for(j=1,12,print(j","sodip2(100,j)","));
%o A162253 sodip2(n,m) = \\multiple nesting of prime(prime(prime..(n)
%o A162253 {
%o A162253 local(s=0,a,x,y,j,p);
%o A162253 for(x=1,n,
%o A162253 for(i=1,m,p=prime2(p));
%o A162253 a=eval(Vec(Str(p)));
%o A162253 y=sum(j=1,length(a),a[j]);
%o A162253 if(isprime(y),return(p));
%o A162253 )
%o A162253 }
%K A162253 nonn,base,more
%O A162253 1,1
%A A162253 _Cino Hilliard_, Jun 29 2009
%E A162253 Definition rephrased by _R. J. Mathar_, Jul 16 2009