A192544 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.
8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 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
Offset: 1
Examples
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.
Links
- Index entries for linear recurrences with constant coefficients, signature (2,-1).
Crossrefs
Programs
-
Mathematica
a[n_] := 4*(n + 1); Table[a[n], {n, 1, 65}] (* Robert P. P. McKone, Aug 25 2023 *)
Formula
From Chai Wah Wu, Dec 29 2021: (Start)
a(n) = 2*a(n-1) - a(n-2) for n > 2.
G.f.: x*(8 - 4*x)/(x - 1)^2. (End)
Extensions
More terms from Chai Wah Wu, Dec 29 2021
Edited by Max Alekseyev, Aug 24 2023
Comments