|
|
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.
|
|
52
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
a(1) = 0 by convention.
|
|
LINKS
|
|
|
FORMULA
|
a(p^n) = n where p is any prime number.
a(product of n distinct primes) = n.
|
|
EXAMPLE
|
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.
|
|
MATHEMATICA
|
Table[Switch[n, 1, 0, _?PrimeQ, 1, _, NestWhile[Sort[Length/@Split[#]]&, Sort[Last/@FactorInteger[n]], Length[#]>1&]//First], {n, 100}]
|
|
PROG
|
(PARI)
A181819(n) = factorback(apply(e->prime(e), (factor(n)[, 2])));
|
|
CROSSREFS
|
Cf. A000005, A001222, A001597, A005117, A007916, A055932, A056239, A112798, A181819, A182850, A182857, A275870, A296150, A303945, A304464.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|