OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
990 is a composite number whose first digit is equal to the sum of all the other digits.
MAPLE
a := proc (n) local nn: nn := convert(n, base, 10): if isprime(n) = false and nn[nops(nn)] = add(nn[j], j = 1 .. nops(nn)-1) then n else end if end proc: seq(a(n), n = 2 .. 1100); # Emeric Deutsch, Mar 07 2009
MATHEMATICA
cnfdQ[n_]:=With[{id=IntegerDigits[n]}, CompositeQ[n]&&id[[1]]==Total[Rest[id]]]; Select[ Range[1000], cnfdQ] (* Harvey P. Dale, Aug 10 2024 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Parthasarathy Nambi, Mar 02 2009
EXTENSIONS
Corrected and extended by Emeric Deutsch, Mar 07 2009
STATUS
approved