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.

A358342 Lesser of twin primes p such that sigma((p-1)/2) + tau((p-1)/2) is a prime.

This page as a plain text file.
%I A358342 #18 Jan 05 2023 18:38:56
%S A358342 3,5,17,65537,1927561217,6015902625062501,12370388895062501,
%T A358342 835920078368222501,6448645485213008897,50973659693056000001,
%U A358342 54332889713542767617,64304984013657011717,112112769248058062501,147337258721536000001
%N A358342 Lesser of twin primes p such that sigma((p-1)/2) + tau((p-1)/2) is a prime.
%C A358342 Lesser of twin primes p such that A000203((p-1)/2) + A000005((p-1)/2) is a prime q.
%C A358342 The first 4 terms are Fermat primes from A019434.
%C A358342 Corresponding values of primes q:  2, 5, 19, 65551, 2248681529, ...
%C A358342 Subsequence of A272060 and A272061.
%C A358342 Lesser of twin primes of the form 2*m+1 with m a term of A064205.
%C A358342 There are no other terms <= 10^14.
%C A358342 All the terms above 3 are in A145824. - _Amiram Eldar_, Jan 05 2023
%e A358342 17 and 19 are twin primes; 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 A358342 Join[{3}, Select[4*Range[25000]^2 + 1, PrimeQ[#] && PrimeQ[# + 2] && PrimeQ[DivisorSigma[1, (# - 1)/2] + DivisorSigma[0, (# - 1)/2]] &]]
%t A358342 (* or *)
%t A358342 A272061 = Cases[Import["https://oeis.org/A272061/b272061.txt", "Table"], {_, _}][[;; , 2]]; Select[A272061, PrimeQ[# + 2] &] (* _Amiram Eldar_, Jan 05 2023 *)
%o A358342 (Magma) [n: n in [3..10^7] | IsPrime(n) and IsPrime(n+2) and IsPrime(&+Divisors((n-1) div 2) + #Divisors((n-1) div 2))]
%o A358342 (PARI) isok(p) = if (isprime(p) && isprime(p+2), my(f=factor((p-1)/2)); isprime(sigma(f)+numdiv(f))); \\ _Michel Marcus_, Nov 23 2022
%Y A358342 Intersection of A001359 and A272061.
%Y A358342 Cf. A000005 (tau), A000203 (sigma), A019434, A064205, A145824, A272060.
%K A358342 nonn,more
%O A358342 1,1
%A A358342 _Jaroslav Krizek_, Nov 10 2022