
EXAMPLE

For n=1, sigma(1) = 1, both gcd(10, 1(10)) = gcd(1,0) = 1 and gcd(11, 1(11)) = gcd(0,1) = 1, thus a(1) = 2.

For n=3, sigma(3) = 4, we have 5 cases to consider:
gcd(30, 3(40)) = 1 = gcd(34, 3(44)),
gcd(31, 3(41)) = 2 = gcd(33, 3(43)),
gcd(32, 3(42)) = 1,
of which three cases give 1 as a result, thus a(3) = 3.

For n=6, sigma(6) = 12, we have 13 cases to consider:
gcd(60, 6(120)) = 6 = gcd(612, 6(1212)),
gcd(61, 6(121)) = 5 = gcd(611, 6(1211)),
gcd(62, 6(122)) = 4 = gcd(610, 6(1210)),
gcd(63, 6(123)) = 3 = gcd(69, 6(129)),
gcd(64, 6(124)) = 2 = gcd(68, 6(128))
gcd(65, 6(125)) = 1 = gcd(67, 6(127)),
gcd(66, 6(126)) = 0,
of which only two give 1 as a result, thus a(6) = 2.

For n=10, sigma(10) = 18, we have 19 cases to consider:
gcd(100, 10(180)) = 2 = gcd(1018, 10(1818)),
gcd(101, 10(181)) = 1 = gcd(1017, 10(1817)),
gcd(102, 10(182)) = 2 = gcd(1016, 10(1816)),
gcd(103, 10(183)) = 1 = gcd(1015, 10(1815)),
gcd(104, 10(184)) = 2 = gcd(1014, 10(1814)),
gcd(105, 10(185)) = 1 = gcd(1013, 10(1813)),
gcd(106, 10(186)) = 2 = gcd(1012, 10(1812)),
gcd(107, 10(187)) = 1 = gcd(1011, 10(1811)),
gcd(108, 10(188)) = 2 = gcd(1010, 10(1810)),
gcd(109, 10(189)) = 1,
of which 9 cases give 1 as a result, thus a(10) = 9.

For n=15, sigma(15) = 24, we have 25 cases to consider:
gcd(150, 15(240)) = 3 = gcd(1524, 15(2424)),
gcd(151, 15(241)) = 2 = gcd(1523, 15(2423)),
gcd(152, 15(242)) = 1 = gcd(1522, 15(2422)),
gcd(153, 15(243)) = 6 = gcd(1521, 15(2421)),
gcd(154, 15(244)) = 1 = gcd(1520, 15(2420)),
gcd(155, 15(245)) = 2 = gcd(1519, 15(2419)),
gcd(156, 15(246)) = 3 = gcd(1518, 15(2418)),
gcd(157, 15(247)) = 2 = gcd(1517, 15(2417)),
gcd(158, 15(248)) = 1 = gcd(1516, 15(2416)),
gcd(159, 15(249)) = 6 = gcd(1515, 15(2415)),
gcd(1510, 15(2410)) = 1 = gcd(1514, 15(2414)),
gcd(1511, 15(2411)) = 2 = gcd(1513, 15(2413)),
gcd(1512, 15(2412)) = 3,
of which 2*4 = 8 cases give 1 as a result, thus a(15) = 8.
