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 25 results. Next

A139394 a(n) = A024899(n)-A024898(n).

Original entry on oeis.org

0, 0, 0, 1, 1, 0, 2, 2, 2, 1, 2, 2, 1, 3, 4, 3, 3, 2, 2, 3, 3, 3, 4, 0, 1, 5, 4, 4, 7, 7, 8, 7, 6, 8, 4, 4, 6, 4, 5, 5, 3, 4, 3, 6, 6, 9, 10, 9, 11, 11, 13, 8, 8, 8, 7, 8, 10, 9, 8, 10, 12, 12, 10, 11, 9, 8, 7, 8, 8, 5, 7, 6, 8, 7, 8, 9, 9, 13, 13, 11, 11, 12, 13, 11, 12, 13, 9, 11, 10, 11, 10, 6, 9
Offset: 1

Views

Author

Zak Seidov, Apr 18 2008

Keywords

Comments

From Zak Seidov, Nov 12 2008: (Start)
Conjecture: a(n) > 0, except n=1,2,3,6,24, when a(n)=0.
This fact can be apparently explained by existence of twin primes. (End)

Crossrefs

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

A002822 Numbers m such that 6m-1, 6m+1 are twin primes.

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 12, 17, 18, 23, 25, 30, 32, 33, 38, 40, 45, 47, 52, 58, 70, 72, 77, 87, 95, 100, 103, 107, 110, 135, 137, 138, 143, 147, 170, 172, 175, 177, 182, 192, 205, 213, 215, 217, 220, 238, 242, 247, 248, 268, 270, 278, 283, 287, 298, 312, 313, 322, 325
Offset: 1

Views

Author

Keywords

Comments

6m-1 and 6m+1 are twin primes iff m is not of the form 6ab +- a +- b. - Jon Perry, Feb 01 2002
The above equivalence was rediscovered by Balestrieri, see link. - Charles R Greathouse IV, Jul 05 2011
Even terms correspond to twin primes of the form (4k - 1, 4k + 1), odd terms to twin primes of the form (4k + 1, 4k + 3). - Lekraj Beedassy, Apr 03 2002
From Bob Selcoe, Nov 28 2014: (Start)
Except for a(1)=1, all numbers in this sequence are congruent to (0, 2 or 3) mod 5.
It appears that when a(n)=6j, then j is also in the sequence (e.g., 138 = 6*23; 312 = 6*52). This also appears to hold for sequence A191626. If true, then it suggests that when seeking large twin primes, good candidates might be 36*a(n) +- 1, n >= 2.
Conjecture: There is at least one number in the sequence in the interval [5k, 7k] inclusive, k >= 1. If true, then the twin prime conjecture also is true.
(End)
A counterexample to "It appears that ...": Take j = 63. Then 6j = 378 and 36j = 2268. Now 379, 2267, and 2269 are prime, but 377 = 13 * 29. The sequence of counterexamples is A263282. - Jason Kimberley, Oct 13 2015
Dinculescu calls all terms in the sequence "twin ranks", and all other positive integers "non-ranks", see links. Non-ranks are given by the formula kp +- round(p/6) for positive integers k and primes p > 4, while twin ranks (this sequence) cannot be represented as kp +- round(p/6) for any k, p > 4. Here round(p/6) is the nearest integer to p/6. - Alexei Kourbatov, Jan 03 2015
Number of terms less than 10^k: 0, 5, 25, 142, 810, 5330, 37915, ... - Muniru A Asiru, Jan 24 2018
6m-1 and 6m+1 are twin primes iff 36m^2-1 is semiprime. It is algebraically provable that 36m^2-1 having any factor of the form 6k+-1 is equivalent to the statement that m is congruent to +-k (mod (6k+-1)). Other than the trivial case m=k, the fact of such a congruence means 36m^2-1 has a factor other than 6m-1 and 6m+1, and is not semiprime. Thus, {a(n)} lists the numbers m such that for all k < m, m is not congruent to +-k modulo (6k+-1). This is an alternative formulation of the results of Dinculescu referenced above. - Keith Backman, Apr 25 2021
Other than a(1)=1, it is provable that a(n) is not a square unless it is a multiple of 5, and a(n) is not a cube unless it is a multiple of 7. Examples of the former include a(11)=5^2=25, a(26)=10^2=100, and a(166)=35^2=1225; examples of the latter are rarer, including a(1531)=28^3=21952 and a(4163)=42^3=74088. - Keith Backman, Jun 26 2021

References

  • W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, p. 69.
  • W. Sierpiński, A Selection of Problems in the Theory of Numbers. Macmillan, NY, 1964, p. 120.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Complement of A067611.
Intersection of A024898 and A024899.
A191626 is a subsequence.

Programs

  • Haskell
    a002822 n = a002822_list !! (n-1)
    a002822_list = f a000040_list where
       f (q:ps'@(p:ps)) | p > q + 2 || r > 0 = f ps'
                        | otherwise = y : f ps where (y,r) = divMod (q + 1) 6
    -- Reinhard Zumkeller, Jul 13 2014
  • Magma
    [n: n in [1..200] | IsPrime(6*n+1) and IsPrime(6*n-1)] // Vincenzo Librandi, Nov 21 2010
    
  • Maple
    select(n -> isprime(6*n-1) and isprime(6*n+1), [$1..1000]); # Robert Israel, Jan 11 2015
  • Mathematica
    Select[ Range[350], PrimeQ[6# - 1] && PrimeQ[6# + 1] & ]
    Select[Range[400],AllTrue[6#+{1,-1},PrimeQ]&] (* Harvey P. Dale, Jul 27 2022 *)
    #/6&/@Select[Range[6,2500,6],AllTrue[#+{1,-1},PrimeQ]&] (* Harvey P. Dale, Mar 31 2023 *)
  • PARI
    select(primes(100),n->isprime(n-2)&&n>5)\6 \\ Charles R Greathouse IV, Jul 05 2011
    
  • PARI
    p=5; forprime(q=5, 1e4, if(q-p==2, print1((p+1)/6", ")); p=q); \\ Altug Alkan, Oct 13 2015
    
  • PARI
    list(lim)=my(v=List(),p=5); forprime(q=7,6*lim+1, if(q-p==2, listput(v,q\6)); p=q); Vec(v) \\ Charles R Greathouse IV, Dec 03 2016
    

Formula

a(n) = A014574(n+1)/6. - Ivan N. Ianakiev, Aug 19 2013

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 27 2001

A046953 Numbers k such that 6*k - 1 is composite.

Original entry on oeis.org

6, 11, 13, 16, 20, 21, 24, 26, 27, 31, 34, 35, 36, 37, 41, 46, 48, 50, 51, 54, 55, 56, 57, 61, 62, 63, 66, 68, 69, 71, 73, 76, 79, 81, 83, 86, 88, 89, 90, 91, 92, 96, 97, 101, 102, 104, 105, 106, 111, 112, 115, 116, 118, 119, 121, 122, 123, 125, 126, 128
Offset: 1

Views

Author

Keywords

Comments

These numbers can be written as 6*x*y + x - y for x > 0, y > 0. - Ron R Spencer, Aug 01 2016

Examples

			a(1)=6 because 6*6 - 1 = 35, which is composite.
		

Crossrefs

Cf. A046954, A008588, A016969, subsequence of A067611.
Cf. A024898 (complement).

Programs

  • GAP
    Filtered([1..200], k-> not IsPrime(6*k-1)) # G. C. Greubel, Feb 21 2019
  • Haskell
    a046953 n = a046953_list !! (n-1)
    a046953_list = map (`div` 6) $
       filter ((== 0) . a010051' . subtract 1) [6,12..]
    -- Reinhard Zumkeller, Jul 13 2014
    
  • Magma
    [n: n in [1..200] | not IsPrime(6*n-1)]; // G. C. Greubel, Feb 21 2019
    
  • Maple
    remove(k-> isprime(6*k-1), [$1..130])[]; # Muniru A Asiru, Feb 22 2019
  • Mathematica
    Select[Range[200],!PrimeQ[6#-1]&] (* Vladimir Joseph Stephan Orlovsky, Feb 25 2011 *)
  • PARI
    is(n)=!isprime(6*n-1) \\ Charles R Greathouse IV, Aug 01 2016
    
  • Sage
    [n for n in (1..200) if not is_prime(6*n-1)] # G. C. Greubel, Feb 21 2019
    

Formula

a(n) ~ n. - Charles R Greathouse IV, Aug 01 2016

A056956 Numbers n such that 6n+1 and 6n+5 are both primes.

Original entry on oeis.org

1, 2, 3, 6, 7, 11, 13, 16, 17, 18, 21, 27, 32, 37, 38, 46, 51, 52, 58, 63, 66, 73, 76, 77, 81, 83, 102, 107, 112, 123, 126, 128, 137, 142, 143, 146, 147, 151, 156, 161, 168, 181, 182, 202, 213, 216, 217, 237, 238, 241, 247, 248, 258, 261, 263, 266, 268, 277, 282
Offset: 1

Views

Author

Henry Bottomley, Jul 18 2000

Keywords

Comments

Note that if prime p>3 then p mod 6 = 1 or 5.

Examples

			a(2)=2 since 6*2+1=13 and 6*2+5=17 are both prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[300], And @@ PrimeQ /@ ({1, 5} + 6#) &] (* Ray Chandler, Jun 29 2008 *)
  • PARI
    is(n)=isprime(n*6+1)&&isprime(n*6+5) \\ M. F. Hasler, Apr 05 2017

Formula

a(n) = (A023200(n+1)-1)/6 = (A046132(n+1)-5)/6 = A047847(n+1)/3
a(n) = floor(A087679(n+1)/6). - M. F. Hasler, Apr 05 2017

Extensions

Edited by N. J. A. Sloane, Nov 07 2006

A110801 Numbers n such that 12n + 1 is prime.

Original entry on oeis.org

1, 3, 5, 6, 8, 9, 13, 15, 16, 19, 20, 23, 26, 28, 29, 31, 33, 34, 35, 36, 38, 45, 48, 50, 51, 55, 56, 59, 61, 63, 64, 69, 71, 73, 78, 83, 84, 85, 86, 89, 91, 93, 94, 96, 100, 101, 103, 104, 108, 110, 115, 119, 121, 124, 129, 133, 134, 135, 138, 139, 141, 145, 146, 148
Offset: 1

Views

Author

Parthasarathy Nambi, Oct 20 2005

Keywords

Comments

Corresponds to even numbers in A024898. - Michael B. Porter, Oct 27 2009

Examples

			If n=96 then 12*n + 1 = 1153 (prime).
		

Crossrefs

Cf. A167055, A167056, A167057, A024898; primes are in A068228. - Michael B. Porter, Oct 27 2009

Programs

Extensions

More terms from Klaus Brockhaus, Jan 02 2009

A158015 Primes p such that 6*p-1 is also prime.

Original entry on oeis.org

2, 3, 5, 7, 17, 19, 23, 29, 43, 47, 53, 59, 67, 103, 107, 109, 113, 127, 137, 157, 163, 197, 199, 227, 229, 239, 269, 283, 313, 317, 347, 359, 373, 379, 383, 389, 397, 439, 443, 449, 457, 463, 467, 523, 569, 577, 593, 599, 613, 617, 647, 653, 709, 733, 743, 773
Offset: 1

Views

Author

Roger L. Bagula, Mar 11 2009

Keywords

Crossrefs

Cf. A005382 for the type 2p-1, A062737 for 4p-1, A158016 for 8p-1, A158017 for 10p-1.
Primes in A024898, i.e., intersection of A024898 with A000040.

Programs

  • Magma
    [p: p in PrimesUpTo(800) | IsPrime(6*p-1)]; // Vincenzo Librandi, Apr 14 2013
  • Mathematica
    Select[Prime[Range[200]], PrimeQ[(6 # - 1)]&] (* Vincenzo Librandi, Apr 14 2013 *)

Extensions

Edited by the Associate Editors of the OEIS, Apr 22 2009

A121763 Numbers n such that 6*n-1 is prime while 6*n+1 is composite.

Original entry on oeis.org

4, 8, 9, 14, 15, 19, 22, 28, 29, 39, 42, 43, 44, 49, 53, 59, 60, 64, 65, 67, 74, 75, 78, 80, 82, 84, 85, 93, 94, 98, 99, 108, 109, 113, 114, 117, 120, 124, 127, 129, 133, 140, 144, 148, 152, 155, 157, 158, 159, 162, 163, 164, 169, 183, 184, 185, 194, 197, 198, 199
Offset: 1

Views

Author

Lekraj Beedassy, Aug 20 2006

Keywords

Comments

Entries of A024898 which are not in A002822 or equivalently, entries of A046954 which are not in A060461.

Crossrefs

Programs

  • GAP
    Filtered([1..250], k-> IsPrime(6*k-1) and not IsPrime(6*k+1)); # G. C. Greubel, Feb 20 2019
  • Magma
    [n: n in [1..250] | IsPrime(6*n-1) and not IsPrime(6*n+1)]; // G. C. Greubel, Feb 20 2019
    
  • Mathematica
    Select[Range[200], PrimeQ[6# -1] && !PrimeQ[6# +1] &] (* Ray Chandler, Aug 22 2006 *)
  • PARI
    for(n=1, 250, if(isprime(6*n-1) && !isprime(6*n+1), print1(n", "))) \\ G. C. Greubel, Feb 20 2019
    
  • Sage
    [n for n in (1..250) if is_prime(6*n-1) and not is_prime(6*n+1)] # G. C. Greubel, Feb 20 2019
    

Extensions

Extended by Ray Chandler, Aug 22 2006

A167020 a(n) = 1 iff 6n-1 is prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0
Offset: 1

Views

Author

Washington Bomfim, Oct 27 2009

Keywords

Examples

			a(5) = 1 because 6*5-1 is prime, a(6) = 0 since 6*6-1 is composite.
		

Crossrefs

Programs

  • Magma
    [IsPrime(6*n-1) select 1 else 0: n in[1..100]]; // Vincenzo Librandi, Jan 19 2019
  • Mathematica
    Table[If[PrimeQ[6 n - 1], 1, 0], {n, 100}] (* Vincenzo Librandi, Jan 19 2019 *)
  • PARI
    a(n) = isprime(6*n-1); \\ Michel Marcus, Jan 19 2019
    

A111863 a(n) is the smallest prime factor of 6*n-1 that is congruent to 5 modulo 6.

Original entry on oeis.org

5, 11, 17, 23, 29, 5, 41, 47, 53, 59, 5, 71, 11, 83, 89, 5, 101, 107, 113, 17, 5, 131, 137, 11, 149, 5, 23, 167, 173, 179, 5, 191, 197, 29, 11, 5, 17, 227, 233, 239, 5, 251, 257, 263, 269, 5, 281, 41, 293, 23, 5, 311, 317, 17, 47, 5, 11, 347, 353, 359, 5, 53, 29, 383, 389, 5
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 20 2005

Keywords

Comments

From Robert Israel, Jan 18 2023: (Start)
a(n) = 5 if n == 1 (mod 5).
a(n) = 6*n - 1 if n is in A024898. (End)

Examples

			For n = 13, 6*n - 1 = 77 = 7*11; 7 == 1 (mod 6), but 11 == 5 (mod 6), so a(13) = 11.
		

References

  • G. Pólya and G. Szegő, Problems and Theorems in Analysis I (Springer 1924, reprinted 1972), Part Eight, Chap. 2, Section 2, Problem 96.

Crossrefs

Programs

  • Maple
    f:= n -> min(select(p -> p mod 6 = 5, numtheory:-factorset(6*n-1))):
    map(f, [$1..100]); # Robert Israel, Jan 18 2023
  • PARI
    for(k=1,60,my(f=factor(6*k-1)[,1]);for(j=1,#f,if(f[j]%6==5,print1(f[j],", ");break))) \\ Hugo Pfoertner, Dec 25 2019
Showing 1-10 of 25 results. Next