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-3 of 3 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

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

Original entry on oeis.org

1, 7, 11, 17, 25, 31, 137, 187, 221, 337, 1001, 2743, 6529, 38689, 39463
Offset: 1

Views

Author

Robert G. Wilson v, Aug 10 2000

Keywords

Comments

Also numbers k such that (5*10^(k+1)+31)/9 is prime.

Crossrefs

Programs

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

Formula

a(n) = A099418(n) - 1.

Extensions

6529 from Kamada link by Herman Jamke (hermanjamke(AT)fastmail.fm), Jan 01 2008
38689 and 39463 from Serge Batalov, Jan 06 2009 confirmed as next terms by Ray Chandler, Feb 20 2012

A093403 Primes of the form 50*R_k + 9, where R_k is the repunit (A002275) of length k.

Original entry on oeis.org

59, 55555559, 555555555559, 555555555555555559, 55555555555555555555555559, 55555555555555555555555555555559
Offset: 1

Views

Author

Rick L. Shepherd, Mar 28 2004

Keywords

Comments

Primes of the form (5*10^k + 31)/9. - Vincenzo Librandi, Nov 17 2010

Crossrefs

Cf. A056687 (corresponding k), A099418.

Formula

a(n) = (50*10^A056687(n) + 31)/9 = (5*10^A099418(n) + 31)/9.

Extensions

Edited by Ray Chandler, Feb 27 2012
Showing 1-3 of 3 results.