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!)
A087395 Primes in which the frequency of every digit is the same and is at least 2. 2
11, 100313, 107071, 110909, 114343, 115757, 116969, 117373, 117979, 118787, 119797, 121727, 127217, 127271, 131939, 133717, 133919, 134341, 136163, 136361, 137713, 140401, 141499, 142421, 143413, 145451, 149419, 149491, 155717, 157571 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
If d is prime, the only terms with d digits are repunit primes (A004022). - Robert Israel, Nov 18 2022
LINKS
Michael S. Branicky, Python program
EXAMPLE
100313 is a term in which each of the digits 1, 3 and 0 occurs with frequency 2.
MAPLE
filter:= proc(n) local L, d, S;
if not isprime(n) then return false fi;
L:= convert(n, base, 10);
S:={seq(numboccur(d, L), d=convert(L, set))};
nops(S) = 1 and S[1]>=2
end proc:
select(filter, [seq(i, i=11 .. 200000, 2)]); # Robert Israel, Nov 18 2022
MATHEMATICA
fpQ[n_]:=Module[{dc=Union[Cases[DigitCount[n], Except[0]]]}, First[dc]>1 &&Length[dc]==1]; Select[Prime[Range[14500]], fpQ] (* Harvey P. Dale, Apr 22 2011 *)
PROG
(Python) # see linked program for a faster version
from sympy import isprime
from collections import Counter
from itertools import count, islice
def ok(n):
cv = Counter(str(n)).values()
return min(cv) >= 2 and len(set(cv)) == 1 and isprime(n)
def agen():
evdigs = (k for d in count(2, 2) for k in range(10**(d-1)+1, 10**d, 2))
yield from (k for k in evdigs if ok(k))
print(list(islice(agen(), 30))) # Michael S. Branicky, Nov 18 2022
CROSSREFS
Contains A004022.
Sequence in context: A348644 A165934 A110780 * A199169 A145571 A049193
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Sep 10 2003
EXTENSIONS
Corrected and extended by David Wasserman, May 31 2005
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 24 15:57 EDT 2024. Contains 371961 sequences. (Running on oeis4.)