login
Sum of digits = 7 times number of digits.
9

%I #14 Oct 22 2022 16:54:22

%S 7,59,68,77,86,95,399,489,498,579,588,597,669,678,687,696,759,768,777,

%T 786,795,849,858,867,876,885,894,939,948,957,966,975,984,993,1999,

%U 2899,2989,2998,3799,3889,3898,3979,3988,3997,4699,4789,4798,4879,4888,4897

%N Sum of digits = 7 times number of digits.

%H Robert Israel, <a href="/A061424/b061424.txt">Table of n, a(n) for n = 1..10000</a>

%e 498 is a term as the arithmetic mean of the digits is (4+9+8)/3 = 7.

%p filter:= proc(n) local L;

%p L:= convert(n,base,10);

%p convert(L,`+`)=nops(L)*7

%p end proc:

%p select(filter, [$1..10000]); # _Robert Israel_, Dec 07 2020

%t Select[Range[5000],Total[IntegerDigits[#]]==7IntegerLength[#]&] (* _Harvey P. Dale_, Oct 22 2022 *)

%Y Cf. A061383-A061388, A061423-A061425.

%K nonn,base,easy

%O 1,1

%A _Amarnath Murthy_, May 03 2001

%E More terms from Larry Reeves (larryr(AT)acm.org), May 16 2001

%E Offset changed by _Robert Israel_, Dec 07 2020