|
|
A062398
|
|
Numbers such that the product of the digits and the sum of the digits are squares.
|
|
2
|
|
|
1, 4, 9, 10, 22, 40, 88, 90, 100, 103, 108, 130, 144, 180, 202, 207, 220, 270, 301, 306, 310, 360, 400, 405, 414, 441, 450, 466, 504, 540, 603, 630, 646, 664, 702, 709, 720, 790, 801, 808, 810, 880, 889, 898, 900, 907, 970, 988, 1000, 1003, 1008, 1012, 1017
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
144 belongs to the sequence as sum of digits = 9 and the product of the digits = 16.
|
|
MATHEMATICA
|
pdsdQ[n_]:=Module[{idn=IntegerDigits[n]}, IntegerQ[Sqrt[Total[idn]]] && IntegerQ[Sqrt[Times@@idn]]]; Select[Range[1100], pdsdQ] (* Harvey P. Dale, Aug 20 2012 *)
|
|
PROG
|
(PARI) SumD(x)= { s=0; while (x>9, s+=x-10*(x\10); x\=10); return(s + x) } ProdD(x)= { p=1; while (x>9, p*=(x-10*(x\10)); x\=10); return(p*x) } { n=0; for (m=1, 10^9, if (issquare(ProdD(m)) && issquare(SumD(m)), write("b062398.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 07 2009
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|