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-3 of 3 results.

A167804 Numbers with primitive root -8.

Original entry on oeis.org

5, 23, 25, 29, 47, 53, 71, 101, 125, 149, 167, 173, 191, 197, 239, 263, 269, 293, 311, 317, 359, 383, 389, 461, 479, 503, 509, 529, 557, 599, 625, 647, 653, 677, 701, 719, 743, 773, 797, 821, 839, 841, 863, 887, 941, 983, 1031, 1061, 1109, 1151, 1223, 1229
Offset: 1

Views

Author

T. D. Noe, Nov 12 2009

Keywords

Crossrefs

Cf. A105880 (primes with primitive root -8)

Programs

  • Mathematica
    pr=-8; Select[Range[2,2000], MultiplicativeOrder[pr,# ] == EulerPhi[ # ] &]

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

Original entry on oeis.org

0, 1, 4, 2, 5, 4, 8, 3, 22, 28, 10, 12, 20, 7, 46, 52, 29, 20, 11, 70, 6, 26, 41, 22, 16, 100, 34, 53, 12, 28, 14, 65, 68, 23, 148, 10, 52, 27, 166, 172, 89, 60, 190, 32, 196, 66, 35, 74, 113, 76, 58, 238, 8, 25, 16, 262, 268, 90, 92, 35
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

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

Programs

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

Formula

a(n) = ord(-2,p)/gcd(ord(-2,p),3) for p != 2, where p = prime(n), and ord(a,m) is the multiplicative order of a modulo m. Note that ord(-2,p) = A337878(n) for n > 2.

A141171 Primes of the form -x^2+4*x*y+2*y^2 (as well as of the form 5*x^2+8*x*y+2*y^2).

Original entry on oeis.org

2, 5, 23, 29, 47, 53, 71, 101, 149, 167, 173, 191, 197, 239, 263, 269, 293, 311, 317, 359, 383, 389, 431, 461, 479, 503, 509, 557, 599, 647, 653, 677, 701, 719, 743, 773, 797, 821, 839, 863, 887, 911, 941, 983, 1013, 1031, 1061, 1103, 1109, 1151, 1181, 1223, 1229, 1277, 1301, 1319, 1367
Offset: 1

Views

Author

Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (oscfalgan(AT)yahoo.es), Jun 12 2008

Keywords

Comments

Discriminant is 24. Class is 2. Binary quadratic forms a*x^2 + b*x*y + c*y^2 have discriminant d = b^2 - 4ac and gcd(a, b, c) = 1.
Also primes of form 6*u^2 - v^2. The transformation {u, v} = {y, x - 2*y} yields the form in the title. - Juan Arias-de-Reyna, Mar 19 2011
Members of A141171 but not of A105880: 2, 431, 911, 1013, 1181, ..., . - Robert G. Wilson v, Aug 30 2013
This is also the list of primes p such that p = 2 or p is congruent to 5 or 23 mod 24 - Jean-François Alcover, Oct 28 2016

Examples

			a(4) = 29 because we can write 29 = -1^2 + 4*1*3 + 2*3^2 (or 29 = 5*1^2 + 8*1*2 + 2*2^2).
		

References

  • Z. I. Borevich and I. R. Shafarevich, Number Theory.
  • D. B. Zagier, Zetafunktionen und quadratische Körper.

Crossrefs

Cf. A141170 (d = 24), A105880 (Primes for which -8 is a primitive root.) A038872 (d = 5). A038873 (d = 8). A068228, A141123 (d = 12). A038883 (d = 13). A038889 (d = 17). A141111, A141112 (d = 65).
Cf. also A242665.
For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.

Programs

  • Maple
    N:= 10^5: # to get all terms <= N
    select(t -> isprime(t) and [isolve(6*u^2-v^2=t)]<>[], [2, seq(op([24*i+5,24*i+23]),i=0..floor((N-5)/24))]); # Robert Israel, Sep 28 2014
  • Mathematica
    A141171 = {}; Do[p = -x^2 + 4 * x * y + 2 * y^2; If[p > 0 && PrimeQ@ p, AppendTo[A141171, p]], {x, 25}, {y, 25}]; Take[ Union@ A141171, 57] (* Robert G. Wilson v, Aug 30 2013 *)
    Select[Prime[Range[250]], # == 2 || MatchQ[Mod[#, 24], 5|23]&] (* Jean-François Alcover, Oct 28 2016 *)
Showing 1-3 of 3 results.