A324200 a(n) = 2^(A000043(n)-1) * ((2^A059305(n)) - 1), where A059305 gives the prime index of the n-th Mersenne prime, while A000043 gives its exponent.
6, 60, 32752, 137438953408
Offset: 1
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.
A000668:=Filtered(List(Filtered([1..600], IsPrime),i->2^i-1),IsPrime); # Muniru A Asiru, Oct 01 2017
A000668 := proc(n) local i; i := 2^(ithprime(n))-1: if (isprime(i)) then return i fi: end: seq(A000668(n), n=1..31); # Jani Melik, Feb 09 2011 # Alternate: seq(numtheory:-mersenne([i]),i=1..26); # Robert Israel, Jul 13 2014
2^Array[MersennePrimeExponent, 18] - 1 (* Jean-François Alcover, Feb 17 2018, Mersenne primes with less than 1000 digits *) 2^MersennePrimeExponent[Range[18]] - 1 (* Eric W. Weisstein, Sep 04 2021 *)
forprime(p=2,1e5,if(ispseudoprime(2^p-1),print1(2^p-1", "))) \\ Charles R Greathouse IV, Jul 15 2011
LL(e) = my(n, h); n = 2^e-1; h = Mod(2, n); for (k=1, e-2, h=2*h*h-1); return(0==h) \\ after Joerg Arndt in A000043 forprime(p=1, , if(LL(p), print1(p, ", "))) \\ Felix Fröhlich, Feb 17 2018
from sympy import isprime, primerange print([2**n-1 for n in primerange(1, 1001) if isprime(2**n-1)]) # Karl V. Keller, Jr., Jul 16 2020
a(4) = 2 because 2^4 - 1 = 15 = 3*5. From _Gus Wiseman_, Jul 04 2019: (Start) The sequence of Mersenne numbers together with their prime indices begins: 1: {} 3: {2} 7: {4} 15: {2,3} 31: {11} 63: {2,2,4} 127: {31} 255: {2,3,7} 511: {4,21} 1023: {2,5,11} 2047: {9,24} 4095: {2,2,3,4,6} 8191: {1028} 16383: {2,14,31} 32767: {4,11,36} 65535: {2,3,7,55} 131071: {12251} 262143: {2,2,2,4,8,21} 524287: {43390} 1048575: {2,3,3,5,11,13} (End)
a[q_] := Module[{x, n}, x=FactorInteger[2^n-1]; n=Length[x]; Sum[Table[x[i][2], {i, n}][j], {j, n}]] a[n_Integer] := PrimeOmega[2^n - 1]; Table[a[n], {n,200}] (* Vladimir Joseph Stephan Orlovsky, Jul 22 2011 *)
a(n)=bigomega(2^n-1) \\ Charles R Greathouse IV, Apr 01 2013
The twelfth prime is 37, with previous prime-power 32, so a(12) = 5.
Table[Prime[n]-NestWhile[#-1&, Prime[n]-1,#>1&&!PrimePowerQ[#]&],{n,100}]
from sympy import prime, factorint def A377289(n): return (p:=prime(n))-next(filter(lambda m:len(factorint(m))<=1, range(p-1,0,-1))) # Chai Wah Wu, Oct 25 2024
a035103 = a023416 . a000040 -- Reinhard Zumkeller, Feb 19 2013
Table[ Count[ IntegerDigits[ Prime[ n ], 2 ], 0 ], {n, 120} ] Table[DigitCount[p,2,0],{p,Prime[Range[120]]}] (* Harvey P. Dale, Mar 03 2023 *)
A035103(n) = #(n=binary(prime(n)))-norml2(n) \\ M. F. Hasler, Nov 21 2009
The twelfth prime is 37, with next prime-power 41, so a(12) = 4.
Table[NestWhile[#+1&,Prime[n]+1,!PrimePowerQ[#]&]-Prime[n],{n,100}]
from itertools import count from sympy import prime, factorint def A377281(n): return -(p:=prime(n))+next(filter(lambda m:len(factorint(m))<=1, count(p+1))) # Chai Wah Wu, Oct 25 2024
The next prime-power after 13 is 16, so a(12) = 3.
Table[NestWhile[#+1&,n+1,!PrimePowerQ[#]&]-n,{n,100}]
from itertools import count from sympy import factorint def A377282(n): return next(filter(lambda m:len(factorint(m))<=1, count(n+1)))-n # Chai Wah Wu, Oct 25 2024
The first four Mersenne numbers 2^2 - 1 = 3, 2^3 - 1 = 7, 2^5 - 1 = 31 and 2^7 - 1 = 127 are prime, so 1, 2, 3, 4 are members. But the fifth Mersenne number 2^11 - 1 = 2047 = 23*89 is composite, so 5 is not a member.
a = {}; Do[If[PrimeQ[2^Prime[n] - 1], AppendTo[a, n]], {n, 1, 100}]; a (* Artur Jasinski *) PrimePi[{(* copy the terms from A000043 *)}] (* Robert G. Wilson v, Jan 20 2014 *) Position[Array[2^Prime[#] - 1 &, 640], ?PrimeQ][[All, 1]] (* _Michael De Vlieger, Jan 31 2018 *) Array[PrimePi@ MersennePrimeExponent@# &, 45] (* Robert G. Wilson v, Feb 12 2018 *)
i=0; for(n=1, 1e3, if(isprime(n), i++; if(ispseudoprime(2^n-1), print1(i, ", ")))) \\ Felix Fröhlich, Aug 12 2014
The binary expansion of 83 is (1,0,1,0,0,1,1), and 83 is the 23rd prime, so a(23) = 4 - 3 = 1.
Table[DigitCount[Prime[n],2,1]-DigitCount[Prime[n],2,0],{n,100}] DigitCount[#,2,1]-DigitCount[#,2,0]&/@Prime[Range[100]] (* Harvey P. Dale, May 09 2025 *)
The rooted tree with Matula-Goebel number 2047 = 2^11 - 1 is (((o)(o))(ooo(o))), which has 6 leaves (o's), so a(11) = 6.
mglv[n_]:=If[n==1,1,Total[Cases[FactorInteger[n],{p_,k_}:>mglv[PrimePi[p]]*k]]]; Table[mglv[2^n-1],{n,30}]
Comments