cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A236220 Cubes which when divided by their digital sum, become square.

Original entry on oeis.org

1, 8, 512, 4913, 5832, 17576, 19683, 64000, 125000, 314432, 421875, 1000000, 1124864, 1259712, 1404928, 3176523, 8000000, 91125000, 130323843, 191102976, 274625000, 348913664, 512000000, 791453125
Offset: 1

Views

Author

K. D. Bajpai, Jan 20 2014

Keywords

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).

Examples

			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.
		

Crossrefs

Cf. A000290 (squares), A007953 (digital sum), A061209.

Programs

  • 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 *)
  • 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