OFFSET
1,2
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..5000
EXAMPLE
The sum of the cyclic permutations of 153 is 153 + 315 + 531 = 999; sigma(153) = 234 and the sum of its cyclic permutations is 234 + 423 + 342 = 999.
The sum of the cyclic permutations of 4731 is 4731 + 1473 + 3147 + 7314 = 16665; sigma(4731) = 6720 and the sum of its cyclic permutations is 6720 + 672 + 2067 + 7206 = 16665.
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:=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;
if d=b then print(n); fi; od; end: P(10^9);
MATHEMATICA
scp[n_]:=Total[FromDigits/@Table[RotateRight[IntegerDigits[n], k], {k, IntegerLength[ n]}]]; Select[Range[1500], scp[#] == scp[DivisorSigma[ 1, #]]&] (* Harvey P. Dale, Nov 08 2020 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Sep 12 2014
STATUS
approved