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 A356321 #21 Jul 03 2023 14:50:41 %S A356321 0,0,1,1,1,0,2,2,3,3,1,2,3,3,3,3,3,3,4,1,2,4,3,2,4,4,4,4,4,4,3,4,2,5, %T A356321 4,0,5,4,3,4,3,5,3,4,4,4,3,4,5,5,5,5,5,5,5,5,4,5,5,5,5,4,5,5,6,4,3,4, %U A356321 4,6,3,5,4,6,6,4,4,4,1,4,5,6,4,5,6,6,5,4,5,5,5,5,5,3,6,5,6,6,6,6,6,6,6,6,6,6 %N A356321 a(n) = A347381(A005940(1+n)). %C A356321 This sequence tells how near sigma(x) is to each x in Doudna-tree, A005940, with x iterating over the vertices of the tree in the breadth-first fashion. Positions that correspond to perfect numbers or (hypothetical) odd triperfect numbers get values 0 and 1 respectively. 1's occur also elsewhere. (Clarified Jul 03 2023) %C A356321 See the illustrations in A347391 and in A347392. %H A356321 Antti Karttunen, <a href="/A356321/b356321.txt">Table of n, a(n) for n = 0..65471</a> %H A356321 Michael De Vlieger, <a href="/A356321/a356321.png">Annotated fan style binary tree diagram</a> labeling A005940(0..511) but using a color function for a(0..16383) where black represents 0, red 1, and magenta the largest value of a(n), n = 0..16383. %H A356321 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a> %H A356321 <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a> %F A356321 a(n) = A070939(n) - A356320(n). %o A356321 (PARI) %o A356321 A000523(n) = logint(n,2); %o A356321 Abincompreflen(x, y) = if(!x || !y, 0, my(xl=A000523(x), yl=A000523(y), s=min(xl,yl), k=0); x >>= (xl-s); y >>= (yl-s); while(s>=0 && !bitand(1,bitxor(x>>s,y>>s)), s--; k++); (k)); %o A356321 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); }; %o A356321 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 A356321 A061395(n) = if(n>1, primepi(vecmax(factor(n)[, 1])), 0); %o A356321 A252464(n) = if(1==n,0,(bigomega(n) + A061395(n) - 1)); %o A356321 A347381(n) = (A252464(n)-Abincompreflen(A156552(n), A156552(sigma(n)))); %o A356321 A356321(n) = A347381(A005940(1+n)); %Y A356321 Cf. A000203, A005940, A070939, A156552, A324054, A347381, A356320. %K A356321 nonn %O A356321 0,7 %A A356321 _Antti Karttunen_, Aug 03 2022