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.

A322862 a(n) = A000120(A285330(n)).

This page as a plain text file.
%I A322862 #11 Dec 31 2018 13:22:32
%S A322862 0,1,1,1,1,2,1,1,2,2,1,2,1,2,2,1,1,2,1,2,2,2,1,2,2,2,2,3,1,3,1,1,2,2,
%T A322862 2,2,1,2,2,2,1,3,1,3,4,2,1,2,3,2,2,3,1,2,2,3,2,2,1,4,1,2,3,1,2,3,1,2,
%U A322862 2,3,1,4,1,2,4,3,2,3,1,3,4,2,1,3,2,2,2,3,1,4,2,4,2,2,2,2,1,3,2,2,1,3,1,3,3
%N A322862 a(n) = A000120(A285330(n)).
%H A322862 Antti Karttunen, <a href="/A322862/b322862.txt">Table of n, a(n) for n = 1..16384</a>
%H A322862 Antti Karttunen, <a href="/A322862/a322862.txt">Data supplement: n, a(n) computed for n = 1..65537</a>
%H A322862 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H A322862 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%F A322862 a(n) = A000120(A285330(n)).
%F A322862 If n is squarefree, a(n) = A322869(n) = A000120(A048675(n)) = A001221(n), otherwise a(n) = A000120(A285328(n)).
%t A322862 Table[DigitCount[#, 2, 1] &@ 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, 105}] (* _Michael De Vlieger_, Dec 31 2018 *)
%o A322862 (PARI)
%o A322862 A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
%o A322862 A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ From A048675
%o A322862 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 A322862 A285330(n) = if(moebius(n)<>0,A048675(n),A285328(n));
%o A322862 A322862(n) = hammingweight(A285330(n));
%o A322862 \\ Or just as:
%o A322862 A322862(n) = if(issquarefree(n), omega(n), hammingweight(A285328(n)));
%Y A322862 Cf. A000120, A001221, A001222, A285328, A285330, A322811, A322861, A322869.
%K A322862 nonn
%O A322862 1,6
%A A322862 _Antti Karttunen_, Dec 31 2018