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.
%I A348040 #7 Oct 12 2021 21:56:32 %S A348040 0,0,0,0,1,0,0,1,1,0,0,1,2,1,0,0,1,1,1,1,0,0,1,2,2,2,1,0,0,1,2,1,1,2, %T A348040 1,0,0,1,2,1,3,1,2,1,0,0,1,1,1,2,2,1,1,1,0,0,1,1,2,3,3,3,2,1,1,0,0,1, %U A348040 2,2,1,2,2,1,2,2,1,0,0,1,2,1,1,1,4,1,1,1,2,1,0,0,1,2,1,3,1,1,1,1,3,1,2,1,0 %N A348040 Square array A(n,k) = the length of the common prefix in binary expansions of A156552(n) and A156552(k), read by antidiagonals. %H A348040 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a> %e A348040 The top left 17x17 corner of the array: %e A348040 n/k | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 %e A348040 ------+---------------------------------------------------- %e A348040 1 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, %e A348040 2 | 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, %e A348040 3 | 0, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, %e A348040 4 | 0, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, %e A348040 5 | 0, 1, 2, 1, 3, 2, 3, 1, 1, 3, 3, 2, 3, 3, 2, 1, 3, %e A348040 6 | 0, 1, 2, 1, 2, 3, 2, 1, 1, 2, 2, 3, 2, 2, 3, 1, 2, %e A348040 7 | 0, 1, 2, 1, 3, 2, 4, 1, 1, 3, 4, 2, 4, 4, 2, 1, 4, %e A348040 8 | 0, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 3, 1, %e A348040 9 | 0, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 2, 1, %e A348040 10 | 0, 1, 2, 1, 3, 2, 3, 1, 1, 4, 3, 2, 3, 3, 2, 1, 3, %e A348040 11 | 0, 1, 2, 1, 3, 2, 4, 1, 1, 3, 5, 2, 5, 4, 2, 1, 5, %e A348040 12 | 0, 1, 2, 1, 2, 3, 2, 1, 1, 2, 2, 4, 2, 2, 3, 1, 2, %e A348040 13 | 0, 1, 2, 1, 3, 2, 4, 1, 1, 3, 5, 2, 6, 4, 2, 1, 6, %e A348040 14 | 0, 1, 2, 1, 3, 2, 4, 1, 1, 3, 4, 2, 4, 5, 2, 1, 4, %e A348040 15 | 0, 1, 2, 1, 2, 3, 2, 1, 1, 2, 2, 3, 2, 2, 4, 1, 2, %e A348040 16 | 0, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 4, 1, %e A348040 17 | 0, 1, 2, 1, 3, 2, 4, 1, 1, 3, 5, 2, 6, 4, 2, 1, 7, %o A348040 (PARI) %o A348040 up_to = 105; %o A348040 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 A348040 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 A348040 A348040sq(x,y) = Abincompreflen(A156552(x), A156552(y)); %o A348040 A348040list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A348040sq(col,(a-(col-1))))); (v); }; %o A348040 v348040 = A348040list(up_to); %o A348040 A348040(n) = v348040[n]; %Y A348040 Cf. A252464 (main diagonal). %Y A348040 Cf. A005940, A156552, A348041. %Y A348040 Cf. also A347380, A347381. %K A348040 nonn,tabl %O A348040 1,13 %A A348040 _Antti Karttunen_, Sep 27 2021