OFFSET
1,1
COMMENTS
Terms a(1)-a(19) are primes, terms a(20)-a(37) are composite.
EXAMPLE
If n = 234631, starting from the most significant digit, let us cut the number into the set 2, 23, 234, 2346, 23463. We have:
sigma(2) - 2 = 1;
sigma(23) - 23 = 1;
sigma(234) - 234 = 312;
sigma(2346) - 2346 = 2838;
sigma(23463) - 23463 = 14937
and 1 + 1 + 312 + 2838 + 14937 = 18089 = sigma(234631) - 234631.
MAPLE
with(numtheory); P:=proc(q) local a, k, n;
for n from 2 to q do a:=0; k:=1; while trunc(n/10^k)>0 do a:=a+sigma(trunc(n/10^k))-trunc(n/10^k); k:=k+1; od;
if sigma(n)-n=a then print(n); fi; od; end: P(10^9);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Apr 14 2014
EXTENSIONS
a(23)-a(37) from Giovanni Resta, Apr 16 2014
STATUS
approved