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!)
A224977 n^2 minus sum of digits of n^2. 1

%I #19 May 10 2017 11:20:30

%S 0,0,0,0,9,18,27,36,54,72,99,117,135,153,180,216,243,270,315,351,396,

%T 432,468,513,558,612,657,711,765,828,891,945,1017,1071,1143,1215,1278,

%U 1350,1431,1512,1593,1665,1746,1827,1917,2016,2106,2196,2295,2394,2493

%N n^2 minus sum of digits of n^2.

%C a(n) mod 9 = 0 for all n.

%H Christian N. K. Anderson, <a href="/A224977/b224977.txt">Table of n, a(n) for n = 0..9999</a>

%H Christian N. K. Anderson, <a href="/A224977/a224977.jpg">Ulam spiral</a> of a(n) in red, with other multiples of 9 in gray.

%F a(n) = A000290(n) - A004159(n).

%e a(0) = 0^2 - 0 = 0.

%e a(12) = 144 - (1+4+4) = 135.

%t Table[n^2 - Sum[DigitCount[n^2][[i]]i, {i, 9}], {n, 50}] (* _Alonso del Arte_, Apr 21 2013 *)

%t #^2-Total[IntegerDigits[#^2]]&/@Range[0,50] (* _Harvey P. Dale_, May 10 2017 *)

%o (R) library(gmp); digsum<-function(x) sum(as.numeric(unlist(strsplit(as.character(x),split=""))))

%o ans=rep(0,100); n=0

%o while(n<=100) ans[(n=n+1)]=n^2-digsum(n^2); ans

%Y Cf. A067552.

%Y Derived from A000290 and A004159.

%K nonn,base,easy

%O 0,5

%A _Kevin L. Schwartz_ and _Christian N. K. Anderson_, Apr 21 2013

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 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)