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

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

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

A365958 Least k such that 8*n*k+1 is a prime.

Original entry on oeis.org

2, 1, 3, 3, 1, 2, 2, 3, 1, 3, 1, 1, 3, 1, 2, 2, 1, 3, 3, 4, 2, 2, 7, 1, 2, 6, 2, 2, 1, 1, 6, 1, 5, 5, 1, 2, 2, 4, 1, 2, 7, 1, 3, 1, 5, 9, 3, 2, 8, 1, 1, 3, 4, 1, 2, 1, 1, 2, 4, 7, 2, 3, 2, 15, 1, 4, 3, 10, 3, 5, 1, 1, 3, 1, 1, 2, 1, 2, 6, 1, 2, 12, 3, 1, 2
Offset: 1

Views

Author

Robert Price, Dec 17 2023

Keywords

Crossrefs

A070852 lists the corresponding primes.

Programs

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