The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A199920 Number of ways to write n = p+k with p, p+6, 6k-1 and 6k+1 all prime 10
 0, 0, 0, 0, 0, 1, 1, 2, 1, 2, 0, 3, 1, 3, 2, 2, 2, 3, 2, 2, 1, 2, 3, 3, 3, 1, 1, 3, 2, 4, 1, 2, 2, 3, 3, 3, 2, 4, 2, 4, 3, 3, 5, 3, 3, 3, 3, 4, 5, 3, 3, 3, 3, 5, 4, 4, 3, 4, 3, 3, 2, 3, 6, 5, 4, 2, 1, 3, 5, 5, 5, 2, 2, 3, 5, 3, 5, 4, 5, 2, 3, 2, 5, 5, 6, 4, 2, 3, 3, 4, 3, 3, 5, 4, 3, 1, 1, 4, 5, 7 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,8 COMMENTS Conjecture: a(n)>0 for all n>11. This implies that there are infinitely many twin primes and also infinitely many sexy primes. It has been verified for n up to 10^9. See also A199800 for a weaker version of this conjecture. Zhi-Wei Sun also conjectured that any integer n>6 not equal to 319 can be written as p+k with p, p+6, 3k-2+(n mod 2) and 3k+2-(n mod 2) all prime. LINKS Zhi-Wei Sun, Table of n, a(n) for n = 1..50000 Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv:1211.1588. EXAMPLE a(21)=1 since 21=11+10 with 11, 11+6, 6*10-1 and 6*10+1 all prime. MATHEMATICA a[n_]:=a[n]=Sum[If[PrimeQ[Prime[k]+6]==True&&PrimeQ[6(n-Prime[k])-1]==True&&PrimeQ[6(n-Prime[k])+1]==True, 1, 0], {k, 1, PrimePi[n]}] Do[Print[n, " ", a[n]], {n, 1, 100}] Table[Count[Table[{n-i, i}, {i, n-1}], _?(AllTrue[{#[[1]], #[[1]]+6, 6#[[2]]-1, 6#[[2]]+1}, PrimeQ]&)], {n, 100}] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 19 2015 *) PROG (PARI) a(n)=my(s, p=2, q=3); forprime(r=5, n+5, if(r-p==6 && isprime(6*n-6*p-1) && isprime(6*n-6*p+1), s++); if(r-q==6 && isprime(6*n-6*q-1) && isprime(6*n-6*q+1), s++); p=q; q=r); s \\ Charles R Greathouse IV, Jul 31 2016 CROSSREFS Cf. A001359, A006512, A023201, A199800, A219055, A219864, A219923, A002375. Sequence in context: A274576 A257081 A271484 * A177995 A332104 A238735 Adjacent sequences: A199917 A199918 A199919 * A199921 A199922 A199923 KEYWORD nonn,nice AUTHOR Zhi-Wei Sun, Dec 22 2012 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified March 1 01:59 EST 2024. Contains 370428 sequences. (Running on oeis4.)