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.

A320584 Numbers whose first digit is prime.

Original entry on oeis.org

2, 3, 5, 7, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217
Offset: 1

Views

Author

Kritsada Moomuang, Oct 16 2018

Keywords

Crossrefs

Supersequence of A320585 (primes whose first digit is prime).

Programs

  • Mathematica
    Select[Range@ 218, PrimeQ@ First@ IntegerDigits@ # &] (* Michael De Vlieger, Nov 05 2018 *)
  • PARI
    isok(n) = isprime(digits(n)[1]); \\ Michel Marcus, Oct 17 2018
    
  • PARI
    a(n) = n--; my (w=1); while (n >= 4*w, n -= 4*w; w*=10); w*prime(1+n\w) + (n%w) \\ Rémy Sigrist, Nov 16 2018