OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
n=25: q = prime(25) = 97; 2*q + 1 = 195 = 3*5*13, whose greatest prime factor is 13, of which the subscript = pi(13) = 6 = a(25);
n=1: q = prime(1) = 2; 2*q + 1 = 5; A006530(5)=5, pi(5) = 3 = a(1).
MAPLE
f:= n -> numtheory:-pi(max(numtheory:-factorset(2*ithprime(n)+1))):
map(f, [$1..100]); # Robert Israel, Jul 08 2018
PROG
(PARI) a(n) = primepi(vecmax(factor(2*prime(n) + 1)[, 1])); \\ Michel Marcus, Jul 09 2018; corrected Jun 14 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Dec 16 2004
STATUS
approved