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 A285330 #12 Dec 31 2018 13:21:17 %S A285330 0,1,2,2,4,3,8,4,3,5,16,6,32,9,6,8,64,12,128,10,10,17,256,18,5,33,9, %T A285330 14,512,7,1024,16,18,65,12,24,2048,129,34,20,4096,11,8192,22,15,257, %U A285330 16384,36,7,40,66,26,32768,48,20,28,130,513,65536,30,131072,1025,21,32,36,19,262144,34,258,13,524288,54,1048576,2049,45,38,24,35,2097152,50,27 %N A285330 If n is squarefree, then a(n) = A048675(n), otherwise a(n) = A285328(n). %C A285330 Each n > 1 occurs exactly twice in this sequence. a(n) tells which number is located at the parent node of the node that contains n in the binary tree A285332. See further comments there. %H A285330 Antti Karttunen, <a href="/A285330/b285330.txt">Table of n, a(n) for n = 1..4096</a> %F A285330 If A008683(n) <> 0 [when n is squarefree], a(n) = A048675(n), otherwise a(n) = A285328(n). %t A285330 Table[Which[n == 1, 0, MoebiusMu@ n != 0, Total@ Map[#2*2^(PrimePi@ #1 - 1) & @@ # &, FactorInteger[n]], True, With[{r = DivisorSum[n, EulerPhi[#] Abs@ MoebiusMu[#] &]}, SelectFirst[Range[n - 2, 2, -1], DivisorSum[#, EulerPhi[#] Abs@ MoebiusMu[#] &] == r &]]], {n, 81}] (* _Michael De Vlieger_, Dec 31 2018 *) %o A285330 (PARI) %o A285330 A007947(n) = factorback(factorint(n)[, 1]); \\ From _Andrew Lelechenko_, May 09 2014 %o A285330 A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ _Michel Marcus_, Oct 10 2016 %o A285330 A285328(n) = { my(r); if((n > 1 && !bitand(n,(n-1))), (n/2), r=A007947(n); if(r==n,1,n = n-r; while(A007947(n) <> r, n = n-r); n)); }; %o A285330 A285330(n) = if(moebius(n)<>0,A048675(n),A285328(n)); %o A285330 (Scheme) (define (A285330 n) (if (not (zero? (A008683 n))) (A048675 n) (A285328 n))) %Y A285330 Cf. A008683, A048675, A284584, A285328, A285332, A285333. %K A285330 nonn %O A285330 1,3 %A A285330 _Antti Karttunen_, Apr 19 2017