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.

A304464 Start with the normalized multiset of prime factors of n > 1. Given a multiset, take the multiset of its multiplicities. Repeat this until a multiset of size 1 is obtained. a(n) is the unique element of this multiset.

Original entry on oeis.org

0, 1, 2, 2, 3, 2, 4, 3, 2, 2, 5, 2, 6, 2, 2, 4, 7, 2, 8, 2, 2, 2, 9, 2, 2, 2, 3, 2, 10, 3, 11, 5, 2, 2, 2, 2, 12, 2, 2, 2, 13, 3, 14, 2, 2, 2, 15, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 17, 2, 18, 2, 2, 6, 2, 3, 19, 2, 2, 3, 20, 2, 21, 2, 2, 2, 2, 3, 22, 2, 4, 2, 23
Offset: 1

Views

Author

Gus Wiseman, May 13 2018

Keywords

Comments

a(1) = 0 by convention.

Examples

			Starting with the normalized multiset of prime factors of 360, we obtain {1,1,1,2,2,3} -> {1,2,3} -> {1,1,1} -> {3}, so a(360) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[If[n===1,0,NestWhile[Sort[Length/@Split[#]]&,If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]],Length[#]>1&]//First],{n,100}]

Formula

a(prime(n)) = n.
a(p^n) = n where p is any prime number and n > 1.
a(product of n > 1 distinct primes) = n.