A252040 Least number k such that the sum of the n-th powers of divisors of k is prime, or 0 if there is no such k.
2, 2, 4, 2, 3418801, 0, 64, 2, 4, 0, 21611482313284249, 0, 38580382095460899155325996786287338133521, 0, 0, 2, 2908327322588596409721563830760333292497745890881, 0, 366742604046618684582110328334808145525757868881, 0, 0, 0, 264638735999480827156185738343112840094453729311824181089
Offset: 1
Keywords
Examples
2 has two divisors, 2 and 1. 2^3 + 1^3 = 9 is not prime. 3 has two divisors, 3 and 1. 3^3 + 1^3 = 28 is not prime. 4 has three divisors, 4, 2, and 1. 4^3 + 2^3 + 1^3 = 73 is prime. So, a(3) = 4.
Links
- Jinyuan Wang, Table of n, a(n) for n = 1..50
Crossrefs
Programs
-
Mathematica
a252040[n_Integer] := If[PrimePowerQ[n] && (p=First@ First@ FactorInteger[n])>2, q=2; While[!PrimeQ[DivisorSigma[n, q^(p-1)]], q=NextPrime[q]]; q^(p-1), 2*Boole[PrimeQ[2^n+1]]]; a252040 /@ Range[10] (* Michael De Vlieger, Dec 13 2014 *) (* modified by Jinyuan Wang, Jan 30 2021 *)
-
PARI
a(n) = if(isprimepower(n, &p) && p>2, my(q=2); while(!ispseudoprime(sigma(q^(p-1), n)), q=nextprime(q+1)); q^(p-1), 2*isprime(2^n+1)); \\ Modified by Jinyuan Wang, Jan 25 2021
Extensions
Name edited by and more terms from Jinyuan Wang, Jan 30 2021
Comments