|
|
A322817
|
|
a(n) = A001222(A065642(n)) - A001222(n), where A065642(n) gives the next larger m that has same prime factors as n (ignoring multiplicity), and A001222 gives the number of prime factors, when counted with multiplicity.
|
|
2
|
|
|
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 2, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 2, 1, 2, 1, 1, 1, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,50
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n = 2 = 2^1, the next larger number with only 2's as its prime factors is 4 = 2^2, thus a(2) = 1.
For n = 12 = 2^2 * 3^1, the next larger number with the same prime factors is 18 = 2^1 * 3^2, with the same value of A001222, thus a(12) = 0.
For n = 40 = 2^3 * 5^1, the next larger number with the same prime factors is 50 = 2^1 * 5^2. While 40 has 3+1 = 4 prime factors in total, 50 has 1+2 = 3, thus a(40) = 3 - 4 = -1.
For n = 50, the next larger number with the same prime factors is 80 = 2^4 * 5^1, thus a(50) = (4+1)-(2+1) = 2.
|
|
PROG
|
(PARI)
A007947(n) = factorback(factorint(n)[, 1]);
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|