OFFSET
1,2
COMMENTS
The minimum number with all its cyclic permutations belonging to the sequence is 243: 243, 324, 432. But if a "0" is prepended to 54 then it could be considered the minimum one: 054, 405, 540.
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..5000
EXAMPLE
The sum of the cyclic permutations of 171 is 171 + 117 + 711 = 999; phi(171) = 108 and the sum of its cyclic permutations is 108 + 810 + 81 = 999.
The sum of the cyclic permutations of 1863 is 1863 + 3186 + 6318 + 8631 = 19998; phi(1863) = 1188 and the sum of its cyclic permutations is 1188 + 8118 + 8811 + 1881 = 19998.
MAPLE
with(numtheory):P:=proc(q) local a, b, c, d, 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:=phi(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;
if d=b then print(n); fi; od; end: P(10^9);
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Sep 12 2014
STATUS
approved