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.

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

This page as a plain text file.
%I A266144 #15 Jan 02 2016 04:21:30
%S A266144 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,
%T A266144 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,
%U A266144 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
%N A266144 Number of n-digit primes in which n-1 of the digits are 5's.
%C A266144 The leading digits must be 5's and only the trailing digit can vary.
%C A266144 For n large a(n) is usually zero.
%H A266144 Michael De Vlieger and Robert G. Wilson v, <a href="/A266144/b266144.txt">Table of n, a(n) for n = 1..1500</a>
%e A266144 a(2) = 2 since 53 and 59 are primes.
%e A266144 a(3) = 1 since 557 is the only prime.
%t A266144 d = 5; Array[Length@ Select[d (10^# - 1)/9 + (Range[0, 9] - d), PrimeQ] &, 100]
%o A266144 (Python)
%o A266144 from __future__ import division
%o A266144 from sympy import isprime
%o A266144 def A266144(n):
%o A266144     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
%Y A266144 Cf. A265733, A266141, A266142, A266143, A266145, A266146, A266147, A266148, A266149, A099415, A099416, A099417, A099418.
%K A266144 base,nonn
%O A266144 1,1
%A A266144 _Michael De Vlieger_ and _Robert G. Wilson v_, Dec 21 2015