A239638
Numbers n such that the semiprime 2^n-1 is divisible by 2n+1.
Original entry on oeis.org
11, 23, 83, 131, 3359, 130439, 406583
Offset: 1
n = 11, 2^n -1 = 2047 = 23*89,
n = 23, 8388607 = 47*178481,
n = 131, 2722258935367507707706996859454145691647 = 263*10350794431055162386718619237468234569.
-
Select[Range[4000], PrimeQ[2*# + 1] && PowerMod[2, #, 2*# + 1] == 1 &&
PrimeQ[(2^# - 1)/(2*# + 1)] &] (* Giovanni Resta, Mar 23 2014 *)
-
is(n)=n%6==5 && Mod(2,2*n+1)^n==1 && isprime(2*n+1) && ispseudoprime((2^n-1)/(2*n+1)) \\ Charles R Greathouse IV, Aug 25 2016
-
from sympy import isprime, nextprime
A239638_list, p = [], 5
while p < 10**6:
if (p % 6) == 5:
n = (p-1)//2
if pow(2,n,p) == 1 and isprime((2**n-1)//p):
A239638_list.append(n)
p = nextprime(p) # Chai Wah Wu, Jun 05 2019
A336104
Number of permutations of the prime indices of A000225(n) = 2^n - 1 with at least one non-singleton run.
Original entry on oeis.org
0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 96, 0, 120, 6, 0, 0, 720, 0, 0, 0, 0, 0, 720, 0, 0, 0, 0, 0, 322560, 0, 0, 0, 5040, 0, 4320, 0, 0, 0, 0, 0, 362880, 0, 0
Offset: 1
The a(21) = 6 permutations of {4, 4, 31, 68}:
(4,4,31,68)
(4,4,68,31)
(31,4,4,68)
(31,68,4,4)
(68,4,4,31)
(68,31,4,4)
A335459 is the version for factorial numbers.
A336105 counts all permutations of this multiset.
A336107 is not restricted to predecessors of powers of 2.
A003242 counts anti-run compositions.
A008480 counts permutations of prime indices.
A333489 ranks anti-run compositions.
A335433 lists numbers whose prime indices have an anti-run permutation.
A335448 lists numbers whose prime indices have no anti-run permutation.
A335452 counts anti-run permutations of prime indices.
A335489 counts strict permutations of prime indices.
The numbers 2^n - 1:
A000225,
A001265,
A001348,
A046051,
A046800,
A046801,
A049093,
A325610,
A325611,
A325612,
A325625.
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Table[Length[Select[Permutations[primeMS[2^n-1]],MatchQ[#,{_,x_,x_,_}]&]],{n,30}]
A336105
Number of permutations of the prime indices of 2^n - 1.
Original entry on oeis.org
1, 1, 1, 2, 1, 3, 1, 6, 2, 6, 2, 60, 1, 6, 6, 24, 1, 120, 1, 360, 12, 24, 2, 2520, 6, 6, 6, 720, 6, 2520, 1, 120, 24, 6, 24, 604800, 2, 6, 24, 20160, 2, 10080, 6, 5040, 720, 24, 6, 1814400, 2, 5040, 120, 5040, 6, 15120, 720, 40320, 24, 720, 2
Offset: 1
The a(n) permutations for n = 2, 4, 6, 8, 21:
(2) (2,3) (2,2,4) (2,3,7) (31,4,4,68)
(3,2) (2,4,2) (2,7,3) (31,4,68,4)
(4,2,2) (3,2,7) (31,68,4,4)
(3,7,2) (4,31,4,68)
(7,2,3) (4,31,68,4)
(7,3,2) (4,4,31,68)
(4,4,68,31)
(4,68,31,4)
(4,68,4,31)
(68,31,4,4)
(68,4,31,4)
(68,4,4,31)
A008480 is not restricted to predecessors of powers of 2.
A325617 is the version for factorial numbers.
A335489 counts strict permutations of prime indices.
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Table[Length[Permutations[primeMS[2^n-1]]],{n,30}]
A136034
a(n) = smallest number k such that number of distinct prime factors of 2^k-1 is exactly n.
Original entry on oeis.org
1, 2, 4, 8, 12, 20, 24, 40, 36, 48, 88, 60, 72, 150, 132, 120, 156, 144, 200, 204, 210, 180, 324, 476, 288, 300, 432, 396, 480, 360, 468, 576, 700, 504, 420, 648, 540, 660, 792, 720
Offset: 0
Cf.
A000225,
A003260,
A016047,
A046051,
A046800,
A049479,
A088863,
A136030,
A136031,
A136032,
A136033.
-
With[{pn1=PrimeNu[2^Range[800]-1]},Table[Position[pn1,n,1,1],{n,0,40}]]//Flatten (* Harvey P. Dale, Jan 10 2025 *)
-
a(n) = my(k=1); while (omega(2^k-1) != n, k++); k; \\ Michel Marcus, Jan 09 2023
Comments