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.

A244265 Frequency of the most common final digit of a prime < 10^n.

Original entry on oeis.org

1, 7, 46, 310, 2411, 19665, 166230, 1440495, 12712499, 113765625, 1029518337, 9401997000, 86516427946, 801235615814
Offset: 1

Views

Author

Derek Orr, Jun 24 2014

Keywords

Examples

			Of the primes < 10^2, there are 7 that end in a 3. Since 3 is the most common digit to end with (see A244191), then a(2) = 7.
		

Crossrefs

Cf. A244191.

Programs

  • Python
    import sympy
    from sympy import isprime
    def prend1(d, n):
      lst = [ ]
      for k in range(10**n):
        if isprime(k):
          lst.append((k%10**d))
      new = 0
      newlst = [ ]
      for i in range(10**(d-1), 10**d):
        new = lst.count(i)
        newlst.append(new)
      return max(newlst)
    n = 2
    while n < 10:
      print(prend1(1, n), end=', ')
      n += 1

Extensions

a(8)-a(14) from Hiroaki Yamanouchi, Jul 11 2014