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!)
A174876 Numbers n such that the sum of squares of their digits > n. 1

%I #11 Feb 23 2014 14:00:31

%S 2,3,4,5,6,7,8,9,14,15,16,17,18,19,25,26,27,28,29,36,37,38,39,46,47,

%T 48,49,56,57,58,59,66,67,68,69,76,77,78,79,85,86,87,88,89,94,95,96,97,

%U 98,99

%N Numbers n such that the sum of squares of their digits > n.

%C The sequence is finite and contains 50 numbers. If n > 99, the sum of squares of digits of n < n.

%e 56 is in the sequence because 5^2 + 6^2 = 61 > 56.

%p with(numtheory):k:=0:for n from 1 to 200do:l:=length(n):n0:=n:s:=0:for m from

%p 1 to l do:q:=n0:u:=irem(q,10):v:=iquo(q,10):n0:=v :s:=s+u^2:od: if s>n then

%p k:=k+1:printf(`%d, `,n):else fi:od:print(k):

%o (Sage) A174876 = [n for n in IntegerRange(1, 1000) if sum(d**2 for d in n.digits()) > n] # _D. S. McNeil_, Dec 02 2010

%K nonn,base,fini,full

%O 1,1

%A _Michel Lagneau_, Dec 02 2010

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 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)