login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A227224 Numbers n such that n*(sum of digits of n) is a perfect square. 1

%I #39 Sep 08 2022 08:46:05

%S 0,1,2,3,4,5,6,7,8,9,12,24,36,48,75,81,100,121,144,147,150,169,192,

%T 196,200,225,242,288,300,320,324,363,375,400,441,484,500,507,512,529,

%U 600,640,648,700,704,735,800,832,882,900,960,961,1014,1083,1088,1200,1250,1452,1458,1521,1681,1815

%N Numbers n such that n*(sum of digits of n) is a perfect square.

%e 375*(3+7+5) = 5625 = 75^2. So, 375 is a member of this sequence.

%t Select[Range[0, 1815], IntegerQ@ Sqrt[# Plus @@ IntegerDigits@ #] &] (* _Michael De Vlieger_, Apr 12 2015 *)

%o (Python)

%o def DS(n):

%o s = 0

%o for i in str(n):

%o s += int(i)

%o return s

%o for n in range(10**3):

%o k = 0

%o while k**2 <= n*DS(n):

%o if k**2 == n*DS(n):

%o print(n,end=', ')

%o break

%o else:

%o k += 1

%o # Edited by _Derek Orr_ Apr 10 2015

%o (Magma) [n: n in [0..1000] | IsSquare(n*(&+Intseq(n)))]; // _Vincenzo Librandi_, Sep 20 2013

%o (PARI) for(n=0,2000,s=sumdigits(n);if(issquare(n*s),print1(n,", "))) \\ _Derek Orr_, Apr 10 2015

%o (Sage) [x for x in [0..2000] if is_square(x*sum(Integer(x).digits(base=10)))] # _Bruno Berselli_, May 25 2015

%Y Cf. A007953.

%K nonn,base,easy

%O 1,3

%A _Derek Orr_, Sep 19 2013

%E More terms from _Derek Orr_, Apr 10 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)