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.

A266145 Number of n-digit primes in which n-1 of the digits are 6's.

This page as a plain text file.
%I A266145 #18 Dec 23 2017 09:39:52
%S A266145 4,2,1,1,0,1,0,1,1,1,1,0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0,1,0,0,0,0,0,0,
%T A266145 0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,
%U A266145 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,0,0,0,0
%N A266145 Number of n-digit primes in which n-1 of the digits are 6's.
%C A266145 The leading digits must be 6's and only the trailing digit can vary.
%C A266145 For n large a(n) is usually zero.
%H A266145 Michael De Vlieger and Robert G. Wilson v, <a href="/A266145/b266145.txt">Table of n, a(n) for n = 1..1500</a>
%e A266145 a(2) = 2 since 61 and 67 are prime.
%e A266145 a(3) = 1 since 661 is the only prime.
%t A266145 d = 6; Array[Length@ Select[d (10^# - 1)/9 + (Range[0, 9] - d), PrimeQ] &, 100]
%t A266145 Join[{4},Table[Count[Table[10FromDigits[PadRight[{},k,6]]+n,{n,{1,3,7,9}}], _?PrimeQ],{k,110}]] (* _Harvey P. Dale_, Dec 23 2017 *)
%o A266145 (Python)
%o A266145 from __future__ import division
%o A266145 from sympy import isprime
%o A266145 def A266145(n):
%o A266145     return 4 if n==1 else sum(1 for d in [-5,-3,1,3] if isprime(2*(10**n-1)//3+d)) # _Chai Wah Wu_, Dec 27 2015
%Y A266145 Cf. A265733, A266141, A266142, A266143, A266144, A266146, A266147, A266148, A266149, A098088, A096507.
%K A266145 base,nonn
%O A266145 1,1
%A A266145 _Michael De Vlieger_ and _Robert G. Wilson v_, Dec 21 2015