A244857 Numbers divisible by both the sum of the squares of their digits and the product of their digits.
1, 111, 315, 1344, 3312, 4416, 6624, 11112, 12312, 31311, 114192, 121716, 134112, 134136, 141312, 231336, 282624, 313416, 314112, 411648, 431136, 613116, 628224, 1112232, 1112832, 1121232, 1122112, 1122312, 1122912, 1143216, 1211232, 1212112, 1212192, 1212312
Offset: 1
Examples
315 is in the sequence because 3^2+1^2+5^2 = 35 divides 315 and 3*1*5 = 15 divides 315.
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
dspQ[n_]:=Module[{idn=IntegerDigits[n], t}, t=Times@@idn; t!=0 && Divisible[n, Total[idn^2]] && Divisible[n, t]]; Select[Range[2*10^6], dspQ]
-
PARI
isok(n) = (d = digits(n)) && (prd = prod(i=1, #d, d[i])) && !(n % prd) && !(n % sum(i=1, #d, d[i]^2)); \\ Michel Marcus, Jul 07 2014
Comments