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

A211244 Order of 8 mod n-th prime: least k such that prime(n) divides 8^k-1.

Original entry on oeis.org

0, 2, 4, 1, 10, 4, 8, 6, 11, 28, 5, 12, 20, 14, 23, 52, 58, 20, 22, 35, 3, 13, 82, 11, 16, 100, 17, 106, 12, 28, 7, 130, 68, 46, 148, 5, 52, 54, 83, 172, 178, 60, 95, 32, 196, 33, 70, 37, 226, 76, 29, 119, 8, 50, 16, 131, 268, 45, 92, 70, 94, 292, 34, 155, 52
Offset: 1

Views

Author

T. D. Noe, Apr 11 2012

Keywords

Crossrefs

Cf. A053451 (order of 8 mod 2n+1), A019338 (full reptend primes in base 8).

Programs

  • GAP
    A000040:=Filtered([1..350],IsPrime);;
    List([1..Length(A000040)],n->OrderMod(8,A000040[n])); # Muniru A Asiru, Feb 06 2019
    
  • Mathematica
    nn = 8; Table[If[Mod[nn, p] == 0, 0, MultiplicativeOrder[nn, p]], {p, Prime[Range[100]]}]
  • PARI
    a(n,{base=8}) = my(p=prime(n)); if(base%p, znorder(Mod(base,p)), 0) \\ Jianing Song, May 13 2024

Formula

a(n) = A014664(n)/gcd(3, A014664(n)). - Jianing Song, May 13 2024

A167796 Numbers with primitive root 8.

Original entry on oeis.org

3, 5, 11, 25, 29, 53, 59, 83, 101, 107, 121, 125, 131, 149, 173, 179, 197, 227, 269, 293, 317, 347, 389, 419, 443, 461, 467, 491, 509, 557, 563, 587, 625, 653, 659, 677, 701, 773, 797, 821, 827, 841, 941, 947, 1019, 1061, 1091, 1109, 1187, 1229, 1259, 1277
Offset: 1

Views

Author

T. D. Noe, Nov 12 2009

Keywords

Crossrefs

Cf. A019338 (primes with primitive root 8)

Programs

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

A105874 Primes for which -2 is a primitive root.

Original entry on oeis.org

5, 7, 13, 23, 29, 37, 47, 53, 61, 71, 79, 101, 103, 149, 167, 173, 181, 191, 197, 199, 239, 263, 269, 271, 293, 311, 317, 349, 359, 367, 373, 383, 389, 421, 461, 463, 479, 487, 503, 509, 541, 557, 599, 607, 613, 647, 653, 661, 677, 701, 709, 719, 743, 751, 757, 773, 797
Offset: 1

Views

Author

N. J. A. Sloane, Apr 24 2005

Keywords

Comments

Also primes for which (p-1)/2 (==-1/2 mod p) is a primitive root. [Joerg Arndt, Jun 27 2011]

Crossrefs

Programs

  • Maple
    with(numtheory); f:=proc(n) local t1,i,p; t1:=[]; for i from 1 to 500 do p:=ithprime(i); if order(n,p) = p-1 then t1:=[op(t1),p]; fi; od; t1; end; f(-2);
  • Mathematica
    pr=-2; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == #-1 &] (* N. J. A. Sloane, Jun 01 2010 *)
    a[p_,q_]:=Sum[2 Cos[2^n Pi/((2 q+1) (2 p+1))], {n,1,2 q p}];
    Select[Range[400], Reduce[a[#, 1] == 1, Integers] &];
    2 % + 1 (* Gerry Martens, Apr 28 2015 *)
  • PARI
    forprime(p=3,10^4,if(p-1==znorder(Mod(-2,p)),print1(p", "))); /* Joerg Arndt, Jun 27 2011 */
    
  • Python
    from sympy import n_order, nextprime
    from itertools import islice
    def A105874_gen(startvalue=3): # generator of terms >= startvalue
        p = max(startvalue-1,2)
        while (p:=nextprime(p)):
            if n_order(-2,p) == p-1:
                yield p
    A105874_list = list(islice(A105874_gen(),20)) # Chai Wah Wu, Aug 11 2023

Formula

Let a(p,q)=sum(n=1,2*p*q,2*cos(2^n*Pi/((2*q+1)*(2*p+1)))). Then 2*p+1 is a prime belonging to this sequence when a(p,1)==1. - Gerry Martens, May 21 2015

A084865 Primes of the form 2x^2 + 3y^2.

Original entry on oeis.org

2, 3, 5, 11, 29, 53, 59, 83, 101, 107, 131, 149, 173, 179, 197, 227, 251, 269, 293, 317, 347, 389, 419, 443, 461, 467, 491, 509, 557, 563, 587, 653, 659, 677, 683, 701, 773, 797, 821, 827, 941, 947, 971, 1013, 1019, 1061, 1091, 1109, 1163, 1181, 1187
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 10 2003

Keywords

Comments

Subsequence of A084864; A084863(a(n))>0.
Conjecture: A084863(a(n))=1?
Is it true that a(n) = A019338(n+1)?
Comment: The truth of the conjecture A084863(a(n))=1 follows from the genus theory of quadratic forms (see Cox, page 61). By comparing enough terms, we see that the conjecture a(n) = A019338(n+1) is false. - T. D. Noe, May 02 2008
Appears to be the primes p such that (p mod 6)*(Fibonacci(p) mod 6)=25. - Gary Detlefs, May 26 2014

Examples

			A000040(17) = 59 = 32 + 27 = 2*4^2 + 3*3^2, therefore 59 is a term.
		

References

  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.

Crossrefs

Programs

  • Mathematica
    QuadPrimes2[2, 0, 3, 10000] (* see A106856 *)
  • PARI
    list(lim)=my(v=List(),w,t); for(x=0, sqrtint(lim\2), w=2*x^2; for(y=0, sqrtint((lim-w)\3), if(isprime(t=w+3*y^2), listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Feb 09 2017

Formula

The primes are congruent to {2, 3, 5, 11} (mod 24). - T. D. Noe, May 02 2008

A307627 Primes p such that 2 is a primitive root modulo p while 8 is not.

Original entry on oeis.org

13, 19, 37, 61, 67, 139, 163, 181, 211, 349, 373, 379, 421, 523, 541, 547, 613, 619, 661, 709, 757, 787, 829, 853, 859, 877, 883, 907, 1117, 1123, 1171, 1213, 1237, 1291, 1381, 1453, 1483, 1531, 1549, 1621, 1669, 1693, 1741, 1747, 1861, 1867, 1987, 2029, 2053
Offset: 1

Views

Author

Jianing Song, Apr 19 2019

Keywords

Comments

Primes p such that 2 is a primitive root modulo p (i.e., p is in A001122) and that p == 1 (mod 3).
According to Artin's conjecture, the number of terms <= N is roughly ((2/5)*C)*PrimePi(N), where C is the Artin's constant = A005596, PrimePi = A000720. Compare: the number of terms of A001122 that are no greater than N is roughly C*PrimePi(N).

Examples

			For p = 67, the multiplicative order of 2 modulo 67 is 66, while 8^22 == 2^(3*22) == 1 (mod 67), so 67 is a term.
		

Crossrefs

Complement of A019338 with respect to A001122.
Cf. also A005596, A000720, A307628.

Programs

  • Maple
    select(p -> isprime(p) and numtheory:-order(2,p) = p-1,
    [seq(i,i=1..10000,6)]); # Robert Israel, Apr 23 2019
  • Mathematica
    Select[Prime@ Range[5, 310], And[FreeQ[#, 8], ! FreeQ[#, 2]] &@ PrimitiveRootList@ # &] (* Michael De Vlieger, Apr 23 2019 *)
  • PARI
    forprime(p=3, 2000, if(znorder(Mod(2, p))==(p-1) && p%3==1, print1(p, ", ")))

A231371 Squarefree composite numbers k such that 8 is a primitive root for all prime factors of k.

Original entry on oeis.org

15, 33, 55, 87, 145, 159, 165, 177, 249, 265, 295, 303, 319, 321, 393, 415, 435, 447, 505, 519, 535, 537, 583, 591, 649, 655, 681, 745, 795, 807, 865, 879, 885, 895, 913, 951, 957, 985, 1041, 1111, 1135, 1167, 1177, 1245, 1257, 1329, 1345, 1383, 1401, 1441
Offset: 1

Views

Author

Arkadiusz Wesolowski, Nov 08 2013

Keywords

Comments

If k is the smallest integer satisfying 10^k == 1 (mod p), we say that 10 has order k (mod p). If n is the product of distinct primes p_i, the period of 1/n in base b is the least common multiple of the orders of b (mod p_i), provided b and n are relatively prime.

Crossrefs

Subsequence of A024556.

Programs

  • Mathematica
    q[n_] := CompositeQ[n] && SquareFreeQ[n] && AllTrue[FactorInteger[n][[;;,1]],  MultiplicativeOrder[8, #] == # - 1 &]; Select[Range[1441], q] (* Amiram Eldar, Oct 03 2021 *)
Showing 1-6 of 6 results.