cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A369041 LCM-transform of binary Gray code (A003188).

This page as a plain text file.
%I A369041 #22 Mar 24 2024 12:23:08
%S A369041 1,3,2,1,7,5,2,1,13,1,1,1,11,3,2,1,5,3,1,1,31,29,1,1,1,23,1,1,19,17,2,
%T A369041 1,7,1,1,1,1,53,1,1,61,1,1,1,59,1,1,1,41,43,1,1,47,1,1,1,37,1,1,1,1,1,
%U A369041 2,1,97,1,1,1,103,101,1,1,109,1,1,1,107,1,1,1,11,1,1,1,127,5,1,1,1,1,1,1,1,113,1,1,3
%N A369041 LCM-transform of binary Gray code (A003188).
%C A369041 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.
%H A369041 Antti Karttunen, <a href="/A369041/b369041.txt">Table of n, a(n) for n = 1..16384</a>
%H A369041 Michael De Vlieger, <a href="/A369041/a369041.png">Scatterplot of a(n)</a>, n = 1..2^16.
%H A369041 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A369041 a(n) = lcm {1..A003188(n)} / lcm {1..A003188(n-1)}.
%F A369041 a(n) = A014963(A003188(n)). [See comments.]
%t A369041 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 *)
%o A369041 (PARI)
%o A369041 up_to = 65537; \\ Checked up to 2^17;
%o A369041 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); };
%o A369041 A003188(n) = bitxor(n, n>>1);
%o A369041 v369041 = LCMtransform(vector(up_to,i,A003188(i)));
%o A369041 A369041(n) = v369041[n];
%o A369041 A014963(n) = { ispower(n, , &n); if(isprime(n), n, 1); };
%Y A369041 Cf. A000523, A003188, A014963, A368900, A369042, A369043, A369044.
%K A369041 nonn
%O A369041 1,2
%A A369041 _Antti Karttunen_, Jan 12 2024