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.

Showing 1-5 of 5 results.

A089578 Decimal expansion of 2^20996011 - 1, the 40th Mersenne prime A000668(40).

Original entry on oeis.org

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
Offset: 6320430

Views

Author

Cino Hilliard, Dec 29 2003

Keywords

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

Crossrefs

Cf. A000043 (main entry), A000668, A028335 (lengths).

Programs

  • Mathematica
    RealDigits[10^N[20996011Log[10, 2] - 6320430, 105]][[1]] (* Georg Fischer, Mar 19 2019 after Jakob Vecht in A117853 *)
  • 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

Extensions

Edited by Georg Fischer, Mar 19 2019

A267875 Decimal expansion of Mersenne prime 2^74207281 - 1.

Original entry on oeis.org

3, 0, 0, 3, 7, 6, 4, 1, 8, 0, 8, 4, 6, 0, 6, 1, 8, 2, 0, 5, 2, 9, 8, 6, 0, 9, 8, 3, 5, 9, 1, 6, 6, 0, 5, 0, 0, 5, 6, 8, 7, 5, 8, 6, 3, 0, 3, 0, 3, 0, 1, 4, 8, 4, 8, 4, 3, 9, 4, 1, 6, 9, 3, 3, 4, 5, 5, 4, 7, 7, 2, 3, 2, 1, 9, 0, 6, 7, 9, 9, 4, 2, 9, 6, 8, 9, 3
Offset: 22338618

Views

Author

Felix Fröhlich, Jan 21 2016

Keywords

Comments

As of January 7, 2016, 2^74207281 - 1 is the largest known prime number and the 49th known Mersenne prime.

Crossrefs

Programs

  • Mathematica
    IntegerDigits[2^74207281 - 1][[;;100]] (* Paolo Xausa, Apr 05 2024 *)
  • PARI
    /* adapted from Hasler's PARI program in A193864 */
    list(Nmax) = {default(realprecision, Nmax+5); digits(10^frac(74207281*log(2)/log(10))\.1^Nmax)}
    list(50) \\ print initial 50 digits
    
  • Python
    from gmpy2 import mpz
    def A267875(n): return int((mpz(2)**74207281-1)//mpz(10)**(44677235-n) % 10) # Chai Wah Wu, Jun 07 2021

A344983 Decimal expansion of Mersenne prime 2^77232917 - 1.

Original entry on oeis.org

4, 6, 7, 3, 3, 3, 1, 8, 3, 3, 5, 9, 2, 3, 1, 0, 9, 9, 9, 8, 8, 3, 3, 5, 5, 8, 5, 5, 6, 1, 1, 1, 5, 5, 2, 1, 2, 5, 1, 3, 2, 1, 1, 0, 2, 8, 1, 7, 7, 1, 4, 4, 9, 5, 7, 9, 8, 5, 8, 2, 3, 3, 8, 5, 9, 3, 5, 6, 7, 9, 2, 3, 4, 8, 0, 5, 2, 1, 1, 7, 7, 2, 0, 7, 4, 8, 4
Offset: 23249425

Views

Author

Felix Fröhlich, Jun 04 2021

Keywords

Comments

This prime has 23249425 decimal digits and was found by Jon Pace with GIMPS on Dec 26 2017.

Examples

			Prime starts with 46733318335923109998833558556...
  and ends in ...14659217371136582730618069762179071
		

Crossrefs

Cf. decimal expansions of Mersenne primes: A169681 (M127), A169685 (M521), A204063 (M607), A248931 (M1279), A248932 (M2203), A248933 (M2281), A248934 (M3217), A248935 (M4253), A248936 (M4423), A275977 (M9689), A275979 (M9941), A275980 (M11213), A275981 (M19937), A275982 (M21701), A275983 (M23209), A275984 (M44497), A089065 (M13466917), A089578 (M20996011), A117853 (M30402457), A193864 (M43112609), A267875 (M74207281), A344984 (M82589933).

Programs

  • Mathematica
    IntegerDigits[2^77232917 - 1][[;;100]] (* Paolo Xausa, Apr 05 2024 *)
  • PARI
    list(Nmax) = {localprec(Nmax+5); digits(10^frac(77232917*log(2)/log(10))\.1^Nmax)}
    list(200) \\ print initial 200 digits
    
  • Python
    f = open("M77232917.txt", "a")
    f.write(str(pow(2, 77232917)-1))
    f.close() # Karl-Heinz Hofmann, Jun 06 2021
    
  • Python
    from gmpy2 import mpz
    def A344983(n): return int((mpz(2)**77232917-1)//mpz(10)**(46498849-n) % 10) # Chai Wah Wu, Jun 07 2021

A344984 Decimal expansion of Mersenne prime 2^82589933 - 1.

Original entry on oeis.org

1, 4, 8, 8, 9, 4, 4, 4, 5, 7, 4, 2, 0, 4, 1, 3, 2, 5, 5, 4, 7, 8, 0, 6, 4, 5, 8, 4, 7, 2, 3, 9, 7, 9, 1, 6, 6, 0, 3, 0, 2, 6, 2, 7, 3, 9, 9, 2, 7, 9, 5, 3, 2, 4, 1, 8, 5, 2, 7, 1, 2, 8, 9, 4, 2, 5, 2, 1, 3, 2, 3, 9, 3, 6, 1, 0, 6, 4, 4, 7, 5, 3, 1, 0, 3, 0, 9
Offset: 24862048

Views

Author

Felix Fröhlich, Jun 04 2021

Keywords

Comments

This prime has 24862048 decimal digits and was found by Patrick Laroche with GIMPS on Dec 07 2018.

Examples

			Prime starts with 14889444574204132554780645847...
  and ends in ...66457823695074037951210325217902591
		

Crossrefs

Cf. decimal expansions of Mersenne primes: A169681 (M127), A169685 (M521), A204063 (M607), A248931 (M1279), A248932 (M2203), A248933 (M2281), A248934 (M3217), A248935 (M4253), A248936 (M4423), A275977 (M9689), A275979 (M9941), A275980 (M11213), A275981 (M19937), A275982 (M21701), A275983 (M23209), A275984 (M44497), A089065 (M13466917), A089578 (M20996011), A117853 (M30402457), A193864 (M43112609), A267875 (M74207281), A344983 (M77232917).

Programs

  • Mathematica
    IntegerDigits[2^82589933 - 1][[;;100]] (* Paolo Xausa, Apr 05 2024 *)
  • PARI
    list(Nmax) = {localprec(Nmax+5); digits(10^frac(82589933*log(2)/log(10))\.1^Nmax)}
    list(200) \\ print initial 200 digits
    
  • Python
    f = open("M82589933.txt", "a")
    f.write(str(pow(2,82589933)-1))
    f.close() # Karl-Heinz Hofmann, Jun 05 2021
    
  • Python
    from gmpy2 import mpz
    def A344984(n): return int((mpz(2)**82589933-1)//mpz(10)**(49724095-n) % 10) # Chai Wah Wu, Jun 07 2021

A214024 Decimal expansion of 4^4^4.

Original entry on oeis.org

1, 3, 4, 0, 7, 8, 0, 7, 9, 2, 9, 9, 4, 2, 5, 9, 7, 0, 9, 9, 5, 7, 4, 0, 2, 4, 9, 9, 8, 2, 0, 5, 8, 4, 6, 1, 2, 7, 4, 7, 9, 3, 6, 5, 8, 2, 0, 5, 9, 2, 3, 9, 3, 3, 7, 7, 7, 2, 3, 5, 6, 1, 4, 4, 3, 7, 2, 1, 7, 6, 4, 0, 3, 0, 0, 7, 3, 5, 4, 6, 9, 7, 6, 8, 0, 1, 8, 7, 4, 2, 9, 8, 1, 6, 6, 9, 0, 3, 4, 2, 7, 6, 9, 0, 0
Offset: 155

Views

Author

Alonso del Arte, Jul 01 2012

Keywords

Comments

The same as 2^512. In this capacity, a floating point approximation is often casually given in computer programming textbooks (like the Hunt & Thomas) as an example where overflow is risked, and that risk is at times overcome, at others incurred.
3^3^3 = 7625597484987 (see A002488) while 5^5^5 is approximately 1.9110125979457752 * 10^2184.

Examples

			4^4^4 = 1.3407807929942597... * 10^154
		

References

  • Andrew Hunt & David Thomas, The Pragmatic Programmer: From Journeyman to Master. New York: Addison-Wesley Longman (2000): 195, the fourth new element added to the object testData in the source code listing.

Crossrefs

Cf. A169685, A117853, A193864, A054382 (number of digits in n^n^n).

Programs

Showing 1-5 of 5 results.