A057531
Numbers whose sum of digits and number of divisors are equal.
Original entry on oeis.org
1, 2, 11, 22, 36, 84, 101, 152, 156, 170, 202, 208, 225, 228, 288, 301, 372, 396, 441, 444, 468, 516, 525, 530, 602, 684, 710, 732, 804, 828, 882, 952, 972, 1003, 1016, 1034, 1070, 1072, 1106, 1111, 1164, 1236, 1304, 1308, 1425, 1472, 1476, 1521, 1524
Offset: 1
36 is a term as the sum of the digits of 36 is 3+6 = 9 and the number of divisors is 9 too.
-
Select[ Range[ 1000 ], DivisorSigma[ 0, # ]==Plus@@IntegerDigits[ # ]& ] (* Harvey P. Dale, Feb 19 2004 *)
A050689
Composites whose sum of digits equals number of its prime factors, with multiplicity.
Original entry on oeis.org
12, 30, 32, 40, 102, 220, 240, 500, 600, 1002, 1012, 1104, 1152, 1210, 1320, 1500, 2001, 2002, 2020, 2040, 2120, 2240, 2300, 3010, 3040, 3300, 4032, 4100, 4320, 5100, 5200, 6400, 7000, 7200, 10001, 10002, 10011, 10030, 10040, 10080, 10140, 10220, 10304, 10800
Offset: 1
2002 is a term since 2+0+0+2 = 4, and 2002 = 2*7*11*13 has 4 prime factors.
-
Select[Range[10300],!PrimeQ[#]&&PrimeOmega[#]==Total[IntegerDigits[#]]&] (* Jayanta Basu, May 30 2013 *)
-
isok(n) = sumdigits(n) == bigomega(n); \\ Michel Marcus, Feb 13 2017
-
from sympy import factorint
def ok(n): return 1 < sum(map(int, str(n))) == sum(factorint(n).values())
print([k for k in range(11000) if ok(k)]) # Michael S. Branicky, Dec 30 2021
A070275
Numbers k such that the sum of the digits of k equals the sum of the prime divisors of k.
Original entry on oeis.org
2, 3, 5, 7, 84, 160, 250, 336, 468, 735, 936, 975, 1344, 1375, 1408, 1600, 1694, 1872, 2352, 2401, 2500, 2625, 2808, 3744, 3920, 4116, 4913, 5145, 5616, 6084, 6318, 7296, 7497, 7695, 8424, 8624, 8664, 8704, 9126, 9639, 10240, 12168, 12636, 12675, 14896
Offset: 1
-
Rest[Select[Range[20000],Total[Transpose[FactorInteger[#]][[1]]] == Total[ IntegerDigits[#]] &]] (* Harvey P. Dale, Dec 15 2010 *)
-
isok(n) = sumdigits(n) == vecsum(factor(n)[,1]); \\ Michel Marcus, May 27 2018
A070274
Numbers n such that sum of digits of n equals the squarefree part of n.
Original entry on oeis.org
1, 2, 3, 5, 6, 7, 12, 24, 100, 150, 200, 300, 320, 375, 500, 600, 640, 700, 704, 735, 832, 960, 1014, 1088, 1200, 1815, 2023, 2400, 2535, 2940, 3549, 3610, 3840, 4046, 4335, 4913, 5054, 5376, 5415, 5491, 6069, 6137, 6358, 6647, 7260, 7581, 7942, 8959, 9386
Offset: 1
-
core[n_]:=Block[{f=FactorInteger[n], p, e}, {p, e} = Transpose[f]; Times@@ (p^Mod[e, 2])]; Select[Range[10^4], core[#] == Plus @@ IntegerDigits[#] &] (* Giovanni Resta, Apr 21 2017 *)
-
list(lim)=my(v=List()); forfactored(n=1,lim\1, if(core(n)==sumdigits(n[1]), listput(v,n[1]))); Vec(v) \\ Charles R Greathouse IV, Nov 05 2017
A285494
Numbers k such that digit sum of k = number of distinct prime factors of k.
Original entry on oeis.org
20, 30, 102, 120, 200, 300, 1002, 1200, 2000, 2001, 2002, 3000, 3010, 10001, 10002, 10011, 10030, 10120, 11001, 11020, 11110, 12000, 20000, 20001, 21010, 30000, 30030, 30100, 100001, 100030, 100101, 100130, 100210, 100300, 101001, 101101, 101200, 102102, 110001, 110200
Offset: 1
-
Select[Range[2,10000],Total[IntegerDigits[#]]==Length[FactorInteger[#]]&] (* or *)
nd = 10; s = 1; Sort@ Flatten@ Reap[ While[ Times @@ Prime[ Range@ s] < 10^nd, pa = IntegerPartitions[s, {nd}, Range[0, 9]]; Do[Sow@ Select[ FromDigits /@ Permutations[p], PrimeNu[#] == s &], {p, pa}]; s++]][[2, 1]] (* terms < 10^10, Giovanni Resta, Apr 21 2017 *)
-
isok(n) = sumdigits(n) == omega(n); \\ Michel Marcus, Apr 20 2017
A384444
Positive integers k for which the sum of their digits equals the product of their prime digits.
Original entry on oeis.org
1, 2, 3, 5, 7, 10, 20, 22, 30, 50, 70, 100, 123, 132, 200, 202, 213, 220, 231, 300, 312, 321, 500, 700, 1000, 1023, 1032, 1203, 1230, 1247, 1274, 1302, 1320, 1356, 1365, 1427, 1472, 1536, 1563, 1635, 1653, 1724, 1742, 2000, 2002, 2013, 2020, 2031, 2103, 2130, 2147
Offset: 1
1302 is a term, because 1 + 3 + 0 + 2 = 3*2 = 6.
-
A384444:=proc(n)
option remember;
local k,c;
if n=1 then
1
else
for k from procname(n-1)+1 do
c:=convert(k,'base',10);
if mul(select(isprime,c))=add(c) then
return k
fi
od
fi;
end proc;
seq(A384444(n),n=1..51);
-
Select[Range[2147],Total[IntegerDigits[#]]==Times@@Select[IntegerDigits[#],PrimeQ]&] (* James C. McMahon, Jun 20 2025 *)
-
isok(k) = my(d=digits(k)); vecprod(select(isprime, d)) == vecsum(d); \\ Michel Marcus, Jun 04 2025
A384445
a(n) is the number of multisets of n decimal digits where the sum of the digits equals the product of the prime digits.
Original entry on oeis.org
5, 6, 7, 10, 23, 43, 74, 125, 199, 305, 449, 637, 885, 1216, 1649, 2184, 2852, 3664, 4657, 5863, 7298, 9002, 10993, 13312, 16000, 19084, 22613, 26606, 31120, 36192, 41867, 48220, 55317, 63232, 72022, 81746, 92479, 104282, 117229, 131393, 146843, 163652, 181892
Offset: 1
a(3) = 7 because exactly for the 7 multisets with 3 digits {0, 0, 1}, {0, 0, 2}, {0, 0, 3}, {0, 0, 5}, {0, 0, 7}, {0, 2, 2} and {1, 2, 3} their sum equals the product of the prime digits.
a(4) = 10 because exactly for the 10 multisets with 4 digits {0, 0, 0, 1}, {0, 1, 2, 3}, {1, 2, 4, 7}, {1, 3, 5, 6}, {0, 0, 0, 2}, {0, 0, 2, 2}, {0, 0, 0, 3}, {0, 0, 0, 5}, {5, 5, 6, 9} and {0, 0, 0, 7} their sum equals the product of the prime digits.
-
f:=proc(p,n)
local c,d,i,l,m,r,s,t,u,w,x,y,z;
m:={0,1,4,6,8,9};
t:=seq(cat(x,i),i in m);
y:={l='Union'(t),w='Set'(l),t=~'Atom'};
d:=(map2(apply,s,{t})=~m) union {s(w)='Set'(s(l))};
Order:=p+1;
r:=combstruct:-agfseries(y,d,'unlabeled',z,[[u,s]])[w(z,u)];
r:=collect(convert(r,'polynom'),[z,u],'recursive');
c:=coeff(r,z,p);
coeff(c,u,n)
end proc:
A384445:=proc(n)
local a,k,m,s,p,j,L;
a:=1;
for k from 9*n to 1 by -1 do
L:=ifactors(k)[2];
m:=nops(L);
if m>0 and L[m,1]<=7 then
p:=n-add(L[j,2],j=1..m);
s:=k-add(L[j,1]*L[j,2],j=1..m);
if s=0 and p>=0 then
a:=a+1
elif p>0 and s>0 then
a:=a+f(p,s)
fi
fi
od;
return a
end proc;
seq(A384445(n),n=1..43);
A384505
a(n) is the number of multisets of n positive decimal digits where the sum of the digits equals the product of the prime digits.
Original entry on oeis.org
5, 1, 1, 3, 13, 20, 31, 51, 74, 106, 144, 188, 248, 331, 433, 535, 668, 812, 993, 1206, 1435, 1704, 1991, 2319, 2688, 3084, 3529, 3993, 4514, 5072, 5675, 6353, 7097, 7915, 8790, 9724, 10733, 11803, 12947, 14164, 15450, 16809, 18240, 19757, 21374, 23073, 24876, 26759
Offset: 1
a(1) = 5 because exactly for the 5 multisets with 1 digits {1}, {2}, {3}, {5}, and {7} their sum equals the product of the prime digits.
a(2) = 1 because only for 1 multiset with 2 positive digits {2, 2} their sum equals the product of the prime digits: 2 + 2 = 2*2 = 4.
a(3) = 1 because only for 1 multiset with 3 positive digits {1, 2, 3} their sum equals the product of the prime digits: 1 + 2 + 3 = 2*3 = 6.
a(4) = 3 because exactly for the 3 multisets with 4 digits {1, 2, 4, 7}, {1, 3, 5, 6}, and {5, 5, 6, 9} their sum equals the product of the prime digits: 1 + 2 + 4 + 7 = 2 * 7 = 14, 1 + 3 + 5 + 6 = 3*5 = 15, 5 + 5 + 6 + 9 = 5*5 = 25.
-
f:=proc(p,n)
local i,l,m,s,t,u,w,x,z;
m:={1,4,6,8,9};
t:=seq(cat(x,i),i in m);
Order:=p+1;
coeff(coeff(collect(convert(combstruct:-agfseries({l='Union'(t),w='Set'(l),t=~'Atom'},(map2(apply,s,{t})=~m) union {s(w)='Set'(s(l))},'unlabeled',z,[[u,s]])[w(z,u)],'polynom'),[z,u],'recursive'),z,p),u,n)
end proc:
A384505:=proc(n)
local a,k,m,s,p,j,L;
if n=1 then
5
elif n=2 then
1
else
a:=0;
for k from 9*n to 1 by -1 do
L:=ifactors(k)[2];
m:=nops(L);
if m>0 and L[m,1]<=7 then
p:=n-add(L[j,2],j=1..m);
s:=k-add(L[j,1]*L[j,2],j=1..m);
if p>0 and s>0 then
a:=a+f(p,s)
fi
fi
od;
return a
fi;
end proc;
seq(A384505(n),n=1..48);
A050690
Sum of digits of zero-absent composite a(n) equals number of prime factors.
Original entry on oeis.org
12, 32, 1152, 11232, 13122, 14112, 21312, 111132, 112112, 3121152, 11231232, 11354112, 812122112, 1251213312, 2211121152, 2211213312, 5121114112, 26122125312, 56321114112, 62214111232, 431711322112, 3421411213312, 11111212122112, 11112113242112
Offset: 1
E.g., 21312 (no zero in the string) gives 2+1+3+1+2 = 9 prime factors, namely, 2*2*2*2*2*2*3*3*37.
-
t={}; Do[If[FreeQ[x=IntegerDigits[n],0]&&PrimeOmega[n]==Total[x],AppendTo[t,n]],{n,2,3220000,2}]; t (* Jayanta Basu, May 30 2013 *)
Showing 1-9 of 9 results.
Comments