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.

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.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Gus Wiseman, May 13 2018

Keywords

Comments

a(1) = 0 by convention.
a(n) depends only on prime signature of n (cf. A025487). - Antti Karttunen, Nov 08 2018

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    Table[Switch[n,1,0,?PrimeQ,1,,NestWhile[Sort[Length/@Split[#]]&,Sort[Last/@FactorInteger[n]],Length[#]>1&]//First],{n,100}]
  • PARI
    A181819(n) = factorback(apply(e->prime(e),(factor(n)[,2])));
    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

Formula

a(p^n) = n where p is any prime number.
a(product of n distinct primes) = n.
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

Extensions

More terms from Antti Karttunen, Nov 08 2018