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 A304465 #18 Nov 08 2018 21:13:25 %S A304465 0,1,1,2,1,2,1,3,2,2,1,2,1,2,2,4,1,2,1,2,2,2,1,2,2,2,3,2,1,3,1,5,2,2, %T A304465 2,2,1,2,2,2,1,3,1,2,2,2,1,2,2,2,2,2,1,2,2,2,2,2,1,2,1,2,2,6,2,3,1,2, %U A304465 2,3,1,2,1,2,2,2,2,3,1,2,4,2,1,2,2,2,2,2,1,2,2,2,2,2,2,2,1,2,2,2,1,3,1,2,3 %N A304465 If n is prime, set a(n) = 1. Otherwise, start with the multiset of prime factors of n, and given a multiset take the multiset of its multiplicities. Repeating this until a multiset of size 1 is reached, set a(n) to the unique element of this multiset. %C A304465 a(1) = 0 by convention. %C A304465 a(n) depends only on prime signature of n (cf. A025487). - _Antti Karttunen_, Nov 08 2018 %H A304465 Antti Karttunen, <a href="/A304465/b304465.txt">Table of n, a(n) for n = 1..16384</a> %H A304465 Antti Karttunen, <a href="/A304465/a304465.txt">Data supplement: n, a(n) computed for n = 1..100000</a> %H A304465 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a> %F A304465 a(p^n) = n where p is any prime number. %F A304465 a(product of n distinct primes) = n. %F A304465 a(1) = 0; and for n > 1, if n = prime^k, a(n) = k, otherwise, if n is squarefree [i.e., A001221(n) = A001222(n)], a(n) = A001221(n), otherwise a(n) = a(A181819(n)). - _Antti Karttunen_, Nov 08 2018 %e A304465 Starting with the multiset of prime factors of 2520 we have {2,2,2,3,3,5,7} -> {1,1,2,3} -> {1,1,2} -> {1,2} -> {1,1} -> {2}, so a(2520) = 2. %t A304465 Table[Switch[n,1,0,_?PrimeQ,1,_,NestWhile[Sort[Length/@Split[#]]&,Sort[Last/@FactorInteger[n]],Length[#]>1&]//First],{n,100}] %o A304465 (PARI) %o A304465 A181819(n) = factorback(apply(e->prime(e),(factor(n)[,2]))); %o A304465 A304465(n) = if(1==n,0,my(t=isprimepower(n)); if(t,t, t=omega(n); if(bigomega(n)==t),t,A304465(A181819(n)))); \\ _Antti Karttunen_, Nov 08 2018 %Y A304465 Cf. A000005, A001222, A001597, A005117, A007916, A055932, A056239, A112798, A181819, A182850, A182857, A275870, A296150, A303945, A304464. %K A304465 nonn %O A304465 1,4 %A A304465 _Gus Wiseman_, May 13 2018 %E A304465 More terms from _Antti Karttunen_, Nov 08 2018