Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #11 Sep 07 2023 16:11:07
%S 0,0,0,0,0,0,6,0,8,0,10,0,12,6,6,0,16,8,18,0,4,10,22,0,24,12,12,6,28,
%T 6,30,0,32,16,34,8,36,18,18,0,40,4,42,10,20,22,46,0,48,24,24,12,52,12,
%U 22,6,56,28,58,6,60,30,14,0,64,32,66,16,68,34,70,8,72,36,16,18,12,18,78,0,80,40,82,4,40,42,42,10
%N a(n) = A156552(A364502(n)), where A364502(n) = A005940(n) / gcd(n, A005940(n)), and A156552 is the inverse of offset-0 version of Doudna-sequence A005940.
%H Antti Karttunen, <a href="/A365432/b365432.txt">Table of n, a(n) for n = 1..16384</a>
%F For all n >= 1, a(n) <= n-1 and A341520(a(n), A365430(n)) = n-1.
%o (PARI)
%o 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 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
%o A364502(n) = { my(u=A005940(n)); (u / gcd(n, u)); };
%o A365432(n) = A156552(A364502(n));
%Y Cf. A005940, A364500, A341520, A365430, A365431 (rgs-transform).
%K nonn
%O 1,7
%A _Antti Karttunen_, Sep 07 2023