A337395 a(n) is the largest exponent k such that the sums, with multiplicity, of the i-th powers of the prime factors of A100118(n) are all prime for i=1 to k.
1, 1, 1, 2, 1, 2, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 9, 1, 1, 4, 1, 1, 1, 1, 3, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1
Offset: 1
Keywords
Examples
a(4) = 2 because (2^1) + (3^1) = 5 and (2^2) + (3^2) = 13. a(6) = 2 because (2^1) + (5^1) = 7 and (2^2) + (5^2) = 29. a(8) = 6 because (2^1) + (2^1) + (3^1) = 7 and (2^2) + (2^2) + (3^2) = 17 and (2^3) + (2^3) + (3^3) = 43 and (2^4) + (2^4) + (3^4) = 113 and (2^5) + (2^5) + (3^5) = 307 and (2^6) + (2^6) + (3^6) = 857.
Programs
-
PARI
a(n) = {my(f=factor(n), x = 1, y = 1); while(y, if(isprime(sum(i=1, #f~, f[i, 1]^x*f[i, 2])), x++, y = 0)); return(x - 1)} for (n = 2, 220, if(a(n) > 0, print1(a(n), ", ")))
Comments