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.

A356320 Length of the common prefix in binary expansions of n and A332221(n) = A156552(sigma(A005940(1+n))).

This page as a plain text file.
%I A356320 #9 Sep 08 2022 16:49:48
%S A356320 0,1,1,1,2,3,1,1,1,1,3,2,1,1,1,1,2,2,1,4,3,1,2,3,1,1,1,1,1,1,2,1,4,1,
%T A356320 2,6,1,2,3,2,3,1,3,2,2,2,3,2,1,1,1,1,1,1,1,1,2,1,1,1,1,2,1,1,1,3,4,3,
%U A356320 3,1,4,2,3,1,1,3,3,3,6,3,2,1,3,2,1,1,2,3,2,2,2,2,2,4,1,2,1,1,1,1,1,1,1,1,1,1
%N A356320 Length of the common prefix in binary expansions of n and A332221(n) = A156552(sigma(A005940(1+n))).
%H A356320 Antti Karttunen, <a href="/A356320/b356320.txt">Table of n, a(n) for n = 0..32759</a>
%H A356320 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H A356320 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%H A356320 <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>
%o A356320 (PARI)
%o A356320 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
%o A356320 Abincompreflen(n, m) = { my(x=binary(n),y=binary(m),u=min(#x,#y)); for(i=1,u,if(x[i]!=y[i],return(i-1))); (u);};
%o A356320 A156552(n) = {my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552
%o A356320 A347380(n) = Abincompreflen(A156552(n), A156552(sigma(n)));
%o A356320 A356320(n) = A347380(A005940(1+n));
%o A356320 \\ Alternatively as:
%o A356320 A356320(n) = Abincompreflen(n, A156552(sigma(A005940(1+n))));
%Y A356320 Cf. A000203, A005940, A070939, A156552, A324054, A347380, A356321, A332222.
%K A356320 nonn
%O A356320 0,5
%A A356320 _Antti Karttunen_, Aug 06 2022