cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A299148 a(n) is the smallest number k such that sigma(k) and sigma(k^n) are both primes.

This page as a plain text file.
%I A299148 #27 Mar 02 2025 14:33:50
%S A299148 2,2,4,2,25,2,262144,4,4,64,734449,2,3100870943041,9066121,4,2,729,2,
%T A299148 214355670008317962105386619478205641151753401,5041,64,16,25,
%U A299148 10651330026288961,16610312161,2607021481,38950081,1817762776525603445521,5331481,2,2160067977820518171249529658520145004718584607049,21203610154988994565561
%N A299148 a(n) is the smallest number k such that sigma(k) and sigma(k^n) are both primes.
%C A299148 Sequence b(n) of the smallest numbers m such that sigma(m^k) are all primes for k = 1..n: 2, 2, 4, ... (if fourth term exists, it must be bigger than 10^16).
%C A299148 a(n) is of the form p^e where p, e+1 and e*n+1 are primes. e=1 is possible only in the case p=2. - _Robert Israel_, Feb 06 2018
%H A299148 Robert Israel, <a href="/A299148/b299148.txt">Table of n, a(n) for n = 1..79</a>
%F A299148 a(n) >= A279094(n).
%e A299148 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.
%p A299148 f:= proc(n,Nmin,Nmax) local p, e, M, Res;
%p A299148   M:= Nmax;
%p A299148   Res:= -1;
%p A299148   e:= 0;
%p A299148   do
%p A299148     e:= nextprime(e+1)-1;
%p A299148     if 2^e > M then return Res fi;
%p A299148     if not isprime(e*n+1) then next fi;
%p A299148     p:= floor(Nmin^(1/e));
%p A299148     do
%p A299148       p:= nextprime(p);
%p A299148       if p^e > M then break fi;
%p A299148       if e = 1 and p > 2 then break fi;
%p A299148       if isprime((p^(e+1)-1)/(p-1)) and isprime((p^(e*n+1)-1)/(p-1)) then
%p A299148         Res:= p^e;
%p A299148         M:= p^e;
%p A299148         break
%p A299148       fi
%p A299148     od
%p A299148   od;
%p A299148 end proc:
%p A299148 g:= proc(n) local Nmin,Nmax, v;
%p A299148   Nmax:= 1;
%p A299148   do
%p A299148     Nmin:= Nmax;
%p A299148     Nmax:= Nmax*10^3;
%p A299148     v:= f(n,Nmin,Nmax);
%p A299148     if v > 0 then return v fi;
%p A299148   od;
%p A299148 end proc:
%p A299148 seq(g(n),n=1..50); # _Robert Israel_, Feb 06 2018
%t A299148 Array[Block[{k = 2}, While[! AllTrue[DivisorSigma[1, #] & /@ {k, k^#}, PrimeQ], k++]; k] &, 10] (* _Michael De Vlieger_, Feb 05 2018 *)
%o A299148 (Magma) [Min([n: n in[1..10000000] | IsPrime(SumOfDivisors(n)) and IsPrime(SumOfDivisors(n^k))]): k in [2..12]];
%o A299148 (PARI) a(n) = {my(k=1); while (!(isprime(sigma(k)) && isprime(sigma(k^n))), k++); k;} \\ _Michel Marcus_, Feb 05 2018
%Y A299148 Cf. A000203, A279094.
%K A299148 nonn
%O A299148 1,1
%A A299148 _Jaroslav Krizek_, Feb 03 2018
%E A299148 a(13) to a(32) from _Robert Israel_, Feb 06 2018