login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A081762 Primes p such that p*(p-2) divides 2^(p-1)-1. 8

%I #29 Sep 11 2023 17:30:13

%S 3,5,17,37,257,457,1297,2557,4357,6481,8009,11953,26321,44101,47521,

%T 47881,49681,57241,65537,74449,84421,97813,141157,157081,165601,

%U 225457,278497,310591,333433,365941,403901,419711,476737,557041,560737,576721,1011961,1033057

%N Primes p such that p*(p-2) divides 2^(p-1)-1.

%C Primes p such that p-2 divides 2^(p-1) - 1. The only member in A006512 is 5. - _Robert Israel_, Dec 03 2014

%C N=647089 is the smallest composite number such that (n-1)^2-1 divides 2^(n-1)-1. - _M. F. Hasler_, Jul 24 2015

%H Robert G. Wilson v, <a href="/A081762/b081762.txt">Table of n, a(n) for n = 1..1076</a> (first 303 terms from Chai Wah Wu)

%p select(p -> isprime(p) and 2 &^ (p-1) - 1 mod (p-2) = 0, [seq(2*i+1,i=1..10^6)]); # _Robert Israel_, Dec 03 2014

%t Select[Prime[Range[2,81000]],PowerMod[2,#-1,#(#-2)]==1&] (* _Harvey P. Dale_, Sep 11 2023 *)

%o (PARI) lista(nn) = {forprime(p = 3, nn, if (! ((2^(p-1)-1) % (p*(p-2))), print1(p, ", "));)} \\ _Michel Marcus_, Dec 02 2013

%o (Python)

%o from sympy import prime

%o from gmpy2 import powmod

%o A081762_list = [p for p in (prime(n) for n in range(2,10**5)) if powmod(2,p-1,p*(p-2)) == 1] # _Chai Wah Wu_, Dec 03 2014

%K easy,nonn

%O 1,1

%A _Benoit Cloitre_, Apr 09 2003

%E More terms from _Michel Marcus_, Dec 02 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)