
COMMENTS

For the definition of the 'sumofthesquareoftwodigits' see the comment on A257795 where the map is called s_2.
The following statements, densities and conjectures are based on calculations for n = 1..10000.
The map s_2 has fixed points 1, 1233, 3388, ... These are cycles of length 1. For the two four digit numbers see A055616.
Because s_2(3312) = 1233 and s_2(8833) = 3388 one has a(3312) = 1233 and a(8833) = 3388.
The numbers that end under iteration of s_2 in the cycle (1) are called the bihappy numbers (A257795). They have a density of 0.33%.
It is conjectured that iterations of s_2 always end in cycles of finite period length and besides the 1cycles for fixed points and the bihappy numbers there are ten different cycles of length > 1. The period lengths are: 2, 2, 4, 5, 5, 6, 10, 14, 35 or 56.
Two cycles with a period length of 2: 5965 => 7706 => 5965, first number that reaches this 2cycle is 51, the second 2cycle is: 3869 => 6205 => 3869, first number that reaches this 2cycle is 562. Density of both 2cycles together is 0.9%.
Cycle with a period length of 4: 3460 => 4756 => 5345 => 4834 => 3460. First number to reach this 4cycle is 342. Density is 0.69%.
Two cycles with a period length of 5: (1781, 6850, 7124, 5617, 3425, 1781), first number to reach this 5cycle is 57. And (3770, 6269, 8605, 7421, 5917), first number to reach this 5cycle is 162. Density of both 5cycles together is 1.78%.
Cycle with a period length of 6: (4973, 7730, 6829, 5465, 7141, 6722, 4973). First number to reach this 6cycle is 389. Density exactly 1%.
Cycle with a period length of 10: (1268, 4768, 6833, 5713, 3418, 1480, 6596, 13441, 2838, 2228, 1268). First number to reach this 10cycle is 21. Density 0.48%.
Cycle with a period length of 14: (1946, 2477, 6505, 4250, 4264, 5860, 6964, 8857, 10993, 8731, 8530, 8125, 7186, 12437, 1946). First number to reach this 14cycle is 28. Density 5.5%.
Cycle with a period length of 35: (37, 1369, 4930, 3301, 1090, 8200, 6724, 5065, 6725, 5114, 2797, 10138, 1446, 2312, 673, 5365, 7034, 6056, 6736, 5785, 10474, 5493, 11565, 4451, 4537, 3394, 9925, 10426, 693, 8685, 14621, 2558, 3989, 9442, 10600, 37). First number to reach this 35cycle is 2. Density is 27.89%.
Cycle with a period length of 56: (41, 1681, 6817, 4913, 2570, 5525, 3650, 3796, 10585, 7251, 7785, 13154, 3878, 7528, 6409, 4177, 7610, 5876, 9140, 9881, 16165, 7947, 8450, 9556, 12161, 4163, 5650, 5636, 4432, 2960, 4441, 3617, 1585, 7450, 7976, 12017, 690, 8136, 7857, 9333, 9738, 10853, 2874, 6260, 7444, 7412, 5620, 3536, 2521, 1066, 4456, 5072, 7684, 12832, 1809, 405, 41). First number to reach this 56cycle is 5. Density 61.38%.
