login
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
OFFSET
1,1
COMMENTS
31 has the same number of digits 1 and 3, so it is not in the sequence.
See comment in A245626.
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:
select(filter, [2*i+1$i=1..1000]); # Robert Israel, Aug 05 2014
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=', ')
# Derek Orr, Jul 28 2014
CROSSREFS
Sequence in context: A226686 A217055 A050879 * A050669 A362083 A322476
KEYWORD
nonn,base
AUTHOR
Vladimir Shevelev, Jul 27 2014
EXTENSIONS
More terms from Peter J. C. Moses, Jul 27 2014
More terms from Colin Barker, Jul 27 2014
STATUS
approved