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.

A357253 a(n) is the largest prime < 6*n.

Original entry on oeis.org

5, 11, 17, 23, 29, 31, 41, 47, 53, 59, 61, 71, 73, 83, 89, 89, 101, 107, 113, 113, 113, 131, 137, 139, 149, 151, 157, 167, 173, 179, 181, 191, 197, 199, 199, 211, 211, 227, 233, 239, 241, 251, 257, 263, 269, 271, 281, 283, 293, 293, 293, 311, 317, 317, 317, 331, 337, 347, 353
Offset: 1

Views

Author

Michel Marcus, Sep 20 2022

Keywords

Comments

Largest prime that can be obtained after n rolls of a fair 6-sided die.

Examples

			a(11) = 61 as the largest prime <= 6*11 = 66 is 61; each of 62, 63, 64, 65 and 66 are not prime. - _David A. Corneth_, Sep 20 2022
		

Crossrefs

Programs

  • Maple
    a:= n-> prevprime(6*n):
    seq(a(n), n=1..60);  # Alois P. Heinz, Sep 20 2022
  • Mathematica
    a[n_] := NextPrime[6*n, -1]; Array[a, 60] (* Amiram Eldar, Sep 20 2022 *)
  • PARI
    a(n) = precprime(6*n);
    
  • Python
    from sympy import prevprime
    def A357253(n): return prevprime(6*n) # Chai Wah Wu, Sep 20 2022

Formula

a(n) = A007917(A008588(n)).
a(n) = A151799(A008588(n)), since 6*n is never prime.