login
Numbers that can be written as (m + sum of digits of m) for some m.
22

%I #40 Nov 22 2020 03:51:51

%S 2,4,6,8,10,11,12,13,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29,30,

%T 32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,54,55,56,

%U 57,58,59,60,61,62,63,65,66,67,68,69,70,71,72,73,74,76,77

%N Numbers that can be written as (m + sum of digits of m) for some m.

%C The asymptotic density of this sequence is approximately 0.9022222 (Guaraldo, 1978). - _Amiram Eldar_, Nov 22 2020

%D V. S. Joshi, A note on self-numbers. Volume dedicated to the memory of V. Ramaswami Aiyar, Math. Student, Vol. 39 (1971), pp. 327-328. MR0330032 (48 #8371).

%D Andrzej Makowski, On Kaprekar's "junction numbers", Math. Student, Vol. 34 (1966), p. 77. MR0223292 (36 #6340).

%D A. Narasinga Rao, On a technique for obtaining numbers with a multiplicity of generators, Math. Student, Vol. 34 (1966), pp. 79-84. MR0229573 (37 #5147).

%H Reinhard Zumkeller, <a href="/A176995/b176995.txt">Table of n, a(n) for n = 1..10000</a>

%H Rosalind Guaraldo, <a href="https://www.fq.math.ca/Scanned/16-5/guaraldo.pdf">On the Density of the Image Sets of Certain Arithmetic Functions - II</a>, The Fibonacci Quarterly, Vol. 16, No. 5 (1978), pp. 481-488.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SelfNumber.html">Self Number</a>.

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Self_number">Self number</a>.

%F A230093(a(n)) > 0. - _Reinhard Zumkeller_, Oct 11 2013

%e a(5) = 10 = 5 + (5);

%e a(87) = 100 = 86 + (8+6);

%e a(898) = 1000 = 977 + (9+7+7);

%e a(9017) = 10000 = 9968 + (9+9+6+8).

%t Select[Union[Table[n + Total[IntegerDigits[n]], {n, 77}]], # <= 77 &] (* _Jayanta Basu_, Jul 27 2013 *)

%o (Haskell)

%o a176995 n = a176995_list !! (n-1)

%o a176995_list = filter ((> 0) . a230093) [1..]

%o -- _Reinhard Zumkeller_, Oct 11 2013, Aug 21 2011

%o (PARI) is_A003052(n)={for(i=1, min(n\2, 9*#digits(n)), sumdigits(n-i)==i && return); n} \\ from A003052

%o isok(n) = ! is_A003052(n) \\ _Michel Marcus_, Aug 20 2020

%Y Complement of A003052, range of A062028.

%Y Cf. A062028, A007953, A055642, A230093.

%K nonn,base

%O 1,1

%A _Reinhard Zumkeller_, Aug 21 2011