OFFSET
1,2
COMMENTS
Start with any number k and denote by (f0, f1, ..., f9) the number of the digits 0, 1, 2,..., 9 of k. The sequence lists the numbers k such that m = f0f1f2f3f4f5f6f7f8f9/k is an integer.
The corresponding m are: 100000000, 5000000, 25000, 2000, 110000000, 7150000, 50500000, 400400, 343750, 25002500, 20000200, 192500, 13700, 21000000, 1875000, 9250000, 880080, 7333400, 723750, 531915, ...
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..79 (all terms up to 1 million)
EXAMPLE
226 is in the sequence because the table of the frequencies is:
frequency of 0 = 0;
frequency of 1 = 0;
frequency of 2 = 2;
frequency of 3 = 0;
frequency of 4 = 0;
frequency of 5 = 0;
frequency of 6 = 1;
frequency of 7 = 0;
frequency of 8 = 0;
frequency of 9 = 0.
The concatenation of the frequencies is 20001000, and 20001000/226 = 88500.
MAPLE
with(numtheory): T:=array(0..9):
for n from 1 to 200000 do:
x:=convert(n, base, 10):n1:=nops(x):(1..n1):
for k from 0 to 9 do:
T[k]:=0:od:jj:=0:
for i from 0 to 9 do:
for j from 1 to n1 do:
if x[j]=i
then
T[i]:=T[i]+1:jj:=jj+1:
else
fi:
od:
od:
s:= sum('T[9-i]*10^i', 'i'=0..9):s1:=s/n:
if floor(s1)=s1
then
printf(`%d, `, n):
else
fi:
od:
# second Maple program:
q:= n-> (p-> is(irem(parse(cat(seq(coeff(p, x, i), i=0..9)
)), n)=0))(add(x^i, i=convert(n, base, 10))):
select(q, [$1..10000])[]; # Alois P. Heinz, Aug 29 2022
MATHEMATICA
Select[Range[10000], Divisible[FromDigits[RotateRight[DigitCount[#]]], #]&] (* Harvey P. Dale, Aug 29 2022 *)
PROG
(Python)
def ok(n): s = str(n); return n > 0 and int("".join(str(s.count(d)) for d in "0123456789"))%n == 0
print([k for k in range(10001) if ok(k)]) # Michael S. Branicky, Aug 29 2022
CROSSREFS
KEYWORD
nonn,base,less
AUTHOR
Michel Lagneau, Sep 07 2013
STATUS
approved