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.

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