|
|
A240903
|
|
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_{i=1..k-1}{sigma(Sum_{j=1..i}{d_(j)*10^(j-1)})} (see example below)
|
|
7
|
|
|
203, 611, 949, 217667, 225931, 4555063, 85761709, 326604133, 724719107, 1066308343, 1104663223, 3441723511
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
If n = 217667, starting from the most significant digit, let us cut the number into the set 2, 21, 217, 2176, 21766. We have:
sigma(2) = 3;
sigma(21) = 32;
sigma(217) = 256;
sigma(2176) = 4590;
sigma(21766) = 32652.
Then, starting from the least significant digit, let us cut the number into the set 7, 67, 667, 7667, 17667. We have:
sigma(7) = 8;
sigma(67) = 68;
sigma(667) = 720;
sigma(7667) = 9072;
sigma(17667) = 27664.
Finally,
3 + 32 + 256 + 4590 + 32652 - (8 + 68 + 720 + 9072 + 27664) = 1 = sigma(217667) - 217667.
|
|
MAPLE
|
with(numtheory); P:=proc(q) local a, b, k, n;
for n from 2 to q do a:=0; k:=1; while trunc(n/10^k)>0 do
a:=a+phi(trunc(n/10^k)); k:=k+1; od; b:=0; k:=1;
while (n mod 10^k)<n do b:=b+phi(n mod 10^k); k:=k+1; od;
if phi(n)=a-b then print(n); fi; od; end: P(10^9);
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|