login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Inspired by A241100 and its conjecture by Chai Wah Wu of Dec 10 2015.

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

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, ..., .

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

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

LINKS

Michael De Vlieger and Robert G. Wilson v, Table of n, a(n) for n = 1..1550

FORMULA

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.

EXAMPLE

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

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

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.

MAPLE

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

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

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

  nops(select(isprime, y))

end proc:

map(A, [$1..100]); # Robert Israel, Dec 31 2015

MATHEMATICA

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]

CROSSREFS

Cf. A209252, A241100.

Sequence in context: A076703 A305372 A261602 * A266146 A329503 A108806

Adjacent sequences:  A265730 A265731 A265732 * A265734 A265735 A265736

KEYWORD

nonn,base

AUTHOR

Michael De Vlieger and Robert G. Wilson v, Dec 14 2015

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 5 15:11 EST 2019. Contains 329753 sequences. (Running on oeis4.)