%I #23 Aug 27 2023 16:41:27
%S 8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,
%T 100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,
%U 168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,256,260,264
%N Bases b such that all integers m having the commuting property r(m)^2 = r(m^2), where r is cyclic replacement of digits d->(d+1) mod b, are of the form m = (b/2 - 1)*(b^k - 1)/(b - 1) + 1 for k >= 1.
%C The bases b form the arithmetic sequence 8+4*k, k>=0, so b/2 is necessarily even. The bases b=2 and b=4 have b/2 as the only number with the commuting property. No odd base b has the commuting property.
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1).
%F From _Chai Wah Wu_, Dec 29 2021: (Start)
%F a(n) = 2*a(n-1) - a(n-2) for n > 2.
%F G.f.: x*(8 - 4*x)/(x - 1)^2. (End)
%e In base 8, the numbers with the commuting property are 4, 34, 334, 3334, 33334, 333334 etc, given by the formula 3*(8^k - 1)/7 + 1.
%t a[n_] := 4*(n + 1); Table[a[n], {n, 1, 65}] (* _Robert P. P. McKone_, Aug 25 2023 *)
%Y Except for initial terms, same as A008586.
%Y Cf. A059558, A124354, A192544, A117755, A127856, A127857, A127859, A127860, A127861.
%K nonn,base,easy
%O 1,1
%A _Walter Kehowski_, Jul 04 2011
%E More terms from _Chai Wah Wu_, Dec 29 2021
%E Edited by _Max Alekseyev_, Aug 24 2023