login
Numbers such that the rounded up arithmetic mean of their digits equals their digital root.
3

%I #13 Feb 10 2019 03:39:35

%S 0,1,2,3,4,5,6,7,8,9,10,99,100,149,158,167,176,185,194,239,248,257,

%T 266,275,284,293,329,338,347,356,365,374,383,392,419,428,437,446,455,

%U 464,473,482,491,509,518,527,536,545,554,563,572,581,590,608,617,626,635

%N Numbers such that the rounded up arithmetic mean of their digits equals their digital root.

%C A004427(a(n)) = A010888(a(n)); complement of A178405.

%H Reinhard Zumkeller, <a href="/A178404/b178404.txt">Table of n, a(n) for n = 1..1000</a>

%e From _Reinhard Zumkeller_, May 28 2010: (Start)

%e 1093 --> 1+0+9+3=13 --> A010888(1093) = 1+3 = 4 and also

%e 1093 --> 1+0+9+3=13 --> A004427(1093) = ceiling(13/4) = 4,

%e therefore 1093 is a term: a(100) = 1093. (End)

%p A178404 := proc(n) option remember: local k: if(n=1)then return 0: fi: k:=procname(n-1)+1: do if(ceil(add(d, d=convert(k,base,10))/length(k))-1 = (k-1) mod 9)then return k: fi: k:=k+1: od: end: seq(A178404(n),n=1..57); # _Nathaniel Johnston_, May 04 2011

%t amdrQ[n_]:=NestWhile[Total[IntegerDigits[#]]&,n,#>9&]==Ceiling[ Mean[ IntegerDigits[n]]]; Select[Range[0,1000],amdrQ] (* _Harvey P. Dale_, Oct 10 2013 *)

%Y Cf. A004427, A010888, A178405.

%K base,easy,nonn

%O 1,3

%A _Reinhard Zumkeller_, May 27 2010