login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A240898
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).
2
23, 29, 31, 37, 53, 59, 71, 73, 79, 113, 131, 137, 139, 173, 179, 191, 193, 197, 199, 5627, 109667, 234631, 470383, 785833, 884539, 7004885, 27794549, 134035373, 161827399, 168838613, 1180754999, 1237998833, 1633413359, 2827151629, 3283714933, 5356159891, 13356724387
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