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.

A356157 The nearest common ancestor of sigma(n) and gcd(n, sigma(n)) in the Doudna tree (A005940).

This page as a plain text file.
%I A356157 #11 Aug 04 2022 22:27:19
%S A356157 1,1,1,1,1,6,1,1,1,2,1,2,1,2,3,1,1,3,1,2,1,2,1,6,1,2,1,28,1,2,1,1,3,2,
%T A356157 1,1,1,2,1,3,1,6,1,2,3,2,1,2,1,1,2,2,1,6,1,2,1,2,1,3,1,2,1,1,1,2,1,2,
%U A356157 3,2,1,3,1,2,1,2,1,3,1,2,1,2,1,28,1,2,3,2,1,2,7,2,1,2,3,3,1,1,3,1,1,2,1,2,3
%N A356157 The nearest common ancestor of sigma(n) and gcd(n, sigma(n)) in the Doudna tree (A005940).
%H A356157 Antti Karttunen, <a href="/A356157/b356157.txt">Table of n, a(n) for n = 1..65537</a>
%H A356157 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%H A356157 <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>
%o A356157 (PARI)
%o A356157 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 A356157 Abinprefix(n,k) = { my(digs=binary(n)); fromdigits(vector(k,i,digs[i]),2); };
%o A356157 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
%o A356157 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 A356157 A348040sq(x,y) = Abincompreflen(A156552(x), A156552(y));
%o A356157 A348041sq(x,y) = A005940(1+Abinprefix(A156552(x),A348040sq(x,y)));
%o A356157 A356157(n) = A348041sq(sigma(n),gcd(n, sigma(n)));
%Y A356157 Cf. A000203, A009194, A336702 (fixed points), A348040, A348041.
%Y A356157 Cf. also A347879, A356156, A356307.
%K A356157 nonn
%O A356157 1,6
%A A356157 _Antti Karttunen_, Jul 30 2022