OFFSET
1,2
COMMENTS
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..1500
Paolo P. Lava, Plot of the first 1500 terms of the sequence
EXAMPLE
The sum of the cyclic permutations of 4371 is 4371 + 1437 + 7143 + 3714 = 16667; sigma(4371) = 6144 and the sum of its cyclic permutations is 6144 + 4614 + 4461 + 1446 = 16667; phi(4371) = 2760 and the sum of its cyclic permutations is2760+276+6027+7602 = 16667.
The sum of the cyclic permutations of 24831 is 24831 + 12483 + 31248 + 83124 + 48312 = 199998; sigma(24831) = 37440 and the sum of its cyclic permutations is 37440 + 3744 + 40374 + 44037 + 74403 = 199998; phi(24831) = 15840 and the sum of its cyclic permutations is 15840 + 1584 + 40158 + 84015 + 58401 = 199998.
MAPLE
with(numtheory):P:=proc(q) local a, b, c, d, f, k, n;
for n from 1 to q do a:=n; b:=a; c:=ilog10(a);
for k from 1 to c do a:=(a mod 10)*10^c+trunc(a/10); b:=b+a; od;
a:=sigma(n); d:=a; c:=ilog10(a);
for k from 1 to c do a:=(a mod 10)*10^c+trunc(a/10); d:=d+a; od;
a:=phi(n); f:=a; c:=ilog10(a);
for k from 1 to c do a:=(a mod 10)*10^c+trunc(a/10); f:=f+a; od;
if b=d and d=f then print(n); fi; od; end: P(10^9);
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Sep 12 2014
STATUS
approved