A299148 a(n) is the smallest number k such that sigma(k) and sigma(k^n) are both primes.
2, 2, 4, 2, 25, 2, 262144, 4, 4, 64, 734449, 2, 3100870943041, 9066121, 4, 2, 729, 2, 214355670008317962105386619478205641151753401, 5041, 64, 16, 25, 10651330026288961, 16610312161, 2607021481, 38950081, 1817762776525603445521, 5331481, 2, 2160067977820518171249529658520145004718584607049, 21203610154988994565561
Offset: 1
Keywords
Examples
For n = 3; a(3) = 4 because 4 is the smallest number such that sigma(4) = 7 and sigma(4^3) = 127 are both primes.
Links
- Robert Israel, Table of n, a(n) for n = 1..79
Programs
-
Magma
[Min([n: n in[1..10000000] | IsPrime(SumOfDivisors(n)) and IsPrime(SumOfDivisors(n^k))]): k in [2..12]];
-
Maple
f:= proc(n,Nmin,Nmax) local p, e, M, Res; M:= Nmax; Res:= -1; e:= 0; do e:= nextprime(e+1)-1; if 2^e > M then return Res fi; if not isprime(e*n+1) then next fi; p:= floor(Nmin^(1/e)); do p:= nextprime(p); if p^e > M then break fi; if e = 1 and p > 2 then break fi; if isprime((p^(e+1)-1)/(p-1)) and isprime((p^(e*n+1)-1)/(p-1)) then Res:= p^e; M:= p^e; break fi od od; end proc: g:= proc(n) local Nmin,Nmax, v; Nmax:= 1; do Nmin:= Nmax; Nmax:= Nmax*10^3; v:= f(n,Nmin,Nmax); if v > 0 then return v fi; od; end proc: seq(g(n),n=1..50); # Robert Israel, Feb 06 2018
-
Mathematica
Array[Block[{k = 2}, While[! AllTrue[DivisorSigma[1, #] & /@ {k, k^#}, PrimeQ], k++]; k] &, 10] (* Michael De Vlieger, Feb 05 2018 *)
-
PARI
a(n) = {my(k=1); while (!(isprime(sigma(k)) && isprime(sigma(k^n))), k++); k;} \\ Michel Marcus, Feb 05 2018
Formula
a(n) >= A279094(n).
Extensions
a(13) to a(32) from Robert Israel, Feb 06 2018
Comments