The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A229710 Least m of maximal order mod n such that m is a sum of two squares. 2

%I #10 Nov 07 2015 17:38:56

%S 2,5,5,5,2,13,2,5,2,5,2,5,5,5,2,13,2,13,5,5,2,37,2,5,2,13,13,5,2,5,2,

%T 5,2,13,2,13,13,5,5,13,2,5,5,5,5,13,5,37,2,5,2,5,2,37,2,13,2,13,2,5,2,

%U 5,2,5,2,17,13,5,5,5,2,13,2,37,29,13,2,13,2,5

%N Least m of maximal order mod n such that m is a sum of two squares.

%C The sequence is undefined at n=4, as all the primitive roots are congruent to 3 mod 4.

%C Terms are not necessarily prime. For example, a(109) = 10.

%C a(prime(n)) = A229709(n).

%H Eric M. Schmidt, <a href="/A229710/b229710.txt">Table of n, a(n) for n = 5..10000</a>

%H Christopher Ambrose, <a href="http://www.emis.de/journals/INTEGERS/papers/n55/n55.Abstract.html">On the Least Primitive Root Expressible as a Sum of Two Squares</a>, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 13, Paper A55, 2013.

%e The integer 5 = 2^2 + 1^2 has order 2 mod 12, the maximum, so a(12) = 5.

%o (Sage) def A229710(n) : m = Integers(n).unit_group_exponent(); return 0 if n==1 else next(i for i in PositiveIntegers() if mod(i,n).is_unit() and mod(i,n).multiplicative_order() == m and all(p%4 != 3 or e%2==0 for (p,e) in factor(i)))

%Y Cf. A001481, A111076, A229708, A229709.

%K nonn

%O 5,1

%A _Eric M. Schmidt_, Sep 27 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 21:06 EDT 2024. Contains 372522 sequences. (Running on oeis4.)