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

A070846 Smallest prime == 1 (mod 2n).

Original entry on oeis.org

3, 5, 7, 17, 11, 13, 29, 17, 19, 41, 23, 73, 53, 29, 31, 97, 103, 37, 191, 41, 43, 89, 47, 97, 101, 53, 109, 113, 59, 61, 311, 193, 67, 137, 71, 73, 149, 229, 79, 241, 83, 337, 173, 89, 181, 277, 283, 97, 197, 101, 103, 313, 107, 109, 331, 113, 229, 233, 709, 241
Offset: 1

Views

Author

Amarnath Murthy, May 15 2002

Keywords

Comments

From Jianing Song, Feb 14 2021: (Start)
a(n) is the smallest prime p such that there is a primitive 2n-th root of unity modulo p, i.e., there is an element with order 2n in the multiplicative group of integers modulo p.
For n > 1, a(n) is the smallest prime p such that the 2n-th cyclotomic field Q(exp(2*Pi*i/(2*n))) can be embedded into the p-adic field Q_p. (End)

Crossrefs

Programs

  • Mathematica
    With[{prs=Prime[Range[200]]},Flatten[Table[Select[prs,Mod[#,2n]==1&,1],{n,60}]]] (* Harvey P. Dale, Jan 16 2013 *)
  • PARI
    for(n=1,80,s=1; while((isprime(s)*s-1)%(2*n)>0,s++); print1(s,","))

Formula

a(n) = 2*n*A016014(n) + 1. - Dmitry Kamenetsky, Oct 26 2016

Extensions

More terms from Benoit Cloitre, May 18 2002

A070853 Smallest prime == 1 mod (9n).

Original entry on oeis.org

19, 19, 109, 37, 181, 109, 127, 73, 163, 181, 199, 109, 937, 127, 271, 433, 307, 163, 2053, 181, 379, 199, 829, 433, 1801, 937, 487, 757, 523, 271, 1117, 577, 1783, 307, 631, 1297, 1999, 2053, 3511, 1801, 739, 379, 1549, 397, 811, 829, 1693, 433, 883
Offset: 1

Views

Author

Amarnath Murthy, May 15 2002

Keywords

Crossrefs

Programs

  • PARI
    for(n=1,80,s=1; while((isprime(s)*s-1)%(9*n)>0,s++); print1(s,","))

Extensions

Corrected and extended by Benoit Cloitre, May 18 2002

A070850 Smallest prime == 1 mod (6n).

Original entry on oeis.org

7, 13, 19, 73, 31, 37, 43, 97, 109, 61, 67, 73, 79, 337, 181, 97, 103, 109, 229, 241, 127, 397, 139, 433, 151, 157, 163, 337, 349, 181, 373, 193, 199, 409, 211, 433, 223, 229, 937, 241, 739, 757, 1033, 1321, 271, 277, 283, 577, 883, 601, 307, 313, 3181, 1297
Offset: 1

Views

Author

Amarnath Murthy, May 15 2002

Keywords

Crossrefs

Programs

  • PARI
    for(n=1,80,s=1; while((isprime(s)*s-1)%(6*n)>0,s++); print1(s,","))

Extensions

More terms from Benoit Cloitre, May 18 2002

A070848 Smallest prime == 1 mod (4n).

Original entry on oeis.org

5, 17, 13, 17, 41, 73, 29, 97, 37, 41, 89, 97, 53, 113, 61, 193, 137, 73, 229, 241, 337, 89, 277, 97, 101, 313, 109, 113, 233, 241, 373, 257, 397, 137, 281, 433, 149, 457, 157, 641, 821, 337, 173, 353, 181, 1289, 941, 193, 197, 401, 409, 1249, 1061, 433, 661
Offset: 1

Views

Author

Amarnath Murthy, May 15 2002

Keywords

Comments

Note interesting patterns in the graph. - Zak Seidov, Dec 13 2011

Examples

			5 is the smallest prime of the form 1+4m, 17 is the smallest prime of the form 1+8m, 13 is the smallest prime of the form 1+12m, etc. - _Zak Seidov_, Dec 13 2011
		

Crossrefs

Programs

  • Mathematica
    nn=100; Reap[Do[p=1+4n; While[!PrimeQ[p], p=p+4n]; Sow[p], {n,nn}]][[2,1]] (* Zak Seidov, Dec 13 2011 *)
  • PARI
    for(n=1,80,s=1; while((isprime(s)*s-1)%(4*n)>0,s++); print1(s,","))
    
  • PARI
    nn=10000;for(n=1,nn,s=1+4*n;while(!isprime(s),s=s+4*n);print1(s,", ")) \\ Zak Seidov, Dec 13 2011
    
  • Python
    from sympy import isprime
    def a(n):
      k = 4*n + 1
      while not isprime(k): k += 4*n
      return k
    print([a(n) for n in range(1, 56)]) # Michael S. Branicky, May 17 2021

Extensions

More terms from Benoit Cloitre, May 18 2002

A070849 Smallest prime == 1 mod (5n).

Original entry on oeis.org

11, 11, 31, 41, 101, 31, 71, 41, 181, 101, 331, 61, 131, 71, 151, 241, 1021, 181, 191, 101, 211, 331, 461, 241, 251, 131, 271, 281, 1451, 151, 311, 641, 331, 1021, 701, 181, 1481, 191, 1171, 401, 821, 211, 431, 661, 1801, 461, 941, 241, 491, 251, 1021, 521
Offset: 1

Views

Author

Amarnath Murthy, May 15 2002

Keywords

Crossrefs

Programs

  • PARI
    for(n=1,80,s=1; while((isprime(s)*s-1)%(5*n)>0,s++); print1(s,","))

Extensions

More terms from Benoit Cloitre, May 18 2002

A366931 Least k such that 3*n*k+1 is a prime.

Original entry on oeis.org

2, 1, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 1, 4, 2, 2, 2, 4, 1, 2, 1, 2, 1, 2, 1, 2, 4, 4, 2, 4, 1, 2, 1, 2, 1, 2, 2, 8, 2, 6, 1, 8, 3, 2, 1, 2, 3, 6, 1, 2, 1, 20, 1, 2, 2, 12, 2, 4, 1, 2, 2, 2, 1, 6, 1, 8, 2, 4, 1, 4, 2, 2, 1, 8, 1, 2, 4, 6, 1, 2, 3, 2, 3, 4, 4
Offset: 1

Views

Author

Robert Price, Dec 17 2023

Keywords

Crossrefs

A070847 lists the corresponding primes.

Programs

  • Mathematica
    A366931 = {};
    Do[k=1; While[!PrimeQ[3 n k+1], k++]; AppendTo[A366931 ,k], {n,85}];
    A366931
    lkp[n_]:=Module[{k=1},While[!PrimeQ[3n*k+1],k++];k]; Array[lkp,90] (* Harvey P. Dale, Jan 09 2025 *)
  • PARI
    a(n) = my(k=1); while (!isprime(3*n*k+1), k++); k; \\ Michel Marcus, Dec 17 2023

A379150 Smallest prime ending in "3", with n preceding "0" digits.

Original entry on oeis.org

103, 2003, 70003, 100003, 1000003, 20000003, 500000003, 40000000003, 40000000003, 100000000003, 2000000000003, 230000000000003, 3100000000000003, 11000000000000003, 20000000000000003, 100000000000000003, 1000000000000000003, 310000000000000000003, 500000000000000000003
Offset: 1

Views

Author

James S. DeArmon, Dec 16 2024

Keywords

Comments

Leading zeros are not allowed, e.g., "03".
a(997) has 1001 digits. - Michael S. Branicky, Dec 16 2024

Examples

			a(1) = 103, is the smallest prime ending in "03";
a(2) = 2003, is the smallest prime ending in "003".
		

Crossrefs

Programs

  • Mathematica
    Table[i=1;While[!PrimeQ[m=FromDigits[Join[IntegerDigits[i],Table[0,n],{3}]]],i++];m,{n,19}] (* James C. McMahon, Dec 23 2024 *)
  • PARI
    a(n)=for(i=1, oo, if(isprime(i*10^(n+1)+3), return(i*10^(n+1)+3))) \\ Johann Peters, Dec 27 2024
  • Python
    import sympy
    def prime3_finder():
      outVec = []
      power = 2
      for n in range(100,999999999):
          if not n & 3 == 3: continue # speed-up over simple MOD operation
          if not n % 10**power == 3: continue
          if not sympy.isprime(n): continue
          outVec.append(n)
          power += 1
      return outVec
    outvec = prime3_finder()
    print(outvec)
    
  • Python
    from sympy import isprime
    from itertools import count
    def a(n): return next(i for i in count(10**(n+1)+3, 10**(n+1)) if isprime(i))
    print([a(n) for n in range(1, 20)]) # Michael S. Branicky, Dec 16 2024
    

Extensions

More terms from Michael S. Branicky, Dec 16 2024
Showing 1-7 of 7 results.