login
Belgian-9 numbers.
13

%I #16 May 08 2015 16:54:04

%S 9,10,11,12,13,14,15,16,17,18,19,21,25,27,30,32,33,36,45,51,54,57,63,

%T 67,69,72,81,83,90,93,99,100,101,102,104,105,108,109,110,111,115,117,

%U 119,120,121,122,123,124,126,129,130,135,139,140,141,142,144,146,149,153

%N Belgian-9 numbers.

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

%t belgianQ[n_, k_] := If[n < k, False, Block[{id = Join[{0}, IntegerDigits@ n]}, MemberQ[ Accumulate@ id, Mod[n - k, Plus @@ id]] ]]; Select[ Range@ 155, belgianQ[#, 9] &] (* _Robert G. Wilson v_, May 06 2011 *)

%o (Haskell)

%o a107043 n = a107043_list !! (n-1)

%o a107043_list = filter belge9 [9..] where

%o belge9 x = x == (head $ dropWhile (< x) $

%o scanl (+) 9 $ cycle (map (read . return) $ show x))

%o -- _Reinhard Zumkeller_, May 08 2015

%Y See A106039 for definition and link.

%Y Belgian-k numbers, k=0..9: A106039, A106439, A106518, A106596, A106631, A106792, A107014, A107018, A107032, A107043.

%Y Cf. A257770.

%K base,easy,nonn

%O 1,1

%A _Eric Angelini_, Jun 07 2005

%E Offset changed by _Reinhard Zumkeller_, May 08 2015