login
Numbers k such that sigma((k-1)/2) + tau((k-1)/2) is prime.
3

%I #21 Dec 06 2022 07:57:12

%S 3,5,17,257,325,1025,65537,82945,202501,250001,2829125,7496645,

%T 10240001,13675205,16000001,27060805,48469445,71402501,133448705,

%U 150062501,156250001,172186885,182250001,343064485,354117125,453519617,467943425,1235663105

%N Numbers k such that sigma((k-1)/2) + tau((k-1)/2) is prime.

%C Numbers k such that A000203((k-1)/2) + A000005((k-1)/2) is a prime q.

%C Corresponding values of primes q are in A055813.

%C Prime terms are in A272061.

%C The first 5 known Fermat primes from A019434 are in this sequence.

%H Amiram Eldar, <a href="/A272060/b272060.txt">Table of n, a(n) for n = 1..5000</a>

%F a(n) = 2*A064205(n) + 1.

%e sigma((17-1)/2) + tau((17-1)/2) = sigma(8) + tau(8) = 15 + 4 = 19; 19 is prime, so 17 is in the sequence.

%t Select[Range[3, 10^7, 2], PrimeQ[DivisorSigma[1, #] + DivisorSigma[0, #]] &[(# - 1)/2] &] (* _Michael De Vlieger_, Apr 20 2016 *)

%o (Magma) [n: n in [3..1000000] | IsPrime(NumberOfDivisors((n-1) div 2) + SumOfDivisors((n-1) div 2)) and (n-1) mod 2 eq 0]

%o (PARI) isok(n) = isprime(sigma((n-1)/2) + numdiv((n-1)/2));

%o lista(nn) = forstep (n=3, nn, 2, if (isok(n), print1(n, ", "))); \\ _Michel Marcus_, Apr 19 2016

%o (PARI) is(n)=my(f=factor(n\2)); n>2 && isprime(sigma(f)+numdiv(f)) && isprime(n) \\ _Charles R Greathouse IV_, Apr 29 2016

%Y Cf. A000005, A000203, A007503, A019434, A055813, A064205, A272061.

%K nonn

%O 1,1

%A _Jaroslav Krizek_, Apr 19 2016