OFFSET
1,50
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
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
CROSSREFS
KEYWORD
sign
AUTHOR
Antti Karttunen, Dec 27 2018
STATUS
approved