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.

A081889 Least primitive root corresponding to A081888(n).

This page as a plain text file.
%I A081889 #14 Feb 20 2023 14:49:24
%S A081889 1,2,3,5,7,11,19,21,23,31,35,41,43,53,57,69,87,93,95,101,115,141,173,
%T A081889 203
%N A081889 Least primitive root corresponding to A081888(n).
%o A081889 (Python)
%o A081889 from sympy import primitive_root
%o A081889 from itertools import count, islice
%o A081889 def f(n): r = primitive_root(n); return r if r != None else 0
%o A081889 def agen(r=0): yield from ((m, r:=f(m))[1] for m in count(1) if f(m) > r)
%o A081889 print(list(islice(agen(), 18))) # _Michael S. Branicky_, Feb 13 2023
%Y A081889 Cf. A081888, A002229, A002230.
%K A081889 nonn,more
%O A081889 1,2
%A A081889 _Sven Simon_, Mar 30 2003
%E A081889 a(24) from _Michael S. Branicky_, Feb 20 2023