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.

A122028 Least positive prime primitive root of n-th prime.

This page as a plain text file.
%I A122028 #35 Dec 21 2021 23:27:32
%S A122028 3,2,2,3,2,2,3,2,5,2,3,2,7,3,5,2,2,2,2,7,5,3,2,3,5,2,5,2,11,3,3,2,3,2,
%T A122028 2,7,5,2,5,2,2,2,19,5,2,3,2,3,2,7,3,7,7,11,3,5,2,43,5,3,3,2,5,17,17,2,
%U A122028 3,19,2,2,3,7,11,2,2,5,2,5,3,29,2,2,7,5,17,2,3,13,2,3,2,13,3,2,7,5,2,3,2,2,2
%N A122028 Least positive prime primitive root of n-th prime.
%D A122028 A. E. Western and J. C. P. Miller, Tables of Indices and Primitive Roots. Royal Society Mathematical Tables, Vol. 9, Cambridge Univ. Press, 1968, p. 2.
%H A122028 T. D. Noe, <a href="/A122028/b122028.txt">Table of n, a(n) for n = 1..10000</a>
%F A122028 a(n) = A002233(n) for n>1. - _Jonathan Sondow_, May 18 2017
%p A122028 f:= proc(n) local p,q;
%p A122028 p:= ithprime(n);
%p A122028 q:= 2:
%p A122028 while numtheory:-order(q,p) <> p-1 do q:= nextprime(q) od:
%p A122028 q
%p A122028 end proc:
%p A122028 map(f, [$1..100]); # _Robert Israel_, Jan 16 2017
%t A122028 a[1] = 3; a[n_] := (p = Prime[n]; Select[Range[p], PrimeQ[#] && MultiplicativeOrder[#, p] == EulerPhi[p] &, 1]) // First; Table[a[n], {n, 100}]   (* _Jean-François Alcover_, Mar 30 2011 *)
%t A122028 a[1] = 3; a[n_] := SelectFirst[ PrimitiveRootList[ Prime[n]], PrimeQ]; Array[a, 101] (* _Jean-François Alcover_, Sep 28 2016 *)
%Y A122028 Cf. A002233 (least prime primitive root).
%K A122028 nonn,nice,easy
%O A122028 1,1
%A A122028 _N. J. A. Sloane_ and _Klaus Brockhaus_, Sep 13 2006