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.

Showing 1-5 of 5 results.

A167800 Numbers with primitive root -4.

Original entry on oeis.org

3, 7, 9, 11, 19, 23, 27, 47, 49, 59, 67, 71, 79, 81, 83, 103, 107, 121, 131, 139, 163, 167, 179, 191, 199, 211, 227, 239, 243, 263, 271, 311, 343, 347, 359, 361, 367, 379, 383, 419, 443, 463, 467, 479, 487, 491, 503, 523, 529, 547, 563, 587, 599, 607, 619, 647
Offset: 1

Views

Author

T. D. Noe, Nov 12 2009

Keywords

Crossrefs

Cf. A105876 (primes with primitive root -4)

Programs

  • Mathematica
    pr=-4; Select[Range[2,2000], MultiplicativeOrder[pr,# ] == EulerPhi[ # ] &]
  • PARI
    is(n)=if(n%2==0, return(0)); my(p=eulerphi(n)); znorder(Mod(-4, n), p)==p \\ Charles R Greathouse IV, Jan 04 2025

A216371 Odd primes with one coach: primes p such that A135303((p-1)/2) = 1.

Original entry on oeis.org

3, 5, 7, 11, 13, 19, 23, 29, 37, 47, 53, 59, 61, 67, 71, 79, 83, 101, 103, 107, 131, 139, 149, 163, 167, 173, 179, 181, 191, 197, 199, 211, 227, 239, 263, 269, 271, 293, 311, 317, 347, 349, 359, 367, 373, 379, 383, 389, 419, 421, 443, 461, 463, 467, 479, 487
Offset: 1

Views

Author

Gary W. Adamson, Sep 05 2012

Keywords

Comments

Given that prime p has only one coach, the corresponding value of k in A003558 must be (p-1)/2, and vice versa. Using the Coach theorem of Jean Pedersen et al., phi(b) = 2 * c * k, with b odd. Let b = p, prime. Then phi(p) = (p-1), and k must be (p-1)/2 iff c = 1. Or, phi(p) = (p-1) = 2 * 1 * (p-1)/2.
Conjecture relating to odd integers: iff an integer is in the set A216371 and is either of the form 4q - 1 or 4q + 1, (q>0); then the top row of its coach (cf. A003558) is composed of a permutation of the first q odd integers. Examples: 11 is of the form 4q - 1, q = 3; with the top row of its coach [1, 5, 3]. 13 is of the form 4q + 1, q = 3; so has a coach of [1, 3, 5]. 37 is of the form 4q + 1, q = 9; so has a coach with the top row composed of a permutation of the first 9 odd integers: [1, 9, 7, 15, 11, 13, 3, 17, 5]. - Gary W. Adamson, Sep 08 2012
Odd primes p such that 2^m is not congruent to 1 or -1 (mod p) for 0 < m < (p-1)/2. - Charles R Greathouse IV, Sep 15 2012
These are also the odd primes a(n) for which there is only one periodic Schick sequence (see the reference, and also the Brändli and Beyne link, eq. (2) for the recurrence but using various inputs. See also a comment in A332439). This sequence has primitive period length (named pes in Schick's book) A003558((a(n)-1)/2) = A005034(a(n)) = A000010(a(n))/2 = (a(n) - 1)/2, for n >= 1. - Wolfdieter Lang, Apr 09 2020
From Jianing Song, Dec 24 2022: (Start)
Primes p such that the multiplicative order of 4 modulo p is (p-1)/2. Proof of equivalence: let ord(a,k) be the multiplicative of a modulo k.
If 2^m is not 1 or -1 (mod p) for 0 < m < (p-1)/2, then ord(2,p) is either p-1 or (p-1)/2. If ord(2,p) = p-1, then ord(4,p) = (p-1)/2. If ord(2,p) = (p-1)/2, then p == 3 (mod 4), otherwise 2^((p-1)/4) == -1 (mod p), so ord(4,p) = (p-1)/2.
Conversely, if ord(4,p) = (p-1)/2, then ord(2,p) = p-1, or ord(2,p) = (p-1)/2 and p == 3 (mod 4) (otherwise ord(4,p) = (p-1)/4). In the first case, (p-1)/2 is the smallest m > 0 such that 2^m == +-1 (mod p); in the second case, since (p-1)/2 is odd, 2^m == -1 (mod p) has no solution. In either case, so 2^m is not 1 or -1 (mod p) for 0 < m < (p-1)/2.
{(a(n)-1)/2} is the sequence of indices of fixed points of A053447.
A prime p is a term if and only if one of the two following conditions holds: (a) 2 is a primitive root modulo p; (b) p == 3 (mod 4), and the multiplicative order of 2 modulo p is (p-1)/2 (in this case, we have p == 7 (mod 8) since 2 is a quadratic residue modulo p). (End)
From Jianing Song, Aug 11 2023: (Start)
Primes p such that 2 or -2 (or both) is a primitive root modulo p. Proof of equivalence: if ord(2,p) = p-1, then clearly ord(4,p) = (p-1)/2. If ord(-2,p) = p-1, then we also have ord(4,p) = (p-1)/2. Conversely, suppose that ord(4,p) = (p-1)/2, then ord(2,p) = p-1 or (p-1)/2, and ord(-2,p) = p-1 or (p-1)/2. If ord(2,p) = ord(-2,p) = (p-1)/2, then we have that (p-1)/2 is odd and (-1)^((p-1)/2) == 1 (mod p), a contradiction.
A prime p is a term if and only if one of the two following conditions holds: (a) -2 is a primitive root modulo p; (b) p == 3 (mod 4), and the multiplicative order of -2 modulo p is (p-1)/2 (in this case, we have p == 3 (mod 8) since -2 is a quadratic residue modulo p). (End)
No terms are congruent to 1 modulo 8, since otherwise we would have 4^((p-1)/4) = (+-2)^((p-1)/2) == 1 (mod p). - Jianing Song, May 14 2024
The n-th prime A000040(n) is a term iff A376010(n) = 2. - Max Alekseyev, Sep 05 2024

Examples

			Prime 23 has a k value of 11 = (23 - 1)/2 (Cf. A003558(11)). It follows that 23 has only one coach (A135303(11) = 1). 23 is thus in the set. On the other hand 31 is not in the set since A135303(15) shows 3 coaches, with A003558(15) = 5.
13 is in the set since A135303(6) = 1; but 17 isn't since A135303(8) = 2.
		

References

  • P. Hilton and J. Pedersen, A Mathematical Tapestry, Demonstrating the Beautiful Unity of Mathematics, 2010, Cambridge University Press, pages 260-264.
  • Carl Schick, Trigonometrie und unterhaltsame Zahlentheorie, Bokos Druck, Zürich, 2003 (ISBN 3-9522917-0-6). Tables 3.1 to 3.10, for odd p = 3..113 (with gaps), pp. 158-166.

Crossrefs

Union of A001122 and A105874.
A105876 is the subsequence of terms congruent to 3 modulo 4.
Complement of A268923 in the set of odd primes.
Cf. A082654 (order of 4 mod n-th prime), A000010, A000040, A003558, A005034, A053447, A054639, A135303, A364867, A376010.

Programs

  • Maple
    isA216371 := proc(n)
        if isprime(n) then
            if A135303((n-1)/2) = 1 then
                true;
            else
                false;
            end if;
        else
            false;
        end if;
    end proc:
    A216371 := proc(n)
        local p;
        if n = 1 then
            3;
        else
            p := nextprime(procname(n-1)) ;
            while true do
                if isA216371(p) then
                    return p;
                end if;
                p := nextprime(p) ;
            end do:
        end if;
    end proc:
    seq(A216371(n),n=1..40) ; # R. J. Mathar, Dec 01 2014
  • Mathematica
    Suborder[a_, n_] := If[n > 1 && GCD[a, n] == 1, Min[MultiplicativeOrder[a, n, {-1, 1}]], 0]; nn = 150; Select[Prime[Range[2, nn]], EulerPhi[#]/(2*Suborder[2, #]) == 1 &] (* T. D. Noe, Sep 18 2012 *)
    f[p_] := Sum[Cos[2^n Pi/((2 p + 1))], {n, p}]; 1 + 2 * Select[Range[500], Reduce[f[#] == -1/2, Rationals] &]; (* Gerry Martens, May 01 2016 *)
  • PARI
    is(p)=for(m=1,p\2-1, if(abs(centerlift(Mod(2,p)^m))==1, return(0))); p>2 && isprime(p) \\ Charles R Greathouse IV, Sep 18 2012
    
  • PARI
    is(p) = isprime(p) && (p>2) && znorder(Mod(4,p)) == (p-1)/2 \\ Jianing Song, Dec 24 2022

Formula

a(n) = 2*A054639(n) + 1. - L. Edson Jeffery, Dec 18 2012

A380531 a(n) is the multiplicative order of -4 modulo prime(n); a(1) = 0 for completion.

Original entry on oeis.org

0, 2, 1, 6, 10, 3, 4, 18, 22, 7, 10, 9, 5, 14, 46, 13, 58, 15, 66, 70, 18, 78, 82, 22, 24, 25, 102, 106, 9, 7, 14, 130, 17, 138, 37, 30, 13, 162, 166, 43, 178, 45, 190, 48, 49, 198, 210, 74, 226, 19, 58, 238, 12, 50, 8, 262, 67, 270, 23, 70
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Comments

a(n) divides (p-1)/4 if p = prime(n) == 1 (mod 4), since (-4)^((p-1)/4) == (+-1+-i)^(p-1) == 1 (mod p), where i^2 == -1 (mod p).

Crossrefs

Cf. A105876 (primes having primitive root -4).
Cf. bases -2..-10: A337878 (if first term 1), A380482, this sequence, A380532, A380533, A380540, A380541, A380542, A385222.

Programs

  • Mathematica
    A380531[n_] := If[n == 1, 0, MultiplicativeOrder[-4, Prime[n]]];
    Array[A380531, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-4}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A302141 Multiplicative order of 16 mod 2n+1.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 3, 1, 2, 9, 3, 11, 5, 9, 7, 5, 5, 3, 9, 3, 5, 7, 3, 23, 21, 2, 13, 5, 9, 29, 15, 3, 3, 33, 11, 35, 9, 5, 15, 39, 27, 41, 2, 7, 11, 3, 5, 9, 12, 15, 25, 51, 3, 53, 9, 9, 7, 11, 3, 6, 55, 5, 25, 7, 7, 65, 9, 9, 17, 69, 23, 15, 7, 21, 37, 15, 6, 5, 13, 13, 33, 81, 5, 83, 39, 9, 43, 15, 29, 89, 45, 15, 9, 10, 9, 95, 24, 3, 49, 99, 33
Offset: 0

Views

Author

Jianing Song, Apr 02 2018

Keywords

Comments

Reptend length of 1/(2n+1) in hexadecimal.
a(n) <= n; it appears that equality holds if and only if n=1 or is in A163778. - Robert Israel, Apr 02 2018
From Jianing Song, Dec 24 2022: (Start)
a(n) <= psi(2*n+1)/2 <= n. a(n) = psi(2*n+1)/2 if and only if the multiplicative order of 2 modulo 2*n+1 is psi(2*n+1) or psi(2*n+1)/2, and psi(2*n+1) == 2 (mod 4).
a(n) = n if and only if A053447(n) = n and A053447(n) is odd. As a result, a(n) = n if and only if 2*n+1 = p is a prime congruent to 3 modulo 4, and the multiplicative order of 2 modulo p is p-1 or (p-1)/2 (p-1 if p == 3 (mod 8), (p-1)/2 if p == 7 (mod 8)). Such primes p are listed in A105876. (End)

Examples

			The fraction 1/13 is equal to 0.13B13B... in hexadecimal, so a(6) = 3.
		

Crossrefs

Programs

  • GAP
    List([0..100],n->OrderMod(16,2*n+1)); # Muniru A Asiru, Feb 25 2019
  • Magma
    [1] cat [ Modorder(16, 2*n+1): n in [1..100]]; // Vincenzo Librandi, Apr 03 2018
    
  • Maple
    seq(numtheory:-order(16, 2*n+1), n=0..100); # Robert Israel, Apr 02 2018
  • Mathematica
    Table[MultiplicativeOrder[16, 2 n + 1], {n, 0, 150}] (* Vincenzo Librandi, Apr 03 2018 *)
  • PARI
    a(n) = znorder(Mod(16, 2*n+1)) \\ Felix Fröhlich, Apr 02 2018
    

Formula

a(n) = A002326(n)/gcd(A002326(n),4) = A053447(n)/gcd(A053447(n),2). [Corrected by Jianing Song, Dec 24 2022]

A114564 Numbers of the form n=12s+7, where q=4s+3 is a prime for which the order of 2 is either q-1 or (q-1)/2.

Original entry on oeis.org

7, 19, 31, 55, 67, 139, 175, 199, 211, 235, 247, 307, 319, 391, 415, 487, 499, 535, 571, 595, 631, 679, 715, 787, 811, 931, 1039, 1075, 1099, 1135, 1147, 1255, 1327, 1387, 1399, 1435, 1459, 1471, 1507, 1567, 1639, 1687, 1759, 1795, 1819, 1855
Offset: 1

Views

Author

R. K. Guy, Feb 11 2006

Keywords

References

  • L. Heffter, Über das Problem der Nachbargebiete, Math. Ann., 38 (1891) 477-508.
  • G. Ringel, Map Color Theorem, Springer, 1974, p. 6.

Crossrefs

Equals 3*A105876(n) - 2.
Showing 1-5 of 5 results.