# プライムパワーズオブプライム

For the purpose of this challenge, a Prime Power of a Prime
(PPP) is defined as a number that can be defined as a prime number
to the power of a prime number. For example, 9 is a PPP because it
can be represented as 3^2. 81 on the other hand is not a PPP
because it can only be represented as 3^4, and 4 is not prime. The
first few PPPs are: 4, 8, 9, 25, 27, 32, 49, 121, 125, 128, 169,
243, 289, 343… This is OEIS sequence A053810

## テストケース：

これらは1でインデックス付けされているので、プログラムが0でインデックス付けされた入力を受け取った場合、指定された入力-1に対して同じ出力が到着するはずです。

``````3  -> 9
6  -> 32
9  -> 125
``````

## 得点：

This ,lowest score in bytes wins!

ベストアンサー

# 05AB1E, 9 bytes

``````µNÓʒĀ}p»½
``````

オンラインで試す！

``````µ             # while counter_variable != input:
N            #   push iteration counter                       e.g. 125
Ó           #   get prime exponents                          -> [0, 0, 3]
ʒĀ}        #   filter out zeros                             -> [3]
p       #   is prime?                                    -> [1]
»      #   join with newlines: we use » instead of J
#   so that [0,1] is not interpreted as truthy   -> 1
½     #   if 1, increment counter_variable
``````