OFFSET
1,1
FORMULA
EXAMPLE
The first composite is 4, and the first sum of digits is 13, but since that is prime, we go to the next, 22, which being composite is a(1).
MAPLE
PROG
(UBASIC)
10 'compsdig, Enoch Haga, Jun 12 2009
20 N=1
30 Q=str(N)
40 L=len(Q)
50 for X=1 to L
60 M=str(mid(Q, X, 1)): Z=Z+val(mid(Q, X, 1))
70 next X
80 if Z=56 and Z<>prmdiv(Z) and N<>prmdiv(N) then print N: stop
90 Z=0: N=N+1: goto 30
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Enoch Haga, Jun 13 2009
STATUS
approved