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

A266144 Number of n-digit primes in which n-1 of the digits are 5's.

Original entry on oeis.org

4, 2, 1, 1, 0, 1, 0, 2, 0, 1, 0, 2, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Keywords

Comments

The leading digits must be 5's and only the trailing digit can vary.
For n large a(n) is usually zero.

Examples

			a(2) = 2 since 53 and 59 are primes.
a(3) = 1 since 557 is the only prime.
		

Crossrefs

Programs

  • Mathematica
    d = 5; Array[Length@ Select[d (10^# - 1)/9 + (Range[0, 9] - d), PrimeQ] &, 100]
  • Python
    from _future_ import division
    from sympy import isprime
    def A266144(n):
        return 4 if n==1 else sum(1 for d in [-4,-2,2,4] if isprime(5*(10**n-1)//9+d)) # Chai Wah Wu, Dec 27 2015

A056684 Numbers k such that 50*R_k + 1 is prime, where R_k = 11...1 is the repunit (A002275) of length k.

Original entry on oeis.org

11, 12, 608
Offset: 1

Views

Author

Robert G. Wilson v, Aug 10 2000

Keywords

Comments

Also numbers k such that (5*10^(k+1)-41)/9 is prime.
a(4) > 10^5. - Robert Price, Nov 16 2014

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[50*(10^n - 1)/9 + 1], Print[n]], {n, 15000}]

Formula

a(n) = A099415(n) - 1. - Robert Price, Nov 16 2014
Showing 1-2 of 2 results.