OFFSET
1,2
COMMENTS
Binary Gray code, A003188, is a permutation related to the binary expansion of n that keeps all the numbers of range [2^k, 2^(1+k)[ in the same range, i.e., for all n >= 1, A000523(A003188(n)) = A000523(n), from which it immediately follows that A003188 has the property S mentioned in the comments of A368900, and therefore this sequence is equal to A014963(A003188(n)), for n >= 1.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
Michael De Vlieger, Scatterplot of a(n), n = 1..2^16.
FORMULA
MATHEMATICA
nn = 120; a[1] = s[1] = 1; Do[s[n] = LCM[s[n - 1], BitXor[n, Floor[n/2]] ]; a[n] = s[n]/s[n - 1], {n, 2, nn}]; Array[a, nn] (* Michael De Vlieger, Mar 24 2024 *)
PROG
(PARI)
up_to = 65537; \\ Checked up to 2^17;
LCMtransform(v) = { my(len = length(v), b = vector(len), g = vector(len)); b[1] = g[1] = 1; for(n=2, len, g[n] = lcm(g[n-1], v[n]); b[n] = g[n]/g[n-1]); (b); };
A003188(n) = bitxor(n, n>>1);
v369041 = LCMtransform(vector(up_to, i, A003188(i)));
A369041(n) = v369041[n];
A014963(n) = { ispower(n, , &n); if(isprime(n), n, 1); };
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 12 2024
STATUS
approved