login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A255073
Primes that remain prime after each digit is replaced by the power of its position.
2
2, 3, 5, 7, 11, 13, 17, 19, 23, 37, 43, 47, 67, 71, 79, 83, 101, 103, 107, 109, 113, 131, 137, 139, 167, 173, 179, 191, 211, 241, 263, 269, 281, 307, 311, 313, 331, 337, 353, 359, 367, 397, 431, 479, 491, 503, 521, 577, 593, 601, 613, 617, 659, 673
OFFSET
1,1
COMMENTS
In the definition, "position" refers to the position of the digit in the decimal expansion, starting counting at 1 for the least significant digit.
In the Example section, the notation a&b denotes the concatenation of two numbers, a and b.
a(n) = n for 2, 3, 5, 7, 11, 13, 17, 19, 101, 103, 107, 109, 113, ...
LINKS
EXAMPLE
p = 2 -> (2^1) -> 2 (prime).
p = 23 -> (2^2)&(3^1) -> 43 (prime).
p = 337 -> (3^3)&(3^2)&(7^1) -> 2797 (prime).
MATHEMATICA
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 *)
PROG
(Python)
import sympy
def powdig(m):
....l=len(str(m))
....return(int(''.join([str(int(list(i)[1])**(l-list(i)[0])) for i in enumerate(list(str(m)))])))
n=2
while n>0:
....t=powdig(n)
....if sympy.isprime(t)==True:
........print(n)
....n=sympy.nextprime(n)
CROSSREFS
Sequence in context: A262363 A050264 A075239 * A341667 A330007 A008792
KEYWORD
nonn,easy,base
AUTHOR
Abhiram R Devesh, Feb 14 2015
STATUS
approved