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 41-50 of 96 results. Next

A127807 Least positive primitive root of (n-th prime)^2.

Original entry on oeis.org

3, 2, 2, 3, 2, 2, 3, 2, 5, 2, 3, 2, 6, 3, 5, 2, 2, 2, 2, 7, 5, 3, 2, 3, 5, 2, 5, 2, 6, 3, 3, 2, 3, 2, 2, 6, 5, 2, 5, 2, 2, 2, 19, 5, 2, 3, 2, 3, 2, 6, 3, 7, 7, 6, 3, 5, 2, 6, 5, 3, 3, 2, 5, 17, 10, 2, 3, 10, 2, 2, 3, 7, 6, 2, 2, 5, 2, 5, 3, 21, 2, 2, 7, 5, 15, 2, 3, 13, 2, 3, 2, 13, 3, 2, 7, 5, 2, 3, 2, 2
Offset: 1

Views

Author

Artur Jasinski, Jan 29 2007

Keywords

Comments

A055578 lists the indices n such that a(n) differs from A001918(n).

References

  • D. Cohen, R. W. K. Odoni, and W. W. Stothers, On the Least Primitive Root Modulo p^2, Bulletin of the London Mathematical Society 6:1 (March 1974), pp. 42-46.

Crossrefs

Programs

  • Mathematica
    << NumberTheory`NumberTheoryFunctions` Table[PrimitiveRoot[(Prime[n])^2], {n, 1, 100}]
    PrimitiveRoot[Prime[Range[100]]^2] (* Harvey P. Dale, Aug 19 2017 *)

Formula

Cohen, Odoni, & Stothers prove that a(n) < prime(n)^(1/4 + e) for any e > 0 and all large enough n. Kerr, McGown, & Trudgian give an effective version: a(n) < prime(n)^0.99 for all n. - Charles R Greathouse IV, Apr 28 2020

A047933 Consider primes p with least positive primitive root g such that q=p+g is next prime after p; sequence gives values of q.

Original entry on oeis.org

3, 5, 7, 13, 31, 61, 103, 109, 151, 157, 181, 199, 229, 257, 271, 277, 347, 349, 373, 421, 463, 661, 739, 823, 829, 977, 997, 1021, 1031, 1063, 1093, 1231, 1279, 1303, 1429, 1453, 1621, 1669, 1789, 1879, 1933, 1951, 1999, 2029, 2143, 2239, 2269, 2311
Offset: 1

Views

Author

Keywords

Examples

			11 has primitive root 2 and 11+2 = 13 is prime after 11, so 13 is in sequence.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 864.

Crossrefs

Cf. A047934, A047935. See also A001918.

Programs

  • Mathematica
    Total/@Select[{#,PrimitiveRoot[#]}&/@Prime[Range[400]],NextPrime[ First[#]] == Total[#]&]  (* Harvey P. Dale, Feb 18 2011 *)

Extensions

More terms from James Sellers, Dec 22 1999

A047935 Consider primes p with least positive primitive root g such that q=p+g is next prime after p; sequence gives values of g.

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 6, 2, 6, 10, 2, 6, 2, 2, 2, 6, 2, 2, 6, 6, 2, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 6, 2, 6, 2, 6, 6, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 10, 2, 2, 2, 2, 6, 2, 6, 2, 2, 2, 2, 6, 2, 2, 2, 2, 10, 6, 10, 2, 2, 2, 10, 2, 2, 2, 6, 10
Offset: 1

Views

Author

Keywords

Examples

			11 has primitive root 2 and 11+2 = 13 is prime after 11, which contributes a 2 to the sequence.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 864.

Crossrefs

Cf. A047933, A047934. See also A001918.

Programs

  • Mathematica
    f[p_] := {g = PrimitiveRoot[p], p + g == NextPrime[p]};
    A047935 = Select[f /@ Prime /@ Range[1000], #[[2]]& ][[All, 1]](* Jean-François Alcover, Feb 15 2012 *)

Extensions

More terms from James Sellers, Dec 22 1999

A121380 Sums of primitive roots for n (or 0 if n has no primitive roots).

Original entry on oeis.org

0, 1, 2, 3, 5, 5, 8, 0, 7, 10, 23, 0, 26, 8, 0, 0, 68, 16, 57, 0, 0, 56, 139, 0, 100, 52, 75, 0, 174, 0, 123, 0, 0, 136, 0, 0, 222, 114, 0, 0, 328, 0, 257, 0, 0, 208, 612, 0, 300, 200, 0, 0, 636, 156, 0, 0, 0, 348, 886, 0, 488, 216, 0, 0, 0, 0, 669, 0, 0, 0
Offset: 1

Views

Author

Ed Pegg Jr, Jul 25 2006

Keywords

Comments

In Article 81 of his Disquisitiones Arithmeticae (1801), Gauss proves that the sum of all primitive roots (A001918) of a prime p, mod p, equals MoebiusMu[p-1] (A008683). "The sum of all primitive roots is either = 0 (mod p) (when p-1 is divisible by a square), or = +-1 (mod p) (when p-1 is the product of unequal prime numbers; if the number of these is even the sign is positive but if the number is odd, the sign is negative)."

Examples

			The primitive roots of 13 are 2, 6, 7, 11. Their sum is 26, or 0 (mod 13). By Gauss, 13-1=12 is thus divisible by a square number.
		

References

  • J. C. F. Gauss, Disquisitiones Arithmeticae, 1801.

Crossrefs

Cf. A001918, A008683, A046147 (primitive roots of n), A088144, A088145, A123475, A222009.

Programs

  • Mathematica
    primitiveRoots[n_] := If[n == 1, {}, If[n == 2, {1}, Select[Range[2, n-1], MultiplicativeOrder[#, n] == EulerPhi[n] &]]]; Table[Total[primitiveRoots[n]], {n,100}]
    (* From version 10 up: *)
    Table[Total @ PrimitiveRootList[n], {n, 1, 100}] (* Jean-François Alcover, Oct 31 2016 *)

A127808 Least positive primitive root of (n-th prime)^3.

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 2, 5, 2, 3, 2, 6, 3, 5, 2, 2, 2, 2, 7, 5, 3, 2, 3, 5, 2, 5, 2, 6, 3, 3, 2, 3, 2, 2, 6, 5, 2, 5, 2, 2, 2, 19, 5, 2, 3, 2, 3, 2, 6, 3, 7, 7, 6, 3, 5, 2, 6, 5, 3, 3, 2, 5, 17, 10, 2, 3, 10, 2, 2, 3, 7, 6, 2, 2, 5, 2, 5, 3, 21, 2, 2, 7, 5, 15, 2, 3, 13, 2, 3, 2, 13, 3, 2, 7, 5, 2, 3, 2, 2
Offset: 2

Views

Author

Artur Jasinski, Jan 29 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Table[PrimitiveRoot[(Prime[n])^3], {n, 2, 100}]
    PrimitiveRoot[Prime[Range[2,100]]^3] (* Harvey P. Dale, May 07 2013 *)

A127809 Least positive primitive root of (n-th prime)^4.

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 2, 5, 2, 3, 2, 6, 3, 5, 2, 2, 2, 2, 7, 5, 3, 2, 3, 5, 2, 5, 2, 6, 3, 3, 2, 3, 2, 2, 6, 5, 2, 5, 2, 2, 2, 19, 5, 2, 3, 2, 3, 2, 6, 3, 7, 7, 6, 3, 5, 2, 6, 5, 3, 3, 2, 5, 17, 10, 2, 3, 10, 2, 2, 3, 7, 6, 2, 2, 5, 2, 5, 3, 21, 2, 2, 7, 5, 15, 2, 3, 13, 2, 3, 2, 13, 3, 2, 7, 5, 2, 3, 2, 2
Offset: 2

Views

Author

Artur Jasinski, Jan 29 2007

Keywords

Crossrefs

Programs

  • Mathematica
    << NumberTheory`NumberTheoryFunctions` Table[PrimitiveRoot[(Prime[n])^4], {n, 2, 100}]
    Table[PrimitiveRoot[Prime[n]^4],{n,2,100}] (* Primitive Root is now part of the core functions in Mathematica *) (* Harvey P. Dale, Oct 11 2017 *)

A127810 Least positive primitive root of (n-th prime)^5.

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 2, 5, 2, 3, 2, 6, 3, 5, 2, 2, 2, 2, 7, 5, 3, 2, 3, 5, 2, 5, 2, 6, 3, 3, 2, 3, 2, 2, 6, 5, 2, 5, 2, 2, 2, 19, 5, 2, 3, 2, 3, 2, 6, 3, 7, 7, 6, 3, 5, 2, 6, 5, 3, 3, 2, 5, 17, 10, 2, 3, 10, 2, 2, 3, 7, 6, 2, 2, 5, 2, 5, 3, 21, 2, 2, 7, 5, 15, 2, 3, 13, 2, 3, 2, 13, 3, 2, 7, 5, 2, 3, 2, 2
Offset: 2

Views

Author

Artur Jasinski, Jan 29 2007

Keywords

Crossrefs

Programs

  • Mathematica
    << NumberTheory`NumberTheoryFunctions` Table[PrimitiveRoot[(Prime[n])^5], {n, 2, 100}]

A222717 Primes p whose smallest positive quadratic nonresidue is not a primitive root of p.

Original entry on oeis.org

2, 41, 43, 103, 109, 151, 157, 191, 229, 251, 271, 277, 283, 307, 311, 313, 331, 337, 367, 397, 409, 439, 457, 499, 571, 643, 683, 691, 727, 733, 739, 761, 769, 811, 911, 919, 967, 971, 991, 997, 1013, 1021, 1031, 1051, 1069, 1093, 1151, 1163, 1181, 1289
Offset: 1

Views

Author

Jonathan Sondow, Mar 12 2013

Keywords

Comments

Same as primes p such that if q is the smallest positive quadratic nonresidue mod p, then either q == 0 mod p or q^k == 1 mod p for some positive integer k < p-1.
A primitive root of an odd prime p is always a quadratic nonresidue mod p. (Proof. If g == x^2 mod p, then g^((p-1)/2) == x^(p-1) == 1 mod p, and so g is not a primitive root of p.) But a quadratic nonresidue mod p may or may not be a primitive root of p.
Supersequence of A047936 = primes whose smallest positive primitive root is not prime. (Proof. If p is not in A222717, then the smallest positive quadratic nonresidue of p is a primitive root g. Since the smallest positive quadratic nonresidue is always a prime, g is prime. But since all primitive roots are quadratic nonresidues, g is the smallest positive primitive root of p. Hence p is not in A047936.)
See A001918 (least positive primitive root of the n-th prime) and A053760 (smallest positive quadratic nonresidue of the n-th prime) for references and additional comments and links.

Examples

			The smallest positive quadratic nonresidue of 2 is 2 itself, and 2 is not a primitive root of 2, so 2 is a member.
The smallest positive quadratic nonresidue of 41 is 3, and 3 is not a primitive root of 41, so 41 is a member.
		

Crossrefs

Programs

  • Mathematica
    nn = 300; NR = (Table[p = Prime[n]; First[ Select[ Range[p], JacobiSymbol[#, p] != 1 &]], {n, nn}]); Select[ Prime[ Range[nn]], Mod[ NR[[PrimePi[#]]], #] == 0 || MultiplicativeOrder[ NR[[PrimePi[#]]], #] < # - 1 &]

A247176 Largest number of maximal order mod n.

Original entry on oeis.org

0, 1, 2, 3, 3, 5, 5, 7, 5, 7, 8, 11, 11, 5, 13, 13, 14, 11, 15, 17, 19, 19, 21, 23, 23, 19, 23, 23, 27, 23, 24, 29, 29, 31, 33, 31, 35, 33, 37, 37, 35, 31, 34, 41, 43, 43, 45, 43, 47, 47, 46, 45, 51, 47, 53, 53, 53, 55, 56, 53, 59, 55, 61, 61, 63, 61, 63, 65, 67, 67, 69, 67
Offset: 1

Views

Author

Eric Chen, Nov 29 2014

Keywords

Examples

			a(18) = 11 because the largest possible order mod 18 is 6, and because 16, 15, 14, and 12 are not coprime to 18, and the orders of 17 and 13 to mod 18 are 2 and 3, not the largest possible order, and the order of 11 to mod 18 is 6, so a(18) = 11.
		

Crossrefs

Cf. A002322 (orders), same as A046146 for n with primitive roots, A071894 (for primes).

Programs

  • Mathematica
    prms={}; f[n_] = Block[If[MultiplicativeOrder[p, n]=CarmichaelLambda[n], Join[prms, p]]; prms[-1]]; Array[f, 128]
  • PARI
    carmichaellambda(n)=lcm(znstar(n)[2]);
    for(i=1, 128, p=0; for(q=1, i-1, if(gcd(q, i)==1&&znorder(Mod(q, i))==carmichaellambda(i), p=q)); print1(p", "))

Extensions

a(68) corrected by Eric Chen, Jun 01 2015

A250211 Square array read by antidiagonals: A(m,n) = multiplicative order of m mod n, or 0 if m and n are not coprime.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 0, 0, 0, 1, 1, 1, 1, 2, 4, 1, 1, 0, 2, 0, 4, 0, 1, 1, 1, 0, 1, 2, 0, 3, 1, 1, 0, 1, 0, 0, 0, 6, 0, 1, 1, 1, 2, 2, 1, 2, 3, 2, 6, 1, 1, 0, 0, 0, 4, 0, 6, 0, 0, 0, 1, 1, 1, 1, 1, 4, 1, 2, 2, 3, 4, 10, 1, 1, 0, 2, 0, 2, 0, 0, 0, 6, 0, 5, 0, 1, 1, 1, 0, 2, 0, 0, 1, 2, 0, 0, 5, 0, 12, 1
Offset: 1

Views

Author

Eric Chen, Dec 29 2014

Keywords

Comments

Read by antidiagonals:
m\n 1 2 3 4 5 6 7 8 9 10 11 12 13
1 1 1 1 1 1 1 1 1 1 1 1 1 1
2 1 0 2 0 4 0 3 0 6 0 10 0 12
3 1 1 0 2 4 0 6 2 0 4 5 0 3
4 1 0 1 0 2 0 3 0 3 0 5 0 6
5 1 1 2 1 0 2 6 2 6 0 5 2 4
6 1 0 0 0 1 0 2 0 0 0 10 0 12
7 1 1 1 2 4 1 0 2 3 4 10 2 12
8 1 0 2 0 4 0 1 0 2 0 10 0 4
9 1 1 0 1 2 0 3 1 0 2 5 0 3
10 1 0 1 0 0 0 6 0 1 0 2 0 6
11 1 1 2 2 1 2 3 2 6 1 0 2 12
12 1 0 0 0 4 0 6 0 0 0 1 0 2
13 1 1 1 1 4 1 2 2 3 4 10 1 0
etc.
A(m,n) = Least k>0 such that m^k=1 (mod n), or 0 if no such k exists.
It is easy to prove that column n has period n.
A(1,n) = 1, A(m,1) =1.
If A(m,n) differs from 0, it is period length of 1/n in base m.
The maximum number in column n is psi(n) (A002322(n)), and all numbers in column n (except 0) divide psi(n), and all factors of psi(n) are in column n.
Except the first row, every row contains all natural numbers.

Examples

			A(3,7) = 6 because:
3^0 = 1 (mod 7)
3^1 = 3 (mod 7)
3^2 = 2 (mod 7)
3^3 = 6 (mod 7)
3^4 = 4 (mod 7)
3^5 = 5 (mod 7)
3^6 = 1 (mod 7)
...
And the period is 6, so A(3,7) = 6.
		

Crossrefs

Programs

  • Maple
    f:= proc(m,n)
      if igcd(m,n) <> 1 then 0
      elif n=1 then 1
      else numtheory:-order(m,n)
      fi
    end proc:
    seq(seq(f(t-j,j),j=1..t-1),t=2..65); # Robert Israel, Dec 30 2014
  • Mathematica
    a250211[m_, n_] = If[GCD[m, n] == 1, MultiplicativeOrder[m, n], 0]
    Table[a250211[t-j, j], {t, 2, 65}, {j, 1, t-1}]
Previous Showing 41-50 of 96 results. Next