A178204
Smith numbers of order 6; composite numbers n such that sum of digits^6 equal sum of digits^6 of its prime factors without the numbers in A176670 that have the same digits as its prime factors (without the zero digits).
Original entry on oeis.org
40844882, 113986781, 130852098, 141176320, 168137185, 170774472, 178180163, 181681157, 181693781, 183161897, 187117638, 215149451, 261666000, 284804842, 294557945, 307711074, 335524949, 337194240, 344552927, 347391040, 355318188, 358831104, 368657536
Offset: 1
a(4) = 141176320 = 2^9*5*55147;
3*1^6+2^6+3^6+4^6+6^6+7^6 = 1^6+9*2^6+4^6+3*5^6+7^6 = 169197
-
fQ[n_] := Block[{id = Sort@ IntegerDigits@ n, fid = Sort@ Flatten[ IntegerDigits@ Table[ #[[1]], {#[[2]]}] & /@ FactorInteger@ n]}, While[ id[[1]] == 0, id = Drop[id, 1]]; While[ fid[[1]] == 0, fid = Drop[fid, 1]]; id != fid && Plus @@ (id^6) == Plus @@ (fid^6)]; k = 2; lst = {}; While[k < 50000001, If[fQ@ k, AppendTo[ lst, k]; Print@ k]; k++]; lst
A036920
Composite numbers n such that digit sum of n equals digit sum of sum of its prime factors (counted with multiplicity).
Original entry on oeis.org
4, 22, 27, 94, 105, 114, 121, 150, 166, 202, 204, 222, 224, 265, 274, 315, 342, 346, 355, 382, 438, 445, 450, 454, 517, 526, 540, 562, 612, 634, 640, 706, 841, 852, 913, 915, 922, 1068, 1086, 1111, 1120, 1122, 1138, 1165, 1185, 1200, 1219, 1221, 1230
Offset: 1
-
ds[n_]:=Total[IntegerDigits[n]]; t={}; Do[If[!PrimeQ[n]&&ds[n]==ds[Total[ Times@@@FactorInteger[n]]],AppendTo[t,n]],{n,4,1230}]; t (* Jayanta Basu, Jun 04 2013 *)
A050220
Larger of Smith brothers.
Original entry on oeis.org
729, 2965, 3865, 4960, 5936, 6188, 9387, 9634, 11696, 13765, 16537, 16592, 20785, 25429, 28809, 29624, 32697, 33633, 35806, 39586, 43737, 44734, 49028, 55345, 56337, 57664, 58306, 62635, 65913, 65975, 66651, 67068, 67729, 69280, 69836, 73616, 73617, 74169
Offset: 1
-
issmith:= proc(n)
if isprime(n) then return false fi;
convert(convert(n,base,10),`+`) = add(t[2]*convert(convert(t[1],base,10),`+`),t=ifactors(n)[2])
end proc:
S:= select(issmith, {$4..10^5}):
sort(convert(S intersect map(`+`,S,1), list)); # Robert Israel, Jan 15 2018
-
smithQ[n_] := n > 1 && !PrimeQ[n] && Total[Flatten[IntegerDigits[Table[#[[1]], {#[[2]]}]& /@ FactorInteger[n]]]] == Total[IntegerDigits[n]];
Select[Range[10^5], smithQ[#] && smithQ[#-1]&] (* Jean-François Alcover, Jun 07 2020 *)
-
isone(n) = {if (!isprime(n), f = factor(n); sumdigits(n) == sum(k=1, #f~, f[k,2]*sumdigits(f[k,1])););}
isok(n) = isone(n) && isone(n-1); \\ Michel Marcus, Jul 17 2015
-
from sympy import factorint
from itertools import count, islice
def sd(n): return sum(map(int, str(n)))
def smith():
for k in count(1):
f = factorint(k)
if sum(f[p] for p in f) > 1 and sd(k) == sum(sd(p)*f[p] for p in f):
yield k
def agen():
prev = -1
for s in smith():
if s == prev + 1: yield s
prev = s
print(list(islice(agen(), 38))) # Michael S. Branicky, Dec 23 2022
A050224
1/2-Smith numbers.
Original entry on oeis.org
88, 169, 286, 484, 598, 682, 808, 844, 897, 961, 1339, 1573, 1599, 1878, 1986, 2266, 2488, 2626, 2662, 2743, 2938, 3193, 3289, 3751, 3887, 4084, 4444, 4642, 4738, 4804, 4972, 4976, 4983, 5566, 5665, 5764, 5797, 5863
Offset: 1
88 is a 2^(-1) Smith number because the digit sum of 88, i.e., S(88) = 8 + 8 = 16, which is equal to twice the sum of the digits of its prime factors, i.e., 2 * Sp (88) = 2 * Sp (11 * 2 * 2 * 2) = 2 * (1 + 1 + 2 + 2 + 2) = 16.
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harvey P. Dale)
- Shyam Sunder Gupta, Smith Numbers.
- Shyam Sunder Gupta, Smith Numbers, Exploring the Beauty of Fascinating Numbers, Springer (2025) Ch. 4, 127-157.
- Wayne L. McDaniel, The Existence of infinitely Many k-Smith numbers, Fibonacci Quarterly, Vol. 25, No. 1 (1987), pp. 76-80.
- Eric Weisstein's World of Mathematics, Smith Numbers
-
snoQ[n_]:=Total[IntegerDigits[n]]==2Total[Flatten[IntegerDigits/@ Flatten[ Table[First[#],{Last[#]}]&/@FactorInteger[n]]]]; Select[Range[ 6000], snoQ] (* Harvey P. Dale, Oct 15 2011 *)
A177927
3-Monica numbers.
Original entry on oeis.org
4, 9, 10, 22, 24, 25, 27, 34, 42, 46, 55, 58, 60, 72, 78, 81, 82, 85, 94, 105, 106, 114, 115, 118, 121, 126, 128, 132, 142, 145, 150, 166, 178, 180, 186, 187, 192, 195, 202, 204, 205, 214, 216, 222, 224, 226, 231, 234, 235, 243, 253, 256, 258, 262, 265, 274, 276, 285, 289, 295
Offset: 1
S(10)=1+0=1, 10=2*5, Sp(10)=2+5=7, S(10)-Sp(10)=-6 which is divisible by 3.
- József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, p. 384.
- James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 2005, page 93.
- E. W. Weisstein, The CRC Concise Encyclopedia of Mathematics, CRC Press, 1999, pages 1192-1193.
Cf.
A006753 (Smith numbers are a subset of every n-Monica sequence).
Cf.
A102217 (n-Suzanne numbers are a subset of n-Monica numbers).
Cf.
A102219 (This list of '3-Monica' numbers is incorrect. It does not contain all the Smith numbers and appears to be based on S(n)+Sp(n) ==0 (mod 3), instead of S(n)-Sp(n) == 0 (mod 3)).
-
s[n_] := Plus @@ IntegerDigits[n]; f[p_, e_] := e*s[p]; sp[n_] := Plus @@ f @@@ FactorInteger[n]; mon3Q[n_] := CompositeQ[n] && Divisible[s[n] - sp[n], 3]; Select[Range[300], mon3Q] (* Amiram Eldar, Apr 23 2021 *)
A334527
Numbers that are both Niven numbers and Smith numbers.
Original entry on oeis.org
4, 27, 378, 576, 588, 645, 648, 666, 690, 825, 915, 1872, 1908, 1962, 2265, 2286, 2484, 2556, 2688, 2934, 2970, 3168, 3258, 3294, 3345, 3366, 3390, 3564, 3615, 3690, 3852, 3864, 3930, 4428, 4464, 4557, 4880, 5526, 6084, 6315, 7695, 8154, 8736, 8883, 9015, 9036
Offset: 1
27 is a term since it is a Niven number (2 + 7 = 9 is a divisor of 27) and a Smith number (27 = 3 * 3 * 3 and 2 + 7 = 3 + 3 + 3).
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- Shyam Sunder Gupta, Smith Numbers, Exploring the Beauty of Fascinating Numbers, Springer (2025) Ch. 4, 127-157.
- Wayne L. McDaniel, On the Intersection of the Sets of Base b Smith Numbers and Niven Numbers, Missouri Journal of Mathematical Sciences, Vol. 2, No. 3 (1990), pp. 132-136.
-
digSum[n_] := Plus @@ IntegerDigits[n]; nivenSmithQ[n_] := Divisible[n, (ds = digSum[n])] && CompositeQ[n] && Plus @@ (Last@# * digSum[First@#] & /@ FactorInteger[n]) == ds; Select[Range[10^4], nivenSmithQ]
-
from sympy import factorint
def sd(n): return sum(map(int, str(n)))
def ok(n):
sdn = sd(n)
if sdn == 0 or n%sdn != 0: return False # not Niven
f = factorint(n)
return sum(f[p] for p in f) > 1 and sdn == sum(sd(p)*f[p] for p in f)
print(list(filter(ok, range(9999)))) # Michael S. Branicky, Apr 27 2021
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);
A036921
Numbers n such that digit sum of n equals digit sum of 'juxtaposition' and 'sum' of its prime factors (counted with multiplicity).
Original entry on oeis.org
4, 22, 27, 94, 121, 166, 202, 265, 274, 346, 355, 382, 438, 454, 517, 526, 562, 634, 706, 852, 913, 915, 922, 1086, 1111, 1165, 1219, 1255, 1282, 1507, 1626, 1633, 1642, 1822, 1894, 1903, 1966, 2067, 2155, 2173, 2182, 2227, 2265, 2326, 2362, 2409, 2434
Offset: 1
-
d[n_]:=IntegerDigits[n]; co[n_,k_]:=Nest[Flatten[d[{#,n}]]&,n,k-1]; t={}; Do[If[!PrimeQ[n]&&Total[d[n]]==Total[d[Total[Times@@@(x=FactorInteger[n])]]]==Total[Flatten[d[co@@@x]]],AppendTo[t,n]],{n,4,2435}]; t (* Jayanta Basu, Jun 04 2013 *)
Comments