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.

A378592 a(n) is the first number that is the largest primitive root modulo exactly n numbers.

Original entry on oeis.org

4, 1, 3, 47, 5
Offset: 0

Views

Author

Robert Israel, Dec 01 2024

Keywords

Comments

a(n) is the first number that occurs exactly n times in A306253.
Is there any number that occurs more than 4 times in A306253?

Examples

			4 is not the largest primitive root mod any number.
1 is the largest primitive root mod 2.
3 is the largest primitive root mod 4 and mod 5.
47 is the largest primitive root mod 49, 50, and 54.
5 is the largest primitive root mod 6, 7, 9, and 14.
		

Crossrefs

Cf. A306253.

Programs

  • Maple
    f:= proc(b) local x, t;
      t:= numtheory:-phi(b);
      for x from b-1 by -1 do if igcd(x, b) = 1 and numtheory:-order(x, b)=t then return x fi od
    end proc:
    f(1):= 0:
    cands:= select(t -> t=1 or numtheory:-primroot(t) <> FAIL, [$1..1000]):
    R:= map(f, cands):
    S:= sort(convert(convert(R,set),list)):
    V:= Array(0..10): V[0]:= 4:
    for s in S do
      v:= numboccur(s,R);
      if  V[v] = 0 then V[v]:= s fi
    od:
    convert(V,list); # Robert Israel, Dec 01 2024