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.

A266143 Number of n-digit primes in which n-1 of the digits are 4's.

This page as a plain text file.
%I A266143 #24 Feb 26 2024 19:20:30
%S A266143 4,3,2,2,1,2,0,0,1,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,0,
%T A266143 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
%U A266143 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,0,0,0,0
%N A266143 Number of n-digit primes in which n-1 of the digits are 4's.
%C A266143 The leading digits must be 4's and only the trailing digit can vary.
%C A266143 For n large a(n) is usually zero.
%H A266143 Michael De Vlieger and Robert G. Wilson v, <a href="/A266143/b266143.txt">Table of n, a(n) for n = 1..1500</a>
%e A266143 a(3) = 2 since 443 and 449 are primes.
%e A266143 a(4) = 2 since 4441 and 4447 are primes.
%t A266143 d = 4; Array[Length@ Select[d (10^# - 1)/9 + (Range[0, 9] - d), PrimeQ] &, 100]
%o A266143 (Python)
%o A266143 from __future__ import division
%o A266143 from sympy import isprime
%o A266143 def A266143(n):
%o A266143     return 4 if n==1 else sum(1 for d in [-3,-1,3,5] if isprime(4*(10**n-1)//9+d)) # _Chai Wah Wu_, Dec 27 2015
%Y A266143 Cf. A265733, A266141, A266142, A266144, A266145, A266146, A266147, A266148, A266149, A099412, A096845, A099413, A099414.
%K A266143 nonn,base
%O A266143 1,1
%A A266143 _Michael De Vlieger_ and _Robert G. Wilson v_, Dec 21 2015