OFFSET
1,1
COMMENTS
E. Angelini calls these "W numbers", see the link for more information.
LINKS
E. Angelini, W and M numbers, January 2012.
E. Angelini, W and M numbers [Cached copy, with permission]
PROG
(PARI) is_W(n)={ my(c=vector(10), OK(n, c) = c[2] >= n & return(1);
forstep( d=n-1, 2, -1, forstep( m=min(c[d+1], n\d), 1, -1, OK(n-m*d, c) & return(1))));
for( i=1, #n=Vecsmall( Str( n )), c[n[i]-47]++ ); c[1]<3 & return; c[2]==1 & return;
for( j=3, 10, c[j] != 1 | OK( j-1, c ) | return); 1} \\ M. F. Hasler, Jan 03 2012
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Jan 03 2012
STATUS
approved