A329343 Difference between the indices of the smallest and the largest primorial in the greedy sum of primorials adding to A108951(n).
0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 2, 0, 0, 1, 0, 2, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 2, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 0, 1, 2, 1, 0, 0, 0, 0, 1, 0, 2, 0, 0, 2, 0, 1, 0, 0, 1, 2, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 0, 0, 2
Offset: 1
Keywords
Examples
For n = 18 = 2 * 3^2, A108951(18) = A034386(2) * A034386(3)^2 = 2 * 6^2 = 72 = 30 + 30 + 6 + 6, and as the largest primorial in the sum is 30 = A002110(3), and the least primorial is 6 = A002110(2), we have a(18) = 3-2 = 1.
Links
Programs
-
PARI
A034386(n) = prod(i=1, primepi(n), prime(i)); A108951(n) = { my(f=factor(n)); prod(i=1, #f~, A034386(f[i, 1])^f[i, 2]) }; \\ From A108951 A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); }; A324886(n) = A276086(A108951(n)); A243055(n) = if(1==n,0,my(f = factor(n), lpf = f[1, 1], gpf = f[#f~, 1]); (primepi(gpf)-primepi(lpf))); A329343(n) = A243055(A324886(n));
Comments