22
1
Background
A super-prime is a prime number whose index in the list of all primes is also prime. The sequence looks like this:
3, 5, 11, 17, 31, 41, 59, 67, 83, 109, 127, 157, 179, 191, ...
This is sequence A006450 in the OEIS.
Challenge
Given a positive integer, determine whether it is a super-prime.
Test Cases
2: false 3: true 4: false 5: true 7: false 11: true 13: false 17: true 709: true 851: false 991: true
Scoring
This is code-golf, so the shortest answer in each language wins.
6What is the index of 2? Is it 1 or 0? – Dennis – 2017-07-07T21:44:34.567
1@Dennis the sequence is 1-indexed; the index of 2 is 1. – musicman523 – 2017-07-07T22:03:12.113
2First thought after reading what a super-prime is: What would you call super-super-primes? Or super^3-primes? What is bigger, the number of atoms in the universe or the 11th super^11-prime? You, dear internet person, are stealing another few hours of my hours of my prime time! – J_F_B_M – 2017-07-08T19:28:52.790
@J_F_B_M Make a challenge based on it! :D – musicman523 – 2017-07-09T06:03:59.717
It's a bird! It's a plane! It's Super-Prime! – Mark – 2017-07-09T09:23:08.210
1@J_F_B_M 11 is a super-prime who's index in the super-prime list is also a super-prime (3), so the 11'th super-prime is a super-super-super-prime – Skidsdev – 2017-07-10T08:33:48.987
435748987787 happens to be the 11th super^11-prime, for anyone interested. – J_F_B_M – 2017-07-10T13:19:41.457