%I #8 Nov 15 2023 08:05:09
%S 191,311,1487,1871,2711,2999,3167,3767,4967,5519,7559,8087,10271,
%T 11351,11831,13679,15647,18311,18911,21647,22271,22367,23687,25799,
%U 26711,27239,27527,27791,29399,29879,31727,31847,33287,34367,35591,38447,38567,40127,40847,42071
%N Lesser of twin primes p such that p and p+2 are both in A115591.
%C Primes p such that p+2 is also a prime and (p-1)/ord(2, p) = (p+1)/ord(2, p+2) = 2, where ord(2,k) is the multiplicative order of 2 modulo k.
%C Equivalently, lesser of twin primes p such that ord(2, p+2) = ord(2, p) + 1,
%C Equal consecutive values in A001917 that correspond to twin primes (p, p+2) are either 1 if p is in A319248, or 2 if p is in this sequence.
%H Amiram Eldar, <a href="/A367318/b367318.txt">Table of n, a(n) for n = 1..10000</a>
%t Select[Prime[Range[2, 4400]], PrimeQ[# + 2] && MultiplicativeOrder[2, # + 2] == MultiplicativeOrder[2, #] + 1 &]
%o (PARI) is(n) = isprime(n) && isprime(n+2) && znorder(Mod(2, n + 2)) == znorder(Mod(2, n)) + 1;
%Y Subsequence of A001359 and A115591.
%Y Cf. A001122, A001917, A002326, A014664, A319248, A333743.
%K nonn
%O 1,1
%A _Amiram Eldar_, Nov 14 2023
|