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!)
A258915 The number of n-digit near-repdigit primes (A164937). 1
0, 0, 46, 43, 40, 53, 35, 49, 40, 38, 44, 52, 35, 45, 49, 42, 38, 57, 27, 45, 38, 47, 37, 52, 33, 45, 56, 38, 36, 65, 29, 56, 48, 40, 38, 58, 37, 33, 57, 40, 37, 61, 41, 39, 37, 44, 36, 55, 47, 43, 47, 43, 35, 62, 43, 46, 29, 35, 37, 56, 39, 41, 46, 48, 39, 74, 45, 34, 34, 35, 34, 67 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
The average is 44.25 with a standard deviation of about 9.48 for the first 1000 terms.
First occurrence of 20 < k < 80: 1132, ??22??, 1304, 433, 141, 181, 19, 118, 31, 253, 357, 137, 25, 68, 7, 29, 23, 10, 44, 5, 43, 16, 4, 11, 14, 3, 22, 33, 8, 139, 82, 12, 6, 102, 48, 27, 18, 36, 270, 198, 42, 54, 498, 90, 30, 738, 72, 222, 192, 852, 84, 342, ??73??, 66, ??75??, 816, 264, ??78??, 298; where ??xx?? denotes an unknown value for the index xx.
Roughly speaking, the probability that a random n-digit number is prime is about 1/(n*log(10)). The number of near-repdigit n-digit numbers is 81*n. Therefore it would be reasonable to expect around 81/log(10) (about 35) primes for each n. - Giovanni Resta, Jun 19 2015
LINKS
EXAMPLE
a(1) & a(2) = 0 by definition.
a(3) = 46 since there are 46 terms of 3 digits, see A164937(1) - A164937(46).
MATHEMATICA
f[n_] := Block[{lst = {}, r = (10^(n - 1) - 1)/9}, Do[ AppendTo[ lst, DeleteCases[ Select[ FromDigits[ Permutations[ Append[ IntegerDigits[ a*r], d]]], PrimeQ@# && # > 100 &], r]], {a, 9}, {d, 0, 9}]; Length@ Union@ Flatten@ lst](* adapted after Arkadiusz Wesolowski of A164937 *) Array[f, 70]
(* to view the terms assign the terms in the b-file to "lst" and then *) ListPlot@ Sort@ lst (* and/or *) g[n_] := Count[lst, n]; DiscretePlot[ g[n], {n, 23, 80}]
CROSSREFS
Cf. A164937.
Sequence in context: A216840 A060958 A094892 * A342479 A165867 A058905
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jun 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)