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.

A289982 Lesser member p of twin primes in A054723 (Prime exponents of composite Mersenne numbers).

Original entry on oeis.org

41, 71, 101, 137, 149, 179, 191, 197, 227, 239, 269, 281, 311, 347, 419, 431, 461, 569, 599, 617, 641, 659, 809, 821, 827, 857, 881, 1019, 1031, 1049, 1061, 1091, 1151, 1229, 1289, 1301, 1319, 1427, 1451, 1481, 1487, 1607, 1619, 1667, 1697, 1721, 1787, 1871, 1877
Offset: 1

Views

Author

Muniru A Asiru, Jul 17 2017

Keywords

Comments

2^p-1 is composite. p is the lesser of twin primes in A001359 and a prime exponent of a Mersenne number in A054723.

Examples

			p=41 is a member because 41 is a lesser of twin prime and 2^41 - 1 = 13367*164511353 is composite.
Similarly, p=227 is a member because 227 is a lesser of twin prime and 2^227 - 1 is composite.
		

Crossrefs

Subsequence of A054723.

Programs

  • GAP
    P1:=Difference(Filtered([1..100000],IsPrime),[2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701,23209, 44497, 86243]);;
    P2:=List([1..Length(P1)-1],i->[P1[i],P1[i+1]]);;
    P3:=List(Positions(List(P2,i->i[2]-i[1]),2),i->P2[i][1]);
    
  • Mathematica
    Function[s, Flatten@ Map[s[[#, 1]] &, Position[Most@ s, d_ /; Quiet@ Differences@ d == {2}, {1}]]]@ Partition[#, 2, 1] &@ Select[Prime@ Range@ 360, ! PrimeQ[2^# - 1] &] (* Michael De Vlieger, Jul 17 2017 *)
    Select[Partition[Module[{nn=20,mp},mp=MersennePrimeExponent[Range[nn]];Complement[Prime[Range[PrimePi[Last[mp]]]],mp]],2,1],#[[2]]-#[[1]]==2 && AllTrue[#,PrimeQ]&][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 10 2019 *)
  • PARI
    isok(n) = isprime(n) && isprime(n+2) && !isprime(2^n-1) && !isprime(2^(n+2)-1); \\ Michel Marcus, Jul 19 2017