OFFSET
1,2
LINKS
Eric M. Schmidt, Table of n, a(n) for n = 1..10000
Christopher Ambrose, On the Least Primitive Root Expressible as a Sum of Two Squares, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 13, Paper A55, 2013.
EXAMPLE
a(4) = 5 as 5 = 2^2 + 1^2 is a primitive root mod 7 (the 4th prime).
PROG
(Sage) def A229709(n) : p = nth_prime(n); return next(i for i in PositiveIntegers() if i%p!=0 and mod(i, p).multiplicative_order() == p-1 and all(q%4 != 3 or e%2==0 for (q, e) in factor(i)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric M. Schmidt, Sep 27 2013
STATUS
approved