login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A265733 Number of n-digit primes whose digits include at least n-1 digits "1". 10

%I #26 Jun 03 2018 02:06:38

%S 4,8,10,9,10,13,7,16,10,11,11,13,9,11,6,7,8,16,7,11,8,9,9,10,8,12,6,

%T 13,13,21,7,12,8,7,15,16,8,9,17,9,5,22,9,15,6,12,9,20,11,13,14,11,13,

%U 12,9,15,7,4,8,12,4,11,8,15,10,17,12,12,4,9,9,14,8,14,10,7,10,14,5,14

%N Number of n-digit primes whose digits include at least n-1 digits "1".

%C Inspired by A241100 and its conjecture by _Chai Wah Wu_ of Dec 10 2015.

%C The average value of a(n) is 10.6, median is 10, and mode is 11 for the first 1000 terms.

%C The first occurrence of k>0: 433, 361, 229, 1, 41, 15, 7, 2, 4, 3, 10, 26, 6, 51, 35, 8, 39, 180, 84, 48, 30, 42, 306, 138, 948, 642, ..., .

%C 0 < a(n) < 27 for n < 1551.

%C It appears that a(n)/(9*n + 0^(n-1)) has its maximum at n = 2. - _Altug Alkan_, Dec 16 2015

%H Michael De Vlieger and Robert G. Wilson v, <a href="/A265733/b265733.txt">Table of n, a(n) for n = 1..1550</a>

%F Number of n-digit primes of the form 111...d...111, where the number of ones is at least n-1 and d is any other decimal digit.

%e a(1) = 4 because {2, 3, 5, 7} are primes;

%e a(2) = 8 because {11, 13, 17, 19, 31, 41, 61, 71} are two digit primes with at least one digit being 1;

%e a(3) = 10 because {101, 113, 131, 151, 181, 191, 211, 311, 811, 911} are three digit primes with at least two digit being 1, etc.

%p A:= proc(n) local x,X,i,y;

%p x:= (10^n-1)/9;

%p y:= [x,seq(seq(x+10^i*y,y=1..8),i=0..n-1),seq(x - 10^i,i=0..n-2)];

%p nops(select(isprime,y))

%p end proc:

%p map(A, [$1..100]); # _Robert Israel_, Dec 31 2015

%t f1[n_] := Block[{cnt = k = 0, r = (10^n - 1)/9, s = {-1, 1, 2, 3, 4, 5, 6, 7, 8}}, If[ PrimeQ@ r, cnt++]; If[ PrimeQ[(10^(n - 1) - 1)/9], cnt--]; While[k < n, p = Select[r + 10^k*s, PrimeQ]; cnt += Length@ p; k++]; cnt]; Array[f1, 70]

%Y Cf. A209252, A241100.

%K nonn,base

%O 1,1

%A _Michael De Vlieger_ and _Robert G. Wilson v_, Dec 14 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 17 21:22 EDT 2024. Contains 371767 sequences. (Running on oeis4.)