login

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”).

A285330
If n is squarefree, then a(n) = A048675(n), otherwise a(n) = A285328(n).
11
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, 14, 512, 7, 1024, 16, 18, 65, 12, 24, 2048, 129, 34, 20, 4096, 11, 8192, 22, 15, 257, 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
OFFSET
1,3
COMMENTS
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.
LINKS
FORMULA
If A008683(n) <> 0 [when n is squarefree], a(n) = A048675(n), otherwise a(n) = A285328(n).
MATHEMATICA
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 *)
PROG
(PARI)
A007947(n) = factorback(factorint(n)[, 1]); \\ From Andrew Lelechenko, May 09 2014
A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ Michel Marcus, Oct 10 2016
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)); };
A285330(n) = if(moebius(n)<>0, A048675(n), A285328(n));
(Scheme) (define (A285330 n) (if (not (zero? (A008683 n))) (A048675 n) (A285328 n)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 19 2017
STATUS
approved

  NODES
orte 1
see 2
Story 1