login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A117720
Numbers for which the sum of the digits is the square root of the product of their digits.
4
0, 1, 999, 2558, 2585, 2855, 3366, 3636, 3663, 4444, 5258, 5285, 5528, 5582, 5825, 5852, 6336, 6363, 6633, 8255, 8525, 8552, 12489, 12498, 12849, 12894, 12948, 12984, 13377, 13737, 13773, 14289, 14298, 14829, 14892, 14928, 14982, 17337, 17373
OFFSET
0,3
LINKS
EXAMPLE
2558 is in the sequence because (1)the sum of its digits is 2+5+5+8=20,(2)the product of its digits is 2*5*5*8=400 and 20 is the square root of 400.
MATHEMATICA
sdsqrQ[n_]:=Module[{idn=IntegerDigits[n]}, Total[idn]==Sqrt[Times@@idn]]; Select[Range[0, 18000], sdsqrQ] (* Harvey P. Dale, Oct 20 2012 *)
PROG
(PARI) sudig(i, suOrmul)= { local(nshft, resul) ; nshft = i ; resul = nshft % 10 ; nshft = nshft \ 10 ; while(nshft>0, if(suOrmul==0, resul += nshft % 10, resul *= nshft % 10 ) ; nshft \= 10 ; ) ; return(resul) ; }
{ for(n=0, 15000, summ = sudig(n, 0) ; mull = sudig(n, 1) ; if( summ^2==mull, print1(n, ", ") ) ; ) ; } \\ R. J. Mathar, Apr 21 2006
CROSSREFS
Sequence in context: A317594 A226752 A043527 * A110401 A213156 A164813
KEYWORD
base,nonn
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), Apr 13 2006
EXTENSIONS
More terms from R. J. Mathar, Apr 21 2006
STATUS
approved