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-4 of 4 results.

A008470 At least 3 out of 10m+1, 10m+3, 10m+7, 10m+9 are primes.

Original entry on oeis.org

1, 4, 7, 10, 13, 19, 22, 31, 43, 46, 61, 64, 82, 85, 88, 103, 106, 109, 130, 142, 145, 148, 160, 166, 169, 178, 187, 199, 208, 238, 268, 271, 316, 325, 346, 367, 376, 391, 400, 409, 415, 421, 451, 472, 478, 493, 523, 541, 544, 547, 550, 565, 574, 586, 670, 682
Offset: 1

Views

Author

Keywords

Comments

From M. F. Hasler, Mar 03 2014: (Start)
The decade m must be of the form 3k+1, since for m=3k, 10m+3 and 10m+9 cannot be prime and for m=3k+2, 10k+1 and 10k+7 cannot be prime. See A238713 for the least member of the triple, i.e., the first prime of the corresponding decade.
The first occurrence of 5 consecutive triples is: 11, 13, 17 (or 19) ; 41, 43, 47 ; 71, 73, 79 ; 101, 103, 107 (or 109) ; 131, 137, 139. This corresponds to decades 1,4,7,10,13; i.e., the first 5 terms of this sequence. The next occurrence of 4 consecutive triples starts with decade m=541, and the next occurrence of 5 consecutive triples starts with decade m=910052463685 (found by J. K. Andersen). (End)

Programs

  • PARI
    is_A008470(m)=primepi(10*m+10) > primepi(10*m)+2. \\ M. F. Hasler, Mar 03 2014
    
  • PARI
    is(n)=if(isprime(10*n+1), if(isprime(10*n+3), isprime(10*n+7) || isprime(10*n+9), isprime(10*n+7) && isprime(10*n+9)), isprime(10*n+3)&&isprime(10*n+7)&&isprime(10*n+9)) \\ Charles R Greathouse IV, Mar 03 2014
    
  • Python
    from sympy import isprime
    def ok(m): return sum(isprime(10*m+i) for i in [1, 3, 7, 9]) >= 3
    print(list(filter(ok, range(700)))) # Michael S. Branicky, Sep 12 2021

Formula

m is a term <=> primepi(10m+10) > primepi(10m)+2. - M. F. Hasler, Mar 03 2014

Extensions

a(45) and beyond from Michael S. Branicky, Sep 12 2021

A238715 Least prime of a run of 3 or more consecutive decadal prime triples.

Original entry on oeis.org

11, 821, 1031, 1423, 5413, 13691, 140831, 220873, 266023, 283571, 464741, 1596311, 1660661, 1966813, 2655403, 3303341, 5191331, 5485393, 8125511, 14241911, 14848511, 15586993, 15852043, 16539163, 19608041, 19696841, 30624071, 31809073, 35493551, 38335541, 40430771
Offset: 1

Views

Author

M. F. Hasler, Mar 03 2014

Keywords

Comments

Sequence A008470 lists "prime triple decades", i.e., numbers m>1 such that the interval (10m,10m+10) contains at least 3 primes. The decades must be of the form m=3k+1, since for m=3k, 10m+3 and 10m+9 cannot be prime and for m=3k+2, 10k+1 and 10k+7 cannot be prime. Thus, "consecutive" prime triples are meant here in the sense of consecutive k-values.
Alternatively, the present sequence lists the terms A238713(n) for which A238713(n+2) <= A238713(n)+75, or equivalently, floor(A238713(n+2)/30) <= floor(A238713(n)/30)+2, but only if A238713(n-1) < A238713(n)-15, to keep only the first of a possibly longer run, cf. example.
See A238716 for the length of the runs of "consecutive" decades A008470 in this sense.

Examples

			The first occurrence of 5 consecutive triples is: {11, 13, 17 (or 19)} ; {41, 43, 47} ; {71, 73, 79} ; {101, 103, 107 (or 109)} ; {131, 137, 139}. This corresponds to decades 1,4,7,10,13; i.e., the first 5 terms of sequence A008470. The present sequence only lists a(1)=11, but not 41 or 71 which also start a run of 3 consecutive prime triple decades, but they are not listed because already part of the run starting at a(1).
The next occurrence of 4 consecutive triples starts with decade m=541, and the next occurrence of 5 consecutive triples starts with decade m=910052463685, at p = 9100524636851 (found by J. K. Andersen).
		

Crossrefs

Programs

  • PARI
    {d=10; p=primepi(d); i=0; while( po=p, p=primepi( d+=10 ); p>2+po && i++ && (p=primepi(d+=20)) && next; i || next; i>=3 && print1(nextprime(d-10-30*i)", ");i=0;)} \\ this could be optimized ...
    
  • PARI
    isA238713(n)=my(t=n%10); if(t==1, isprime(n) && if(isprime(n+2), isprime(n+6) || isprime(n+8), isprime(n+6) && isprime(n+8)), t==3 && isprime(n) && !isprime(n-2) && isprime(n+4) && isprime(n+6))
    isA008470(n)=if(isprime(10*n+1), if(isprime(10*n+3), isprime(10*n+7) || isprime(10*n+9), isprime(10*n+7) && isprime(10*n+9)), isprime(10*n+3) && isprime(10*n+7) && isprime(10*n+9))
    is(n)=isA238713(n) && isA008470(n\10+3) && isA008470(n\10+6) && !isA008470(n\10-3) \\ Charles R Greathouse IV, Mar 04 2014

Extensions

a(20)-a(31) from Charles R Greathouse IV, Mar 04 2014

A238730 The largest prime in each decade (10k,10k+10) containing at least three primes.

Original entry on oeis.org

7, 19, 47, 79, 109, 139, 199, 229, 317, 439, 467, 619, 647, 829, 859, 887, 1039, 1069, 1097, 1307, 1429, 1459, 1489, 1609, 1669, 1699, 1789, 1879, 1999, 2089, 2389, 2689, 2719, 3169, 3259, 3469, 3677, 3769, 3919, 4007, 4099, 4159, 4219, 4519, 4729, 4789, 4937, 5237, 5419, 5449, 5479, 5507, 5659, 5749, 5869, 6709, 6829
Offset: 1

Views

Author

M. F. Hasler, Mar 03 2014

Keywords

Comments

The initial term 7 does not correspond to a "decadal prime triple" according to the strict definition of A008470.

Crossrefs

Programs

  • Maple
    f:= proc(k) local P;
       P:= select(isprime, [10*k+1,10*k+3,10*k+7,10*k+9]);
       if nops(P) >= 3 then max(P) fi
    end proc:f(0):= 7:map(f, [$0..1000]); # Robert Israel, Jun 08 2020
  • PARI
    p=0; for(d=1,999,2+p < (p=primepi(10*d)) && print1(precprime(d*10)","))

A238716 Run lengths of decadal prime triples.

Original entry on oeis.org

5, 2, 1, 2, 2, 3, 3, 1, 3, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1
Offset: 1

Views

Author

M. F. Hasler, Mar 03 2014

Keywords

Comments

Length of runs of "consecutive" (step = 3) values in A008470, which lists "prime triple decades", i.e., numbers m>1 such that the interval (10m,10m+10) contains at least 3 primes. The decades must be of the form m=3k+1, since for m=3k, 10m+3 and 10m+9 cannot be prime and for m=3k+2, 10k+1 and 10k+7 cannot be prime. Thus, "consecutive" prime triples are meant here in the sense of consecutive k-values.

Examples

			The first occurrence of 5 consecutive triples is: {11, 13, 17 (or 19)} ; {41, 43, 47} ; {71, 73, 79} ; {101, 103, 107 (or 109)} ; {131, 137, 139}. This corresponds to decades 1,4,7,10,13; i.e., the first 5 terms of sequence A008470. Therefore, a(1)=5.
The next "decadal prime triples" start at A238713(6)=191 and A238713(7)=223, they form the next run of length a(2)=2, since the decades A008470(6)=19 and A008470(7)=22 differ by the minimum which is 3, but the next one is further away.
The next term A238713(8)=311 starts an "isolated" decadal prime triple, i.e., the next "run" of length a(3)=1.
The next run of length 4 starts with decade m=541, and the next occurrence of 5 consecutive triples starts with decade m=910052463685 (found by J. K. Andersen).
		

Crossrefs

Programs

  • PARI
    {d=10; p=primepi(d); i=0; while( po=p, p=primepi( d+=10 ); p>2+po && i++ && (p=primepi(d+=20)) && next; i || next; print1(i",");i>=3 && print1("/*",[nextprime(d-10-30*i),precprime(d-30)]"*/ ");i=0;)}
Showing 1-4 of 4 results.