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

A227224
Numbers n such that n*(sum of digits of n) is a perfect square.
1
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 75, 81, 100, 121, 144, 147, 150, 169, 192, 196, 200, 225, 242, 288, 300, 320, 324, 363, 375, 400, 441, 484, 500, 507, 512, 529, 600, 640, 648, 700, 704, 735, 800, 832, 882, 900, 960, 961, 1014, 1083, 1088, 1200, 1250, 1452, 1458, 1521, 1681, 1815
OFFSET
1,3
EXAMPLE
375*(3+7+5) = 5625 = 75^2. So, 375 is a member of this sequence.
MATHEMATICA
Select[Range[0, 1815], IntegerQ@ Sqrt[# Plus @@ IntegerDigits@ #] &] (* Michael De Vlieger, Apr 12 2015 *)
PROG
(Python)
def DS(n):
s = 0
for i in str(n):
s += int(i)
return s
for n in range(10**3):
k = 0
while k**2 <= n*DS(n):
if k**2 == n*DS(n):
print(n, end=', ')
break
else:
k += 1
# Edited by Derek Orr Apr 10 2015
(Magma) [n: n in [0..1000] | IsSquare(n*(&+Intseq(n)))]; // Vincenzo Librandi, Sep 20 2013
(PARI) for(n=0, 2000, s=sumdigits(n); if(issquare(n*s), print1(n, ", "))) \\ Derek Orr, Apr 10 2015
(Sage) [x for x in [0..2000] if is_square(x*sum(Integer(x).digits(base=10)))] # Bruno Berselli, May 25 2015
CROSSREFS
Cf. A007953.
Sequence in context: A138141 A228017 A346535 * A236750 A001102 A051004
KEYWORD
nonn,base,easy
AUTHOR
Derek Orr, Sep 19 2013
EXTENSIONS
More terms from Derek Orr, Apr 10 2015
STATUS
approved