cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A229709 Least sum of two squares that is a primitive root of the n-th prime.

Original entry on oeis.org

1, 2, 2, 5, 2, 2, 5, 2, 5, 2, 13, 2, 13, 5, 5, 2, 2, 2, 2, 13, 5, 29, 2, 13, 5, 2, 5, 2, 10, 5, 29, 2, 5, 2, 2, 13, 5, 2, 5, 2, 2, 2, 29, 5, 2, 34, 2, 5, 2, 10, 5, 13, 13, 18, 5, 5, 2, 26, 5, 13, 5, 2, 5, 17, 10, 2, 29, 10, 2, 2, 5, 13, 10, 2, 2, 5, 2, 5, 13
Offset: 1

Views

Author

Eric M. Schmidt, Sep 27 2013

Keywords

Examples

			a(4) = 5 as 5 = 2^2 + 1^2 is a primitive root mod 7 (the 4th prime).
		

Crossrefs

Programs

  • 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)))
Showing 1-1 of 1 results.