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 61-70 of 80 results. Next

A275515 Table read by rows: list of prime triples of the form (p, p+2, p+6).

Original entry on oeis.org

5, 7, 11, 11, 13, 17, 17, 19, 23, 41, 43, 47, 101, 103, 107, 107, 109, 113, 191, 193, 197, 227, 229, 233, 311, 313, 317, 347, 349, 353, 461, 463, 467, 641, 643, 647, 821, 823, 827, 857, 859, 863, 881, 883, 887, 1091, 1093, 1097, 1277, 1279, 1283, 1301, 1303, 1307
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jul 31 2016

Keywords

Comments

A prime triple is a set of three prime numbers of the form (p, p+2, p+6) or (p, p+4, p+6).
Initial members p (other than 5) of prime triples of the form (p, p+2, p+6) are congruent to 11 or 17 (mod 30).
Also called prime triples of the first kind.

Examples

			The table starts:
5, 7, 11;
11, 13, 17;
17, 19, 23;
...
		

Crossrefs

Programs

  • Magma
    &cat[[p, p+2, p+6]: p in PrimesUpTo(1301) | (p le 5 xor p mod 30 in {11, 17}) and IsPrime(p+2) and IsPrime(p+6)];
  • Mathematica
    Prime@ Range[#, # + 2] &@ PrimePi@ Select[Prime@ Range@ 216, Times @@ Boole@ PrimeQ[# + {2, 6}] > 0 &] // Flatten (* Michael De Vlieger, Aug 02 2016 *)

Formula

a(3*n-2) = A022004(n).

A282423 a(n) = smallest k such that A282026(k) = n, or 0 if no such k exists.

Original entry on oeis.org

3, 2, 0, 13, 19, 0, 427, 4, 0, 0, 1, 0, 802, 99412, 0, 3097, 7, 0, 637, 0, 0, 7225627, 30898822, 0, 0, 280134277, 0, 31705902442, 43190647, 0, 965577112
Offset: 1

Views

Author

Andrey Zabolotskiy and Altug Alkan, Feb 14 2017, following a suggestion from N. J. A. Sloane

Keywords

Comments

a(n) is nonzero if n is in A282429.
For n>4 and nonzero a(n), 2*a(n)+3 is in A022004. For n>8 and nonzero a(n), 2*a(n)+3 is also in A153417. For n>16 and nonzero a(n), 2*a(n)+3 is also in A049481.

Examples

			a(10) = 0. Proof: Suppose 10 is a term of A282026. For the corresponding n, 2*n + 1 cannot be divisible by 5 because of A282026’s definition (gcd(10, 2*n + 1) = 1). So 2*n + 1 can be only of the form 10*k + 1, 10*k + 3, 10*k + 7, 10*k + 9. But 10*k + 1 + 2*2, 10*k + 3 + 2*1, 10*k + 7 + 2*4, 10*k + 9 + 2*8 are all composite and 1, 2, 4, 8 are relatively prime to any odd number. Since all of them are smaller than 10, this is the contradiction to the assumption that 10 is the term which is the smallest number for corresponding n. This also proves that a(5*k) = 0 for any k > 1.
		

Crossrefs

A291624 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = x + 2*y + 5*z, p - 2 and p + 4 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 28 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1 not divisible by 4.
See also A291635 for a stronger conjecture.

Examples

			a(2) = 1 since 2 = 0^2 + 1^2 + 1^2 + 0^2 with 0 + 2*1 + 5*1 = 7, 7 - 2 = 5 and 7 + 4 = 11 all prime.
a(5) = 1 since 5 = 2^2 + 0^2 + 1^2 + 0^2 with 2 + 2*0 + 5*1 = 7, 7 - 2 = 5 and 7 + 4 = 11 all prime.
a(181) = 1 since 181 = 1^2 + 6^2 + 0^2 + 12^2 with 1 + 2*6 + 5*0 = 13, 13 - 2 = 11 and 13 + 4 = 17 all prime.
a(285) = 1 since 285 = 10^2 + 4^2 + 5^2 + 12^2 with 10 + 2*4 + 5*5 = 43, 43 - 2 = 41 and 43 + 4 = 47 all prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    TQ[p_]:=TQ[p]=PrimeQ[p]&&PrimeQ[p-2]&&PrimeQ[p+4];
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&TQ[x+2y+5z],r=r+1],{x,0,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r],{n,1,100}]

A291635 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = x + 2*y + 5*z, p - 2, p + 4 and p + 10 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 28 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1 not divisible by 4.
This is stronger than the conjecture in A291624. Obviously, it implies that there are infinitely many prime quadruples (p-2, p, p+4, p+10).
We have verified that a(n) > 0 for any integer 1 < n < 10^7 not divisible by 4.

Examples

			a(61) = 1 since 61 = 4^2 + 0^2 + 3^2 + 6^2 with 4 + 2*0 + 5*3 = 19, 19 - 2 = 17, 19 + 4 = 23 and 19 + 10 = 29 all prime.
a(253) = 1 since 253 = 12^2 + 8^2 + 3^2 + 6^2 with 12 + 2*8 + 5*3 = 43, 43 - 2 = 41, 43 + 4 = 47 and 43 + 10 = 53 all prime.
a(725) = 1 since 725 = 7^2 + 0^2 + 0^2 + 26^2 with 7 + 2*0 + 5*0 = 7, 7 - 2 = 5, 7 + 4 = 11 and 7 + 10 = 17 all prime.
a(1511) = 1 since 1511 = 18^2 + 15^2 + 11^2 + 29^2 with 18 + 2*15 + 5*11 = 103, 103 - 2 = 101, 103 + 4 = 107 and 103 + 10 = 113 all prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    PQ[p_]:=PQ[p]=PrimeQ[p]&&PrimeQ[p-2]&&PrimeQ[p+4]&&PrimeQ[p+10]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&PQ[x+2y+5z],r=r+1],{x,0,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r],{n,1,100}]

A357052 Distance from 10^n to the next prime triplet.

Original entry on oeis.org

4, 1, 1, 87, 267, 357, 33, 451, 2011, 2821, 10687, 2497, 5073, 5557, 15243, 7147, 7357, 7197, 6627, 9157, 26317, 25833, 39207, 56067, 6667, 32937, 70561, 106533, 597, 28503, 19167, 74551, 301711, 6747, 246871, 223353, 63057, 75183, 48513, 61323, 16107, 554287, 160141, 29821, 220711, 49441
Offset: 0

Views

Author

M. F. Hasler, Sep 14 2022

Keywords

Comments

Equivalently, least k > 0 such that either 10^n + k + {0, 2, 6} or 10^n + k + {0, 4, 6} are primes.
The initial term, index n = 0, is the only even term and the only case where the last member of the triplet has one digit more than the first member. The value a(0) = 4 correspond to the prime triplet (5, 7, 11). We do not consider the triplets (2, 3, 5) or (3, 5, 7) which come earlier but do not follow the standard pattern.

Examples

			(11, 13, 17) and (101, 103, 107) are the smallest 2-digit and 3-digit prime triplets, at distance a(1) = a(2) = 1 from 10^1 and 10^2, respectively.
(1087, 1091, 1093) is the smallest 4-digit prime triplet, at distance a(3) = 87 from 10^3.
a(6999) = 1141791245437 is the distance from 10^6999 to the smallest 7000 digit prime triplet, of the form (p, p+2, p+6).
		

Crossrefs

Cf. A007529 (start of prime triplets), A022004 and A022005 (start of prime triples {0,2,6} resp. {0,4,6}), A343635 (same for quintuplets).

Programs

  • Maple
    f:= proc(n) local p;
       for p from 10^n + 1 by 2 do
         if p mod 3 = 1 then if isprime(p) and isprime(p+4) and isprime(p+6) then return p-10^n fi
         elif p mod 3 = 2 and isprime(p) and isprime(p+2) and isprime(p+6) then
    return p-10^n
         fi
       od;
    end proc:
    f(0):= 4:
    map(f, [$0..45]); # Robert Israel, Sep 15 2022
    A357052 := proc(n) local p,q,r; p,q,r := 10^n,0,0; while p-r <> 6 do p,q,r := nextprime(p+1),p,q; od; r-10^n; end; # M. F. Hasler, Sep 15 2022
  • PARI
    A357052(n,q=-9,r=-9)=forprime(p=10^n,,p-r<7 && return(r-10^n);[q,r]=[p,q])

Formula

a(n) = min{ k>0 | 10^n + k + [0, 6] contains 3 primes }.
a(n) = min A007529 ∩ [10^n, oo) for n > 0.

A372247 Lowest prime p in a ladder of 4 consecutive primes p, p+2, p+6, p+14.

Original entry on oeis.org

1997, 2237, 2267, 2657, 6197, 6827, 8087, 17027, 17387, 19427, 21017, 21377, 22277, 22637, 23057, 24107, 29567, 37307, 43397, 43787, 53087, 55337, 56807, 58907, 62297, 65537, 65837, 78887, 81017, 82007, 82217, 89597, 90017, 91367, 93887, 95087, 97547, 105527, 108287, 110567, 112247, 113357
Offset: 1

Views

Author

R. J. Mathar, Apr 24 2024

Keywords

Examples

			2267, 2269, 2273 and 2281 are consecutive primes with gaps of 2, 4 and 8, so 2267 is in the sequence.
		

Crossrefs

Subsequence of A022004. A372248 is a subsequence.

Programs

  • Mathematica
    First /@ Parallelize[
      Select[Table[NextPrime[Prime@i, Range@4], {i, 10^5}],
       Differences@# == {2, 4, 8} &]] (* Mikk Heidemaa, Apr 25 2024 *)

A212361 Number of primes between two consecutive prime triples (p, p+2, p+6).

Original entry on oeis.org

0, 0, 3, 10, 0, 12, 3, 12, 2, 17, 24, 23, 3, 1, 27, 21, 3, 10, 6, 0, 14, 30, 13, 8, 16, 1, 45, 3, 65, 23, 5, 17, 27, 6, 13, 43, 9, 15, 12, 3, 28, 25, 0, 14, 59, 70, 114, 18, 13, 5, 21, 37, 60, 1, 93, 5, 1, 71, 54, 36, 86, 7, 67, 6, 9, 0, 15, 16, 30, 108, 7, 31
Offset: 1

Views

Author

Michel Lagneau, Jun 29 2012

Keywords

Examples

			a(4)= 10 because between the 4th and 5th prime triples there are 10 primes: (41,43,47) 53, 59 61, 67, 71, 73, 79, 83, 89, 97 (101,103,107).
		

Crossrefs

Programs

  • Maple
    with(numtheory):T:=array(1..1000):k:=1:for n from 1 to 4000 do:p:=ithprime(n):if type(p+2,prime)=true and type(p+6,prime) = true then T[k]:=p:T[k+1]:=p+6:k:=k+2:else fi:od:for m from 2 by 2 to k-2 do: p1:= T[m]:p2:=T[m+1]:i:=0:for q from p1+1 to p2-1 do:if type(q,prime)=true then i:=i+1:else fi:od: printf(`%d, `,i):od:
  • Mathematica
    If[#>0,#-1,#]&/@(PrimePi[#[[1]]]-PrimePi[#[[2]]]&/@({#[[2,1]], #[[1,3]]}&/@ Partition[Select[Partition[Prime[Range[2000]],3,1], Differences[#]=={2,4}&],2,1])) (* Harvey P. Dale, Jun 08 2016 *)

A213997 Number of integers between successive prime triples (p, p+2, p+6).

Original entry on oeis.org

0, 0, 17, 53, 0, 77, 29, 77, 29, 107, 173, 173, 29, 17, 203, 179, 17, 119, 47, 0, 113, 257, 119, 77, 149, 23, 383, 23, 557, 203, 59, 137, 239, 77, 119, 383, 113, 143, 137, 29, 257, 239, 17, 143, 539, 623, 1043, 203, 137, 53, 239, 317, 563, 23, 863, 89, 23, 707
Offset: 1

Views

Author

Michel Lagneau, Jun 30 2012

Keywords

Comments

Property of this sequence: either a(n) is odd == 2 (mod 3), or a(n) =0.

Examples

			a(3)= 17 because between the 3rd and 4th prime triples there are 17 integers: (17,19,23), 24, 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, (41,43,47).
		

Crossrefs

Programs

  • Maple
    A213997 := proc(n)
            max(0,A022004(n+1)-A022004(n)-7) ;
    end proc: # R. J. Mathar, Jul 11 2012
  • Mathematica
    Flatten[Differences/@Table[Take[Flatten[Select[Partition[Prime[ Range[ 2000]],3,1], Differences[#]=={2,4}&]],{3n,3n+1}],{n,60}]]-1/.{-1->0} (* Harvey P. Dale, Jun 10 2014 *)

A214450 Smallest prime p such that n primes exist between the prime triple (p, p+2, p+6) and the next prime triple.

Original entry on oeis.org

5, 857, 311, 17, 31391, 3461, 1427, 12917, 1997, 4517, 41, 20747, 107, 1871, 1487, 4637, 2081, 347, 7877, 23057, 80777, 1091, 18041, 641, 461, 5231, 21017, 881, 4967, 45821, 1607, 15731, 165311, 17027, 35591, 26261, 11777, 8537, 64151, 101111, 82757, 23741
Offset: 0

Views

Author

Michel Lagneau, Jul 18 2012

Keywords

Examples

			a(3)= 17 because there exists 3 primes 29, 31 and 37 are between (17, 19,23) and (41,43,47).
		

Crossrefs

Programs

  • Maple
    A214450 := proc(n)
    local j, hi, lo ;
    if n = 0 then
    3;
    else
    for j from 1 do
    hi := numtheory[pi]( A022004 (j+1)) ;
    lo := numtheory[pi]( A098412 (j)) ;
    if hi-lo = n+1 then
    return A022004 (j);
    end if;
    end do:
    end if;
    end proc: # [Program from R. J. Mathar, adapted for this sequence (see A089637)].

A236552 a(n) = |{0 < k < n: 6*k - 1, 6*k + 1, 6*k + 5 and prime(n-k) + 6 are all prime}|.

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 3, 3, 2, 3, 2, 3, 3, 4, 2, 3, 2, 3, 3, 4, 4, 5, 4, 4, 3, 4, 3, 5, 5, 5, 2, 2, 4, 3, 4, 3, 3, 4, 5, 3, 5, 4, 6, 6, 6, 4, 4, 1, 3, 6, 5, 2, 4, 4, 5, 6, 8, 6, 5, 4, 8, 4, 4, 5, 7, 6, 4, 4, 4, 6, 6, 5, 5, 6, 6, 7, 6, 4, 3, 5, 7, 3, 4, 4, 3, 6, 5, 5, 6, 6, 7, 5, 4, 3, 5, 5, 3, 3, 2, 2
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 28 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 3.
(ii) For any integer n > 4, there is a positive integer k < n such that 6*k - 5, 6*k - 1, 6*k + 1 and prime(n-k) + 6 are all prime.
(iii) Any integer n > 7 can be written as p + q with q > 0 such that p, p + 6 and prime(q) + 6 are all prime.
(iv) Each integer n > 4 can be written as k*(k+1) + m with k > 0 and m > 0 such that prime(m) + 6 is prime.

Examples

			a(4) = 1 since 6*1 - 1, 6*1 + 1, 6*1 + 5 and prime(4-1) + 6 = 11 are all prime.
a(48) = 1 since 6*32 - 1 = 191, 6*32 + 1 = 193, 6*32 + 5 = 197 and prime(48-32) + 6 = 53 + 6 = 59 are all prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[6n-1]&&PrimeQ[6n+1]&&PrimeQ[6n+5]
    q[n_]:=PrimeQ[Prime[n]+6]
    a[n_]:=Sum[If[p[k]&&q[n-k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]
Previous Showing 61-70 of 80 results. Next