OFFSET
1,2
COMMENTS
The term digital sum represents: sum of the digits of a number e.g. the digital sum of 4913 is (4+9+1+3 = 17).
LINKS
K. D. Bajpai and Giovanni Resta, Table of n, a(n) for n = 1..1000 (first 110 terms from K. D. Bajpai)
EXAMPLE
19683 is in the sequence because 19683 divided by its digital sum (1+9+6+8+3 = 27) gives 729 which is a square: 729 = 27^2.
314432 is in the sequence because 314432 divided by its digital sum (3+1+4+4+3+2 = 17) gives 18496 which is a square: 18496 = 136^2.
MAPLE
with(StringTools):KD := proc() local a, b, d, e; a:=n^3; b:=add( i, i = convert((a), base, 10))(a); d:=a/b; if d=floor(d) then e:=evalf(d^(1/2)); if e=floor(e)then RETURN (a); fi; fi; end: seq(KD(), n=1..3000);
MATHEMATICA
Select[Range[10^4]^3, IntegerQ@ Sqrt[#/Total[ IntegerDigits@#]] &] (* Giovanni Resta, Jan 20 2014 *)
PROG
(PARI)
i2d(x) = if(x==0, return([0])); v=[]; while(x>0, y=x%10; x\=10; v=concat(y, v)); v
digsum(n) = d=i2d(n); sum(i=1, #d, d[i])
s=[]; for(n=1, 1000, c=n^3; if(issquare(c/digsum(c)), s=concat(s, c))); s \\ Colin Barker, Jan 20 2014
CROSSREFS
KEYWORD
base,nonn
AUTHOR
K. D. Bajpai, Jan 20 2014
STATUS
approved