OFFSET
1,1
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..10000
FORMULA
a(n) ~ n. - Charles R Greathouse IV, Oct 13 2022
MAPLE
A087144 := proc(n) option remember: local k: if(n=1)then return 29: fi: k:=procname(n-1)+1: do if(add(d, d=convert(k, base, 10)) mod (((k-1) mod 9) + 1) > 0)then return k: fi: k:=k+1: od: end: seq(A087144(n), n=1..70); # Nathaniel Johnston, May 04 2011
MATHEMATICA
ndQ[n_]:=Module[{tidn=Total[IntegerDigits[n]], dr}, dr= NestWhile[Total[ IntegerDigits[#]]&, tidn, #>9&]; !Divisible[tidn, dr]]; Select[Range[200], ndQ] (* Harvey P. Dale, Apr 22 2011 *)
PROG
(PARI) is(n)=sumdigits(n)%((n-1)%9+1) != 0 \\ Charles R Greathouse IV, Oct 13 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Reinhard Zumkeller, Aug 18 2003
STATUS
approved