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!)
A089578 Decimal expansion of 2^20996011 - 1, the 40th Mersenne prime A000668(40). 4
1, 2, 5, 9, 7, 6, 8, 9, 5, 4, 5, 0, 3, 3, 0, 1, 0, 5, 0, 2, 0, 4, 9, 4, 3, 0, 9, 5, 7, 4, 8, 2, 4, 3, 1, 1, 4, 5, 5, 9, 9, 3, 4, 1, 6, 0, 8, 5, 3, 5, 1, 8, 3, 5, 9, 5, 2, 2, 5, 4, 6, 7, 0, 1, 2, 5, 6, 5, 4, 9, 8, 7, 6, 8, 9, 0, 8, 3, 5, 1, 5, 6, 0, 2, 2, 1, 2, 4, 0, 0, 9, 6, 8, 0, 2, 8, 2, 8, 5, 3, 6, 1, 3, 2, 5 (list; constant; graph; refs; listen; history; text; internal format)
OFFSET
6320430,2
COMMENTS
We can compute the digits of 2^p directly by noting that 2^p = 10^(p*log(2)/log(10)) = 10^(p*log_10(2)). This result is 10^(i+f) where i is the integer part and f the fractional part. Then 10^f will produce a decimal number i.d1d2d3d4... where i is an integer from 1 to 9 (zero cannot occur in i) and d1, d2 ... are the digits in the fractional part where 0 is allowed. So i is the first digit in 2^p, d1 the second, d2 the third etc. The expansion is self evident in the PARI program. This routine allows the direct computation of the digits of any base to a power: k^p = 10^(p*log_10(k)).
The 40th Mersenne prime found by GIMPS / Michael Shafer in 2003 is 1259768954503301...4065762855682047 = 2^20996011 - 1. The second PARI program below computes all digits. - Georg Fischer, Mar 18 2019
LINKS
OEIS Wiki, Mersenne Primes (with a list of similar sequences)
MATHEMATICA
RealDigits[10^N[20996011Log[10, 2] - 6320430, 105]][[1]] (* Georg Fischer, Mar 19 2019 after Jakob Vecht in A117853 *)
PROG
(PARI) \\ digits of the 40th Mersenne prime: 2^20996011 - 1
p = 20996011; digitsm40(n, p) = { default(realprecision, n); p10 = frac(p*log(2)/log(10)); v = 10^p10; for(j=1, n, d=floor(v); v=frac(v)*10; print1(d", ") ) }
digitsm40(105, p)
(PARI) write("a089578.txt", 2^20996011 - 1) \\ Georg Fischer, Mar 18 2019
CROSSREFS
Cf. A000043 (main entry), A000668, A028335 (lengths).
Sequence in context: A018878 A021389 A198429 * A020852 A053477 A104956
KEYWORD
easy,cons,nonn,fini
AUTHOR
Cino Hilliard, Dec 29 2003
EXTENSIONS
Edited by Georg Fischer, Mar 19 2019
STATUS
approved

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 18 11:17 EDT 2024. Contains 371779 sequences. (Running on oeis4.)