

A002822


Numbers m such that 6m1, 6m+1 are twin primes.
(Formerly M0641 N0235)


90



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

6m1 and 6m+1 are twin primes iff m is not of the form 6ab + a + b.  Jon Perry, Feb 01 2002
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
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 "nonranks", see links. Nonranks 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
6m1 and 6m+1 are twin primes iff 36m^21 is semiprime. It is algebraically provable that 36m^21 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^21 has a factor other than 6m1 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. AddisonWesley, 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).


LINKS



FORMULA



MAPLE

select(n > isprime(6*n1) 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 *)


PROG

(Magma) [n: n in [1..200]  IsPrime(6*n+1) and IsPrime(6*n1)] // Vincenzo Librandi, Nov 21 2010
(PARI) p=5; forprime(q=5, 1e4, if(qp==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(qp==2, listput(v, q\6)); p=q); Vec(v) \\ Charles R Greathouse IV, Dec 03 2016
(Haskell)
a002822 n = a002822_list !! (n1)
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


CROSSREFS



KEYWORD

nonn,nice,easy


AUTHOR



EXTENSIONS

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


STATUS

approved



