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-9 of 9 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

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

A070851 Smallest prime == 1 mod (7n).

Original entry on oeis.org

29, 29, 43, 29, 71, 43, 197, 113, 127, 71, 463, 337, 547, 197, 211, 113, 239, 127, 1597, 281, 883, 463, 967, 337, 701, 547, 379, 197, 2437, 211, 1303, 449, 463, 239, 491, 757, 2591, 1597, 547, 281, 1723, 883, 3011, 617, 631, 967, 659, 337, 1373, 701, 1429
Offset: 1

Views

Author

Amarnath Murthy, May 15 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Module[{nn=60,prs=Prime[Range[500]]},Table[SelectFirst[prs,Mod[#,7n]==1&],{n,nn}]] (* Harvey P. Dale, Apr 13 2022 *)
  • PARI
    for(n=1,80,s=1; while((isprime(s)*s-1)%(7*n)>0,s++); print1(s,","))

Extensions

More terms from Benoit Cloitre, May 18 2002

A070852 Smallest prime == 1 mod (8n).

Original entry on oeis.org

17, 17, 73, 97, 41, 97, 113, 193, 73, 241, 89, 97, 313, 113, 241, 257, 137, 433, 457, 641, 337, 353, 1289, 193, 401, 1249, 433, 449, 233, 241, 1489, 257, 1321, 1361, 281, 577, 593, 1217, 313, 641, 2297, 337, 1033, 353, 1801, 3313, 1129, 769, 3137, 401
Offset: 1

Views

Author

Amarnath Murthy, May 15 2002

Keywords

Crossrefs

Cf. A070846 to A070851 and A070853.
Cf. A034694.

Programs

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

Extensions

More terms from Benoit Cloitre, May 18 2002

A070847 Smallest prime == 1 mod (3n).

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, May 15 2002

Keywords

Crossrefs

Cf. A034694.
Cf. A024892 (n such that a(n)=3*n+1).
Cf. A002476.

Programs

  • Maple
    f:= proc(n) local k,d;
      if n::even then d:= 3*n else d:= 6*n fi;
      for k from 1 by d do if isprime(k) then return k fi od
    end proc:
    map(f, [$1..100]); # Robert Israel, Sep 19 2019
  • Mathematica
    a[n_] := Module[{k, d}, If[EvenQ[n], d = 3n, d = 6n]; For[k = 1, True, k += d, If[PrimeQ[k], Return[k]]]];
    Array[a, 100] (* Jean-François Alcover, Jun 11 2020, after Maple *)
  • PARI
    for(n=1,80,s=1; while((isprime(s)*s-1)%(3*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

A070854 Smallest prime == 1 mod (10^n).

Original entry on oeis.org

11, 101, 3001, 70001, 700001, 22000001, 30000001, 600000001, 6000000001, 30000000001, 1900000000001, 18000000000001, 40000000000001, 3900000000000001, 6000000000000001, 130000000000000001, 3700000000000000001, 15000000000000000001, 150000000000000000001, 600000000000000000001, 16000000000000000000001
Offset: 1

Views

Author

Amarnath Murthy, May 15 2002

Keywords

Comments

a(6) through a(21) have been certified prime with Primo. - Rick L. Shepherd, Jun 03 2002

Crossrefs

Programs

  • PARI
    a(n)=for(i=1,+oo,if(isprime(i*10^n+1), return(i*10^n+1))) \\ Johann Peters, Dec 27 2024

Formula

a(n) = A121172(n)*10^n + 1. - Ray Chandler, Feb 10 2009

Extensions

More terms from Rick L. Shepherd, Jun 03 2002

A368201 Least k such that 9*n*k+1 is a prime.

Original entry on oeis.org

2, 1, 4, 1, 4, 2, 2, 1, 2, 2, 2, 1, 8, 1, 2, 3, 2, 1, 12, 1, 2, 1, 4, 2, 8, 4, 2, 3, 2, 1, 4, 2, 6, 1, 2, 4, 6, 6, 10, 5, 2, 1, 4, 1, 2, 2, 4, 1, 2, 4, 2, 2, 14, 1, 2, 2, 4, 1, 2, 1, 14, 2, 4, 1, 2, 3, 12, 1, 6, 1, 2, 2, 6, 3, 6, 3, 6, 5, 2, 3, 2, 1, 6, 1, 2
Offset: 1

Views

Author

Robert Price, Dec 16 2023

Keywords

Crossrefs

A070853 lists the corresponding primes.

Programs

  • Mathematica
    A368201 = {};
    Do[k=1; While[!PrimeQ[9 n k+1], k++]; AppendTo[A368201,k], {n,85}];
    A368201
  • PARI
    a(n) = my(k=1); while (!isprime(9*n*k+1), k++); k; \\ Michel Marcus, Dec 16 2023
Showing 1-9 of 9 results.