|
|
A245622
|
|
Primes having more 1's digits than 3's.
|
|
3
|
|
|
11, 17, 19, 41, 61, 71, 101, 107, 109, 113, 127, 131, 149, 151, 157, 167, 179, 181, 191, 197, 199, 211, 241, 251, 271, 281, 311, 401, 419, 421, 461, 491, 521, 541, 571, 601, 617, 619, 641, 661, 691, 701, 719, 751, 761, 811, 821, 881, 911, 919, 941, 971, 991
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
31 has the same number of digits 1 and 3, so it is not in the sequence.
|
|
LINKS
|
|
|
MAPLE
|
filter:= proc(n)
local L;
if not isprime(n) then return false fi;
L:= convert(n, base, 10);
numboccur(1, L)>numboccur(3, L)
end proc:
|
|
PROG
|
(PARI) nbd(n, d) = my(v=digits(n), m=0); for(i=1, #v, if(v[i]==d, m++)); m
select(n->nbd(n, 1)>nbd(n, 3), primes(300)) \\ Colin Barker, Jul 27 2014
(Python)
import sympy
from sympy import prime
for n in range(1, 10**3):
..s = str(prime(n))
..if s.count('1') > s.count('3'):
....print(int(s), end=', ')
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|