%I #13 Apr 16 2014 11:19:34
%S 23,29,31,37,53,59,71,73,79,113,131,137,139,173,179,191,193,197,199,
%T 5627,109667,234631,470383,785833,884539,7004885,27794549,134035373,
%U 161827399,168838613,1180754999,1237998833,1633413359,2827151629,3283714933,5356159891,13356724387
%N Consider a number of k digits n = d_(k)*10^(k-1) + d_(k-1)*10^(k-2) + … + d_(2)*10 + d_(1). Sequence lists the numbers n such that sigma(n) - n = Sum_{i=1..k-1}{sigma(Sum_{j=1..i}{d_(k-j+1)*10^(i-j)}) - Sum_{j=1..i}{d_(k-j+1)*10^(i-j)}} (see example below).
%C Terms a(1)-a(19) are primes, terms a(20)-a(37) are composite.
%e If n = 234631, starting from the most significant digit, let us cut the number into the set 2, 23, 234, 2346, 23463. We have:
%e sigma(2) - 2 = 1;
%e sigma(23) - 23 = 1;
%e sigma(234) - 234 = 312;
%e sigma(2346) - 2346 = 2838;
%e sigma(23463) - 23463 = 14937
%e and 1 + 1 + 312 + 2838 + 14937 = 18089 = sigma(234631) - 234631.
%p with(numtheory); P:=proc(q) local a,k,n;
%p 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;
%p if sigma(n)-n=a then print(n); fi; od; end: P(10^9);
%Y Cf. A000203, A240894-A240897, A240899-A240902.
%K nonn,base
%O 1,1
%A _Paolo P. Lava_, Apr 14 2014
%E a(23)-a(37) from _Giovanni Resta_, Apr 16 2014
|