login
Primes p such that 2^p == 2 (mod p*(p+1)).
4

%I #19 Mar 25 2021 16:56:51

%S 5,13,29,37,61,73,157,181,193,277,313,397,421,457,541,613,661,673,733,

%T 757,877,997,1093,1153,1201,1213,1237,1289,1321,1381,1453,1621,1657,

%U 1753,1873,1933,1993,2017,2137,2341,2473,2557,2593,2797,2857,2917,3061

%N Primes p such that 2^p == 2 (mod p*(p+1)).

%C Primes in A216822.

%H V. Raman, <a href="/A217466/b217466.txt">Table of n, a(n) for n = 1..10000</a>

%H Mersenne Forum, <a href="http://mersenneforum.org/showthread.php?t=17198"> Prime Conjecture </a>

%t Select[Prime[Range[500]],PowerMod[2,#,#(#+1)]==2&] (* _Harvey P. Dale_, Mar 25 2019 *)

%o (PARI) for(n=1,10000,if((2^n)%(n*(n+1))==2&&isprime(n),printf(n",")))

%o (Python)

%o from sympy import primerange

%o A217466_list = [p for p in primerange(1,10**6) if pow(2,p,p*(p+1)) == 2] # _Chai Wah Wu_, Mar 25 2021

%Y Cf. A216822.

%K nonn

%O 1,1

%A _V. Raman_, Oct 04 2012