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-10 of 16 results. Next

A007528 Primes of the form 6k-1.

Original entry on oeis.org

5, 11, 17, 23, 29, 41, 47, 53, 59, 71, 83, 89, 101, 107, 113, 131, 137, 149, 167, 173, 179, 191, 197, 227, 233, 239, 251, 257, 263, 269, 281, 293, 311, 317, 347, 353, 359, 383, 389, 401, 419, 431, 443, 449, 461, 467, 479, 491, 503, 509, 521, 557, 563, 569, 587
Offset: 1

Views

Author

Keywords

Comments

For values of k see A024898.
Also primes p such that p^q - 2 is not prime where q is an odd prime. These numbers cannot be prime because the binomial p^q = (6k-1)^q expands to 6h-1 some h. Then p^q-2 = 6h-1-2 is divisible by 3 thus not prime. - Cino Hilliard, Nov 12 2008
a(n) = A211890(3,n-1) for n <= 4. - Reinhard Zumkeller, Jul 13 2012
There exists a polygonal number P_s(3) = 3s - 3 = a(n) + 1. These are the only primes p with P_s(k) = p + 1, s >= 3, k >= 3, since P_s(k) - 1 is composite for k > 3. - Ralf Steiner, May 17 2018
From Bernard Schott, Feb 14 2019: (Start)
A theorem due to Andrzej Mąkowski: every integer greater than 161 is the sum of distinct primes of the form 6k-1. Examples: 162 = 5 + 11 + 17 + 23 + 47 + 59; 163 = 17 + 23 + 29 + 41 + 53. (See Sierpiński and David Wells.)
{2,3} Union A002476 Union {this sequence} = A000040.
Except for 2 and 3, all Sophie Germain primes are of the form 6k-1.
Except for 3, all the lesser of twin primes are also of the form 6k-1.
Dirichlet's theorem on arithmetic progressions states that this sequence is infinite. (End)
For all elements of this sequence p=6*k-1, there are no (x,y) positive integers such that k=6*x*y-x+y. - Pedro Caceres, Apr 06 2019

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • A. Mąkowski, Partitions into unequal primes, Bull. Acad. Polon. Sci. Sér. Sci. Math. Astr. Phys. 8 (1960), 125-126.
  • Wacław Sierpiński, Elementary Theory of Numbers, p. 144, Warsaw, 1964.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, Revised edition, 1997, p. 127.

Crossrefs

Intersection of A016969 and A000040.
Prime sequences A# (k,r) of the form k*n+r with 0 <= r <= k-1 (i.e., primes == r (mod k), or primes p with p mod k = r) and gcd(r,k)=1: A000040 (1,0), A065091 (2,1), A002476 (3,1), A003627 (3,2), A002144 (4,1), A002145 (4,3), A030430 (5,1), A045380 (5,2), A030431 (5,3), A030433 (5,4), A002476 (6,1), this sequence (6,5), A140444 (7,1), A045392 (7,2), A045437 (7,3), A045471 (7,4), A045458 (7,5), A045473 (7,6), A007519 (8,1), A007520 (8,3), A007521 (8,5), A007522 (8,7), A061237 (9,1), A061238 (9,2), A061239 (9,4), A061240 (9,5), A061241 (9,7), A061242 (9,8), A030430 (10,1), A030431 (10,3), A030432 (10,7), A030433 (10,9), A141849 (11,1), A090187 (11,2), A141850 (11,3), A141851 (11,4), A141852 (11,5), A141853 (11,6), A141854 (11,7), A141855 (11,8), A141856 (11,9), A141857 (11,10), A068228 (12,1), A040117 (12,5), A068229 (12,7), A068231 (12,11).
Cf. A034694 (smallest prime == 1 (mod n)).
Cf. A038700 (smallest prime == n-1 (mod n)).
Cf. A038026 (largest possible value of smallest prime == r (mod n)).
Cf. A001359 (lesser of twin primes), A005384 (Sophie Germain primes).

Programs

  • GAP
    Filtered(List([1..100],n->6*n-1),IsPrime); # Muniru A Asiru, May 19 2018
  • Haskell
    a007528 n = a007528_list !! (n-1)
    a007528_list = [x | k <- [0..], let x = 6 * k + 5, a010051' x == 1]
    -- Reinhard Zumkeller, Jul 13 2012
    
  • Maple
    select(isprime,[seq(6*n-1,n=1..100)]); # Muniru A Asiru, May 19 2018
  • Mathematica
    Select[6 Range[100]-1,PrimeQ]  (* Harvey P. Dale, Feb 14 2011 *)
  • PARI
    forprime(p=2, 1e3, if(p%6==5, print1(p, ", "))) \\ Charles R Greathouse IV, Jul 15 2011
    
  • PARI
    forprimestep(p=5,1000,6, print1(p", ")) \\ Charles R Greathouse IV, Mar 03 2025
    

Formula

A003627 \ {2}. - R. J. Mathar, Oct 28 2008
Conjecture: Product_{n >= 1} ((a(n) - 1) / (a(n) + 1)) * ((A002476(n) + 1) / (A002476(n) - 1)) = 3/4. - Dimitris Valianatos, Feb 11 2020
From Vaclav Kotesovec, May 02 2020: (Start)
Product_{k>=1} (1 - 1/a(k)^2) = 9*A175646/Pi^2 = 1/1.060548293.... =4/(3*A333240).
Product_{k>=1} (1 + 1/a(k)^2) = A334482.
Product_{k>=1} (1 - 1/a(k)^3) = A334480.
Product_{k>=1} (1 + 1/a(k)^3) = A334479. (End)
Legendre symbol (-3, a(n)) = -1 and (-3, A002476(n)) = +1, for n >= 1. For prime 3 one sets (-3, 3) = 0. - Wolfdieter Lang, Mar 03 2021

A034694 Smallest prime == 1 (mod n).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Thangadurai and Vatwani prove that a(n) <= 2^(phi(n)+1)-1. - T. D. Noe, Oct 12 2011
Conjecture: a(n) < n^2 for n > 1. - Thomas Ordowski, Dec 19 2016
Eric Bach and Jonathan Sorenson show that, assuming GRH, a(n) <= (1 + o(1))*(phi(n)*log(n))^2 for n > 1. See the abstract of their paper in the Links section. - Jianing Song, Nov 10 2019
a(n) is the smallest prime p such that the multiplicative group modulo p has a subgroup of order n. - Joerg Arndt, Oct 18 2020

Examples

			If n = 7, the smallest prime in the sequence 8, 15, 22, 29, ... is 29, so a(7) = 29.
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, section 2.12, pp. 127-130.
  • P. Ribenboim, The Book of Prime Number Records. Chapter 4,IV.B.: The Smallest Prime In Arithmetic Progressions, 1989, pp. 217-223.

Crossrefs

Programs

  • Haskell
    a034694 n = until ((== 1) . a010051) (+ n) (n + 1)
    -- Reinhard Zumkeller, Dec 17 2013
  • Mathematica
    a[n_] := Block[{k = 1}, If[n == 1, 2, While[Mod[Prime@k, n] != 1, k++ ]; Prime@k]]; Array[a, 64] (* Robert G. Wilson v, Jul 08 2006 *)
    With[{prs=Prime[Range[200]]},Flatten[Table[Select[prs,Mod[#-1,n]==0&,1],{n,70}]]] (* Harvey P. Dale, Sep 22 2021 *)
  • PARI
    a(n)=if(n<0,0,s=1; while((prime(s)-1)%n>0,s++); prime(s))
    

Formula

a(n) = min{m: m = k*n + 1 with k > 0 and A010051(m) = 1}. - Reinhard Zumkeller, Dec 17 2013
a(n) = n * A034693(n) + 1. - Joerg Arndt, Oct 18 2020

A053989 Smallest k such that nk-1 is prime.

Original entry on oeis.org

3, 2, 1, 1, 4, 1, 2, 1, 2, 2, 4, 1, 8, 1, 2, 2, 4, 1, 2, 1, 2, 2, 6, 1, 6, 4, 2, 3, 6, 1, 2, 1, 4, 2, 4, 2, 2, 1, 6, 2, 4, 1, 6, 1, 2, 3, 6, 1, 2, 3, 2, 2, 4, 1, 2, 3, 2, 3, 6, 1, 8, 1, 4, 2, 6, 2, 6, 1, 2, 2, 4, 1, 14, 1, 2, 2, 4, 3, 2, 1, 8, 2, 4, 1, 6, 3, 2, 3, 16, 1, 2, 4, 6, 3, 4, 2, 2, 1, 2, 2
Offset: 1

Views

Author

Henry Bottomley, Apr 04 2000

Keywords

Examples

			a(5)=4 because the smallest prime in the sequence 5k-1 (4,9,14,19,24...) is 19 when k=4
		

Crossrefs

Programs

Formula

a(n) = (A038700(n)+1)/n.

A141849 Primes congruent to 1 mod 11.

Original entry on oeis.org

23, 67, 89, 199, 331, 353, 397, 419, 463, 617, 661, 683, 727, 859, 881, 947, 991, 1013, 1123, 1277, 1321, 1409, 1453, 1607, 1783, 1871, 2003, 2069, 2113, 2179, 2267, 2311, 2333, 2377, 2399, 2531, 2663, 2707, 2729, 2861, 2927, 2971, 3037, 3169, 3191, 3257
Offset: 1

Views

Author

N. J. A. Sloane, Jul 11 2008

Keywords

Comments

Conjecture: Also primes p such that ((x+1)^11-1)/x has 10 distinct irreducible factors of degree 1 over GF(p). - Federico Provvedi, Apr 17 2018
Primes congruent to 1 mod 22. - Chai Wah Wu, Apr 28 2025

Crossrefs

Prime sequences A# (k,r) of the form k*n+r with 0 <= r <= k-1 (i.e., primes == r (mod k), or primes p with p mod k = r) and gcd(r,k)=1: A000040 (1,0), A065091 (2,1), A002476 (3,1), A003627 (3,2), A002144 (4,1), A002145 (4,3), A030430 (5,1), A045380 (5,2), A030431 (5,3), A030433 (5,4), A002476 (6,1), A007528 (6,5), A140444 (7,1), A045392 (7,2), A045437 (7,3), A045471 (7,4), A045458 (7,5), A045473 (7,6), A007519 (8,1), A007520 (8,3), A007521 (8,5), A007522 (8,7), A061237 (9,1), A061238 (9,2), A061239 (9,4), A061240 (9,5), A061241 (9,7), A061242 (9,8), A030430 (10,1), A030431 (10,3), A030432 (10,7), A030433 (10,9), this sequence (11,1), A090187 (11,2), A141850 (11,3), A141851 (11,4), A141852 (11,5), A141853 (11,6), A141854 (11,7), A141855 (11,8), A141856 (11,9), A141857 (11,10), A068228 (12,1), A040117 (12,5), A068229 (12,7), A068231 (12,11).
Cf. A034694 (smallest prime == 1 (mod n)).
Cf. A038700 (smallest prime == n-1 (mod n)).
Cf. A038026 (largest possible value of smallest prime == r (mod n)).

Programs

Formula

a(n) ~ 10n log n. - Charles R Greathouse IV, Jul 02 2016

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

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

Original entry on oeis.org

2, 5, 11, 19, 89, 41, 181, 127, 251, 199, 571, 227, 1013, 433, 599, 751, 2039, 593, 2089, 859, 1637, 1429, 4001, 1103, 4049, 2053, 3779, 2267, 6263, 1499, 6571, 3583, 5279, 3943, 6089, 2879, 11321, 4597, 7331, 4919, 15497, 3779, 15307, 6599, 8009, 7681
Offset: 1

Views

Author

Amarnath Murthy, Apr 20 2004

Keywords

Comments

Main diagonal of A093870.

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,count;
      count:= 0;
      for p from n-1 by n do
        if isprime(p) then
           count:= count+1;
           if count = n then return p fi
        fi
      od;
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 08 2019

Extensions

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

A265647 Smallest k such that n divides k*(k+1)*(k+2)/6.

Original entry on oeis.org

1, 2, 7, 2, 3, 7, 5, 6, 25, 3, 9, 7, 11, 6, 8, 14, 15, 26, 17, 4, 7, 10, 21, 8, 23, 11, 79, 6, 27, 8, 29, 30, 9, 15, 5, 26, 35, 18, 25, 8, 39, 7, 41, 10, 25, 22, 45, 16, 47, 23, 16, 12, 51, 79, 9, 6, 17, 27, 57, 8, 59, 30, 26, 62, 13, 43, 65, 15, 44, 14, 69, 54, 71, 35, 25, 18, 20, 26, 77, 14, 241
Offset: 1

Views

Author

Ctibor O. Zizka, Dec 11 2015

Keywords

Comments

More generally we can ask for the smallest k such that gcd(n,f(k)) = n. This sequence has f(k) = k*(k+1)*(k+2)/6. For other examples in the OEIS, see the crossrefencess.

Crossrefs

Programs

  • Mathematica
    Table[k = 1; While[! Divisible[k (k + 1) (k + 2)/6, n], k++]; k, {n, 81}] (* Michael De Vlieger, Dec 11 2015 *)
  • PARI
    a(n)=my(k=1);while((k*(k+1)*(k+2)/6)%n>0,k++);k \\ Anders Hellström, Dec 11 2015
    
  • PARI
    first(n) = { my(todo = n, i = 1, res = vector(n)); while(todo > 0, d = select(x -> x <= n, divisors(binomial(i + 2, 3))); for(j = 1, #d, if(res[d[j]] == 0, res[d[j]] = i; todo-- ) ); i++ ); res } \\ David A. Corneth, Mar 22 2021

Extensions

More terms from Michael De Vlieger, Dec 11 2015

A219109 The smallest k such that prime(k) == -1 (mod n).

Original entry on oeis.org

1, 2, 1, 2, 8, 3, 6, 4, 7, 8, 14, 5, 27, 6, 10, 11, 19, 7, 12, 8, 13, 14, 33, 9, 35, 27, 16, 23, 40, 10, 18, 11, 32, 19, 34, 20, 21, 12, 51, 22, 38, 13, 55, 14, 24, 33, 60, 15, 25, 35, 26, 27, 47, 16, 29, 39, 30, 40, 71, 17, 93, 18, 54, 31, 77, 32, 79, 19, 33, 34, 61, 20, 172, 21, 35, 36
Offset: 1

Views

Author

Irina Gerasimova, Apr 11 2013

Keywords

Comments

Numbers n such that a(n) + 1 = a(n + 1) where the a(n)-th prime is not the smaller prime in a twin prime pair: 1, 3, 122, 267, 356, 362, 392, 403, 416, 446, 514, ....
Primes p(n) such that p is not -1 mod n for all prime p < p(n): 2, 3, 11, 31, 41, 59, 83, 97, 101, 109, 167, 191, 211, 277, 283, 313, 331, 367, 419,... Also primes p(n) such that p(n) <= A038700(n).

Examples

			For n = 11, we see that the 14th prime (43), modulo 11 is 10, or -1, so a(11) = 14.
		

Crossrefs

Programs

Formula

a(n) = A000720(A038700(n)). - Joerg Arndt, Apr 16 2013

A084730 Smallest prime of the form k*n! - 1.

Original entry on oeis.org

2, 3, 5, 23, 239, 719, 5039, 201599, 1088639, 14515199, 159667199, 479001599, 31135103999, 87178291199, 2615348735999, 188305108991999, 711374856191999, 192071211171839999, 3649353012264959999, 12164510040883199999, 2248001455555215359999, 2248001455555215359999
Offset: 2

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 13 2003

Keywords

Examples

			a(8) = 161599 = 4*8! - 1 is a prime.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local w,k;
    w:= n!;
    for k from 1 do
      if isprime(k*w-1) then return k*w-1 fi
    od
    end proc:
    map(f, [$1..30]); # Robert Israel, Nov 23 2023
  • Mathematica
    Do[k = 1; While[ !PrimeQ[k*n! - 1], k++ ]; Print[k*n! - 1], {n, 2, 20}]
  • PARI
    a(n)=if(n<1,0,k=1; while(isprime(k*n!-1)==0,k++); k*n!-1)

Formula

a(n) = A083663(n)*n! - 1 = A038700(n!). - Robert Israel, Nov 23 2023

Extensions

Corrected and extended by Benoit Cloitre, Jun 14 2003

A086507 If n is even, a(n) = smallest prime == 1 (mod n), If n is odd, a(n) = smallest prime == -1 (mod n).

Original entry on oeis.org

2, 3, 2, 5, 19, 7, 13, 17, 17, 11, 43, 13, 103, 29, 29, 17, 67, 19, 37, 41, 41, 23, 137, 73, 149, 53, 53, 29, 173, 31, 61, 97, 131, 103, 139, 37, 73, 191, 233, 41, 163, 43, 257, 89, 89, 47, 281, 97, 97, 101, 101, 53, 211, 109, 109, 113, 113, 59, 353, 61, 487, 311, 251
Offset: 1

Views

Author

Amarnath Murthy, Jul 29 2003

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local x;
    if n::even then x:= 1 else x:= -1; fi;
    do
      x:= x+n;
      if isprime(x) then return x fi
    od
    end proc:
    map(f, [$1..100]); # Robert Israel, Dec 09 2020

Extensions

More terms from David Wasserman, Mar 09 2005
Showing 1-10 of 16 results. Next