OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..175
PROG
(Haskell)
a251240 n = a251240_list !! (n-1)
a251240_list = filter ((== 2) . a062799 . fromIntegral . a098550) [1..]
(Python)
from gmpy2 import gcd, is_square, is_prime, isqrt
A251240_list, l1, l2, s, b = [], 3, 2, 4, {}
for n in range(4, 10**4):
....i = s
....while True:
........if not i in b and gcd(i, l1) == 1 and gcd(i, l2) > 1:
............l2, l1, b[i] = l1, i, 1
............while s in b:
................b.pop(s)
................s += 1
............if is_square(i) and is_prime(isqrt(i)):
................A251240_list.append(n)
............break
........i += 1 # Chai Wah Wu, Dec 06 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Dec 02 2014
STATUS
approved