login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A058369 Numbers n such that n and n^2 have same digit sum. 11
0, 1, 9, 10, 18, 19, 45, 46, 55, 90, 99, 100, 145, 180, 189, 190, 198, 199, 289, 351, 361, 369, 379, 388, 450, 451, 459, 460, 468, 495, 496, 550, 558, 559, 568, 585, 595, 639, 729, 739, 775, 838, 855, 900, 954, 955, 990, 999, 1000, 1098, 1099, 1179, 1188, 1189 (list; graph; refs; listen; history; internal format)
OFFSET

1,3

COMMENTS

A007953(a(n)) = A004159(a(n)). [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Apr 25 2009]

LINKS

Zak Seidov, Table of n,a(n) for n=1..312205, a(n)=0..10^8

EXAMPLE

Digit sum of 9 = 9 9^2 = 81, 8+1 = 9 digit sum of 145 = 1+4+5 = 10 145^2 = 21025, 2+1+0+2+5 = 10 digit sum of 954 = 9+5+4 = 18 954^2 = 910116, 9+1+0+1+1+6 = 18 - Florian Roeseler (hazz_dollazz(AT)web.de), May 03 2010

MAPLE

P:=proc(n) local i, k, w, x; for i from 1 by 1 to n do w:=0; k:=i; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; x:=0; k:=i^2; while k>0 do x:=x+k-(trunc(k/10)*10); k:=trunc(k/10); od; if x=w then print(i); fi; od; end: P(10000); - Paolo P. Lava (paoloplava(AT)gmail.com), Nov 30 2007

sd := proc (n) options operator, arrow: add(convert(n, base, 10)[j], j = 1 .. nops(convert(n, base, 10))) end proc: a := proc (n) if sd(n) = sd(n^2) then n else end if end proc; seq(a(n), n = 0 .. 1400); [From Emeric Deutsch (deutsch(AT)duke.poly.edu), May 11 2010]

MATHEMATICA

Select[Range[0, 1200], Total[IntegerDigits[#]]==Total[IntegerDigits[ #^2]]&] (* From Harvey P. Dale, June 14 2011 *)

PROG

(Haskell)

import Data.List (elemIndices)

import Data.Function (on)

a058369 n = a058369_list !! (n-1)

a058369_list =

   elemIndices 0 $ zipWith ((-) `on` a007953) [0..] a000290_list

-- Reinhard Zumkeller, Aug 17 2011

CROSSREFS

Cf. A007953, A058370, A058852.

A077436. [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Apr 25 2009]

Sequence in context: A107433 A090570 A131417 * A110939 A141640 A015898

Adjacent sequences:  A058366 A058367 A058368 * A058370 A058371 A058372

KEYWORD

base,easy,nice,nonn

AUTHOR

G. L. Honaker, Jr. (honak3r(AT)gmail.com), Dec 17 2000

EXTENSIONS

Edited by N. J. A. Sloane, May 30 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 22:48 EST 2012. Contains 206085 sequences.