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.

Previous Showing 31-35 of 35 results.

A251865 Irregular triangle read by rows in which row n lists the maximal-order elements (

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 5, 3, 5, 3, 5, 7, 2, 5, 3, 7, 2, 6, 7, 8, 5, 7, 11, 2, 6, 7, 11, 3, 5, 2, 7, 8, 13, 3, 5, 11, 13, 3, 5, 6, 7, 10, 11, 12, 14, 5, 11, 2, 3, 10, 13, 14, 15, 3, 7, 13, 17, 2, 5, 10, 11, 17, 19, 7, 13, 17, 19, 5, 7, 10, 11, 14, 15, 17, 19, 20, 21, 5, 7, 11, 13, 17, 19, 23, 2, 3, 8, 12, 13, 17, 22, 23
Offset: 1

Views

Author

Eric Chen, May 20 2015

Keywords

Comments

Conjecture: Triangle contains all nonsquare numbers infinitely many times.
The orders of the numbers in n-th row mod n are equal to A002322(n).
First and last terms of the n-th row are A111076(n) and A247176(n).
Length of the n-th row is A111725(n).
The n-th row is the same as A046147 for n with primitive roots.

Examples

			Read by rows:
n     maximal-order elements (<n) mod n
1     0
2     1
3     2
4     3
5     2, 3
6     5
7     3, 5
8     3, 5, 7
9     2, 5
10    3, 7
11    2, 6, 7, 8
12    5, 7, 11
13    2, 6, 7, 11
14    3, 5
15    2, 7, 8, 13
16    3, 5, 11, 13
17    3, 5, 6, 7, 10, 11, 12, 14
18    5, 11
19    2, 3, 10, 13, 14, 15
20    3, 7, 13, 17
etc.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Select[Range[0, n-1], GCD[#, n] == 1 && MultiplicativeOrder[#, n] == CarmichaelLambda[n]& ]; Table[a[n], {n, 1, 36}]
  • PARI
    c(n)=lcm((znstar(n))[2])
    a(n)=for(k=0,n-1,if(gcd(k, n)==1 && znorder(Mod(k,n))==c(n), print1(k, ",")))
    n=1; while(n<37, a(n); n++)

A266988 The indices of primes for which the average of the primitive roots is < p/2.

Original entry on oeis.org

11, 14, 19, 48, 75, 94, 114, 115, 117, 124, 149, 153, 155, 177, 182, 224, 272, 300, 324, 348, 351, 365, 370, 403, 465, 510, 515, 522, 531, 546, 555, 578, 614, 634, 667, 677, 683, 707, 748, 765, 788, 795, 802, 808, 832, 850, 871, 876, 886, 888, 966, 980
Offset: 1

Views

Author

Dimitri Papadopoulos, Jan 08 2016

Keywords

Comments

These primes are all of the form p==3 (mod 4). (conjecture)

Examples

			p(a[1])=p(11)=31. The primitive roots of 31 are 3, 11, 12, 13, 17, 21, 22, and 24.
Their average is (3+11+12+13+17+21+22+24)/phi(30)=123/8<31/2.
		

Crossrefs

Programs

  • Mathematica
    A = Table[Total[Flatten[Position[Table[MultiplicativeOrder[i, Prime[k]], {i, Prime[k] - 1}],Prime[k] - 1]]]/(EulerPhi[Prime[k] - 1] Prime[k]/2), {k, 1, 1000}];Flatten[Position[A, _?(# < 1 &)]]

A268397 a(n) is the smallest prime with at least n consecutive primitive roots.

Original entry on oeis.org

2, 5, 11, 37, 53, 83, 83, 269, 269, 467, 467, 1187, 1559, 1559, 1559, 6803, 6803, 6803, 10559, 10559, 10559, 35279, 38639, 38639, 38639, 38639, 38639
Offset: 1

Views

Author

Dimitri Papadopoulos, Feb 03 2016

Keywords

Examples

			a(4)=37. 37 has the primitive roots 2, 5, 13, 15, 17, 18, 19, 20, 22, 24, 32, and 35 of which 17, 18, 19, and 20 are consecutive.
		

Crossrefs

Cf. A060749, A261438 (has "exactly" instead of "at least").

Programs

  • Mathematica
    PrimRoot[n_] :=Flatten[Position[Table[MultiplicativeOrder[i, n], {i, n - 1}],n - 1]];t = {};For[targ = 1, targ <= 22, targ++,flag = 0; For[n = 1, n < 1500, n++,prs = PrimRoot[Prime[n]];numprs = EulerPhi[Prime[n] - 1]; If[targ > numprs, ,For[m = 1, m <= numprs + 1 - targ, m++,temp = Take[prs, {m, m + targ - 1}];If[temp[[1]] + targ - 1 == temp[[targ]] && flag == 0,t = Append[t, Prime[n]]; flag = 1];If[flag == 1, Break[]];]; If[flag == 1, Break[]];];If[flag == 1, Break[]];]]; t
    Join[{2},Module[{prl=Table[{p,Max[Length/@Select[Split[ Differences[ PrimitiveRootList[ p]]], #[[1]]==1&]]},{p,Prime[Range[1500]]}]},Table[ SelectFirst[ prl, #[[2]]>=k&],{k,20}]][[All, 1]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 23 2019 *)

Extensions

More terms from Harvey P. Dale, Aug 23 2019

A268629 Primes p that have no squareful primitive roots less than p.

Original entry on oeis.org

3, 5, 7, 13, 17, 19, 23, 31, 41, 43, 47, 61, 71, 73, 79, 97, 103, 127, 191, 193, 223, 239, 241, 311, 313, 337, 409, 433, 439, 457, 479, 601, 719, 769, 839, 911, 1009, 1031, 1033, 1129, 1151, 1201, 1249, 1319, 1321, 1559, 1801, 2089, 2281, 2521, 2689, 2999, 3049, 3361, 3529, 3889
Offset: 1

Views

Author

Michel Marcus, Feb 09 2016

Keywords

Examples

			The primitive roots of 7 less than 7 are 3 and 5. None of them are squareful so 7 is in the sequence.
8 is a primitive root of 11, and 8 is squareful, so 11 is not in the sequence.
		

Crossrefs

Programs

  • Maple
    N:= 10^6: # for terms <= N
    S:= {1}: p:= 1:
    do
      p:= nextprime(p);
      if p^2 > N then break fi;
      S:= S union map(t -> seq(t*p^i, i=2..floor(log[p](N/t))), select(`<=`,S,N/p^2));
    od:
    S:= sort(convert(S,list)):
    nS:= nops(S):
    filter:= proc(p) local i;
      if not isprime(p) then return false fi;
      for i from 1 to nS while S[i] < p do
        if numtheory:-order(S[i],p) = p-1 then return false fi
      od;
      true
    end proc:
    select(filter, [seq(i,i=3..N,2)]); # Robert Israel, Oct 27 2020
  • Mathematica
    selQ[p_] := NoneTrue[PrimitiveRootList[p], #

    = 2&]&]; Select[Prime[Range[2, 500]], selQ] (* Jean-François Alcover, Sep 28 2018 *)

  • PARI
    ar(p) = my(r, pr, j); r=vector(eulerphi(p-1)); pr=znprimroot(p); for(i=1, p-1, if(gcd(i, p-1)==1, r[j++]=lift(pr^i))); vecsort(r) ; \\ from A060749
    isok(p) = {my(v = ar(p)); for (i=1, #v, if (ispowerful(v[i]), return(0));); 1;}
    lista(nn) = forprime(p=1, nn, if (isok(p), print1(p, ", ")));
    
  • Python
    from functools import cache
    from math import gcd
    from itertools import count, islice
    from sympy import factorint, prime, n_order
    @cache
    def is_squareful(n): return n == 1 or min(factorint(n).values()) > 1
    def A268629_gen(): # generator of terms
        for n in count(1):
            p = prime(n)
            for i in range(1,p):
                if gcd(i,p) == 1 and is_squareful(i) and n_order(i, p)==p-1:
                    break
            else:
                yield p
    A268629_list = list(islice(A268629_gen(),20)) # Chai Wah Wu, Sep 14 2022

A113771 Largest gap between primitive roots of n-th prime.

Original entry on oeis.org

2, 3, 4, 5, 5, 4, 6, 7, 7, 5, 10, 8, 12, 12, 7, 4, 6, 8, 8, 9, 10, 21, 8, 6, 15, 8, 14, 7, 12, 7, 12, 10, 7, 12, 5, 15, 10, 11, 7, 7, 7, 13, 21, 11, 8, 14, 15, 12, 8, 13, 7, 11, 17, 9, 7, 8, 9, 15, 13, 16, 10, 10, 12, 19, 20, 6, 22, 20, 9, 12, 7, 9, 15, 9, 18, 9, 9, 19, 13, 42, 10, 17, 12, 10
Offset: 1

Views

Author

Keywords

Examples

			For n=6, p_6=13, the primitive roots are 2,6,7,11, with largest gap 11-7=4. For n=5, p_5=11, the primitive roots are 2,6,7,8, with largest gap 2-8=5 (mod 11).
		

References

  • R. Osborn, Tables of All Primitive Roots of Odd Primes Less Than 1000, Univ. Texas Press, 1961.

Crossrefs

Cf. A060749 (table), A001918 (least).
Previous Showing 31-35 of 35 results.