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.

A255073 Primes that remain prime after each digit is replaced by the power of its position.

This page as a plain text file.
%I A255073 #26 May 22 2025 10:21:42
%S A255073 2,3,5,7,11,13,17,19,23,37,43,47,67,71,79,83,101,103,107,109,113,131,
%T A255073 137,139,167,173,179,191,211,241,263,269,281,307,311,313,331,337,353,
%U A255073 359,367,397,431,479,491,503,521,577,593,601,613,617,659,673
%N A255073 Primes that remain prime after each digit is replaced by the power of its position.
%C A255073 In the definition, "position" refers to the position of the digit in the decimal expansion, starting counting at 1 for the least significant digit.
%C A255073 In the Example section, the notation a&b denotes the concatenation of two numbers, a and b.
%C A255073 a(n) = n for 2, 3, 5, 7, 11, 13, 17, 19, 101, 103, 107, 109, 113, ...
%H A255073 Abhiram R Devesh, <a href="/A255073/b255073.txt">Table of n, a(n) for n = 1..1000</a>
%e A255073 p =   2 -> (2^1)             -> 2 (prime).
%e A255073 p =  23 -> (2^2)&(3^1)       -> 43 (prime).
%e A255073 p = 337 -> (3^3)&(3^2)&(7^1) -> 2797 (prime).
%t A255073 f[n_] := Block[{d = Reverse@ IntegerDigits@ n, k}, FromDigits[Reap@ For[k = 1, k <= Length@ d, k++, Sow[d[[k]]^k]] // Flatten // Rest // Reverse // IntegerDigits // Flatten]]; Select[Prime@ Range@ 125, PrimeQ[f@ #] &] (* _Michael De Vlieger_, Apr 02 2015 *)
%o A255073 (Python)
%o A255073 import sympy
%o A255073 def powdig(m):
%o A255073     l=len(str(m))
%o A255073     return(int(''.join([str(int(list(i)[1])**(l-list(i)[0])) for i in enumerate(list(str(m)))])))
%o A255073 n=2
%o A255073 while n>0:
%o A255073     t=powdig(n)
%o A255073     if sympy.isprime(t)==True:
%o A255073         print(n)
%o A255073     n=sympy.nextprime(n)
%K A255073 nonn,easy,base
%O A255073 1,1
%A A255073 _Abhiram R Devesh_, Feb 14 2015