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.

Previous Showing 21-30 of 60 results. Next

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

A085420 For each n, let p(n,b) be the smallest prime in the arithmetic progression k*n+b, with k > 0. Then a(n) = max(p(n,b)) with 0 < b < n and gcd(b,n) = 1.

Original entry on oeis.org

2, 3, 7, 7, 19, 11, 29, 23, 43, 19, 71, 23, 103, 53, 43, 43, 103, 53, 191, 59, 97, 79, 233, 73, 269, 103, 173, 83, 317, 79, 577, 151, 227, 193, 239, 157, 439, 191, 233, 157, 587, 107, 467, 257, 389, 307, 967, 191, 613, 269, 421, 601, 659, 199, 353, 233, 433, 317, 709
Offset: 1

Views

Author

T. D. Noe, Jun 29 2003

Keywords

Comments

Linnik proved that there are n0 and L such that a(n) < n^L for all n > n0. It has been conjectured that a(n) < n^2. The sequence A034694 has the primes p(n,1).
a(n) is also the maximum term in row n of A060940, which defines a(1). A007918(n+1) is the minimum term in row n of A060940. - Seiichi Manyama, Apr 02 2018

Examples

			a(5) = 19 because p(5,1) = 11, p(5,2) = 7, p(5,3) = 13 and p(5,4) = 19.
		

References

  • P. Ribenboim, The New Book of Prime Number Records, Springer, 1996, pp. 277-284.

Crossrefs

A038026 is a lower bound.
Cf. A034694.

Programs

  • Mathematica
    minP[n_, a_] := Module[{k, p}, If[GCD[n, a]>1, p=0, k=1; While[ !PrimeQ[k*n+a], k++ ]; p=k*n+a]; p]; Table[Max[Table[minP[n, i], {i, n-1}]], {n, 2, 100}]
  • PARI
    p(n,b)=while(!isprime(b+=n),); ba(n)=my(t=p(n,1));for(b=2,n-1,if(gcd(n,b)==1,t=max(t,p(n,b))));t \\ Charles R Greathouse IV, Sep 08 2012

Extensions

a(1) defined via A060940 by Seiichi Manyama, Apr 02 2018

A064632 Smallest prime p such that n = (p-1)/(q-1) for some prime q.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Oct 16 2001

Keywords

Examples

			a(7) = 29 because (29-1)/(5-1).
		

Crossrefs

Similar to but not the same as A034694. Cf. A064652 (q-values), A064673.

Programs

  • Mathematica
    NextPrim[n_] := (k = n + 1; While[ !PrimeQ[k], k++ ]; k); Do[p = 2; While[q = (p - 1)/n + 1; !PrimeQ[q] || q >= p, p = NextPrim[p]]; Print[p], {n, 2, 100} ]
    spp[n_]:=Module[{p=2},While[!PrimeQ[(p-1)/n+1],p=NextPrime[p]];p]; Array[ spp,70,2] (* Harvey P. Dale, Aug 22 2019 *)
  • PARI
    a(n) = {forprime(p=2, , forprime(q=2, p-1, if ((p-1)/(q-1) == n, return (p));););} \\ Michel Marcus, Apr 16 2016
  • Sage
    def A064632(n):
        p, q = 0, 0
        while not (q.is_prime() and q < p):
            p = next_prime(p)
            if p % n != 1: continue
            q = (p - 1) // n + 1
        return p # Daria Micovic, Apr 13 2016
    

Extensions

Definition corrected by Stephanie Anderson, Apr 16 2016

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

A077316 Triangle read by rows: T(n,k) is the k-th prime = 1 (mod n).

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 5, 13, 17, 29, 11, 31, 41, 61, 71, 7, 13, 19, 31, 37, 43, 29, 43, 71, 113, 127, 197, 211, 17, 41, 73, 89, 97, 113, 137, 193, 19, 37, 73, 109, 127, 163, 181, 199, 271, 11, 31, 41, 61, 71, 101, 131, 151, 181, 191, 23, 67, 89, 199, 331, 353
Offset: 1

Views

Author

Amarnath Murthy, Nov 04 2002

Keywords

Examples

			Triangle begins:
   2;
   3,  5;
   7, 13, 19;
   5, 13, 17, 29;
  11, 31, 41, 61, 71;
  ...
		

Crossrefs

Cf. A034694 (first column), A077317 (main diagonal), A077318 (row sums), A077319, A093870, A193869 (row products).

Programs

  • Maple
    Tj := proc(n,k) option remember: local j,p: if(k=0)then return 0:fi: for j from procname(n,k-1)+1 do if(isprime(n*j+1))then return j: fi: od: end: A077316 := proc(n,k) return n*Tj(n,k)+1: end: seq(seq(A077316(n,k),k=1..n),n=1..15); # Nathaniel Johnston, Sep 02 2011
  • Mathematica
    Tj[n_, k_] := Tj[n, k] = Module[{j}, If[k == 0, Return[0]];
       For[j = Tj[n, k-1]+1, True, j++, If[PrimeQ[n*j+1], Return[j]]]];
    T[n_, k_] := n*Tj[n, k]+1;
    Table[Table[T[n, k], {k, 1, n}], {n, 1, 15}] // Flatten (* Jean-François Alcover, Aug 02 2022, after Nathaniel Johnston *)

Extensions

Edited and extended by Franklin T. Adams-Watters, Aug 29 2006

A034782 Numbers n such that A034693(n) = 3: 3n + 1 is prime, but neither n + 1 nor 2n + 1.

Original entry on oeis.org

24, 32, 34, 64, 76, 80, 92, 94, 104, 110, 122, 124, 132, 144, 152, 154, 182, 202, 206, 214, 220, 236, 242, 244, 246, 252, 274, 286, 294, 302, 322, 332, 340, 344, 356, 362, 364, 374, 376, 390, 412, 416, 434, 474, 482, 484, 494, 496
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Position[#, 3] &@ Table[k = 1; While[! PrimeQ[k n + 1], k++]; k, {n, 500}] // Flatten (* Michael De Vlieger, Mar 02 2017 *)
  • PARI
    is(n)=!isprime(n+1)&&!isprime(2*n+1)&&isprime(3*n+1) \\ M. F. Hasler, May 13 2018

Extensions

Corrected by R. J. Mathar, Jul 26 2015
Name edited by M. F. Hasler, May 13 2018

A034784 Numbers n such that A034693(n) = 2.

Original entry on oeis.org

3, 5, 8, 9, 11, 14, 15, 20, 21, 23, 26, 29, 33, 35, 39, 41, 44, 48, 50, 51, 53, 54, 56, 63, 65, 68, 69, 74, 75, 81, 83, 86, 89, 90, 95, 98, 99, 105, 111, 113, 114, 116, 119, 120, 125, 128, 131, 134, 135, 140, 141, 146, 153, 155, 158, 165, 168, 173, 174, 176
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    CompositeNext[n_]:=Module[{k=n+1},While[PrimeQ[k],k++ ];k]; lst={};Do[p=n+CompositeNext[n];If[PrimeQ[p],AppendTo[lst,n]],{n,2,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Jun 15 2009 *)
    Position[#, 2] &@ Table[k = 1; While[! PrimeQ[k n + 1], k++]; k, {n, 180}] // Flatten (* Michael De Vlieger, Mar 02 2017 *)

Extensions

Edited by N. J. A. Sloane, Oct 27 2012

A077317 a(n) is the n-th prime == 1 (mod n).

Original entry on oeis.org

2, 5, 19, 29, 71, 43, 211, 193, 271, 191, 661, 277, 937, 463, 691, 769, 1531, 613, 2357, 1021, 1723, 1409, 3313, 1609, 3701, 2029, 3187, 2437, 6961, 1741, 7193, 3617, 4951, 3877, 7001, 3169, 10657, 6271, 7879, 5521, 13613, 3823, 15137, 7349, 9091, 7499
Offset: 1

Views

Author

Amarnath Murthy, Nov 04 2002, Jul 23 2005 (submitted incorrectly on two separate occasions; each time it has had to be corrected)

Keywords

Comments

a(n) is the n-th prime in the arithmetic progression with first term 1 and common difference n.
Main diagonal of A077316.

Examples

			a(5) = 71, the fifth prime in the sequence 1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56, 61, 66, 71, ...
		

Crossrefs

Programs

  • Maple
    a:=proc(n) local N, B, j: N:=[seq(n*x+1,x=0..500)]: B:={}: for j from 1 to nops(N) do if isprime(N[j])=true then B:=B union {N[j]} else fi od: B[n]: end: seq(a(n),n=1..55); # Emeric Deutsch, Sep 03 2005
  • Mathematica
    Module[{nn=50,prs=Prime[Range[3000]]},Join[{2},Table[Select[prs,Mod[#,n] == 1&][[n]],{n,2,nn}]]] (* Harvey P. Dale, Nov 13 2020 *)

Extensions

Edited, corrected and extended by Emeric Deutsch, Sep 03 2005 and by Franklin T. Adams-Watters, Aug 29 2006
Edited by N. J. A. Sloane, Aug 23 2008 at the suggestion of R. J. Mathar

A077318 Sum of terms in n-th row of A077316.

Original entry on oeis.org

2, 8, 39, 64, 215, 150, 791, 760, 1179, 970, 3619, 1668, 6227, 3360, 5595, 6144, 13821, 5436, 24985, 10280, 17115, 14850, 35765, 18600, 42425, 26390, 43389, 34580, 92481, 24180, 115909, 57440, 79431, 61200, 115605, 55332, 197913, 106020
Offset: 1

Views

Author

Amarnath Murthy, Nov 04 2002

Keywords

Comments

By definition a(n) == 0 (mod n).
It appears that a(n) is also the smallest sum of n distinct primes of the form n*k+1. - Omar E. Pol, Sep 03 2011

Crossrefs

Extensions

Edited, corrected and extended by Franklin T. Adams-Watters, Aug 29 2006

A093868 Smallest prime that differs from a multiple of n by unity.

Original entry on oeis.org

2, 3, 2, 3, 11, 5, 13, 7, 17, 11, 23, 11, 53, 13, 29, 17, 67, 17, 37, 19, 41, 23, 47, 23, 101, 53, 53, 29, 59, 29, 61, 31, 67, 67, 71, 37, 73, 37, 79, 41, 83, 41, 173, 43, 89, 47, 281, 47, 97, 101, 101, 53, 107, 53, 109, 113, 113, 59, 353, 59, 367, 61, 127, 127, 131, 67, 269
Offset: 1

Views

Author

Amarnath Murthy, Apr 20 2004

Keywords

Comments

Numbers n such that a(n-1)=a(n+1)=n are A025584 (primes p such that p-2 is not a prime). - Rick L. Shepherd, Aug 23 2004

Crossrefs

Cf. A093869.
Cf. A034694 (Smallest prime == 1 (mod n)), A038700 (Smallest prime == -1 (mod n)).

Programs

  • Maple
    f:= proc(n) local j,k;
      for k from 1 do
        for j in [-1,1] do
          if isprime(k*n+j) then return k*n+j fi
      od od
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 07 2019
  • Mathematica
    a[n_] := Module[{p}, For[p = 2, True, p = NextPrime[p], If[Divisible[p-1, n] || Divisible[p+1, n], Return[p]]]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Feb 04 2023 *)
  • PARI
    a(n) = forprime(p=2, , if (!((p+1) % n) || !((p-1) % n), return (p))); \\ Michel Marcus, Aug 08 2014

Formula

a(n) = min(A034694(n), A038700(n)) for all n >= 1. - Rick L. Shepherd, Aug 23 2004

Extensions

More terms from Rick L. Shepherd, Aug 23 2004
Previous Showing 21-30 of 60 results. Next