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.

A296442 Initial digit of n-th Mersenne number.

Original entry on oeis.org

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

Views

Author

Michel Marcus, Dec 13 2017

Keywords

Examples

			The 4th Mersenne number is 127, so a(4) = 1.
		

Crossrefs

A135613, for Mersenne primes, is a subsequence.

Programs

  • Maple
    initialdig:= n -> floor(n/10^ilog10(n)):
    seq(initialdig(2^ithprime(i)-1),i=1..100); # Robert Israel, Dec 13 2017
  • Mathematica
    Array[First@ IntegerDigits[2^Prime[#] - 1] &, 105] (* Michael De Vlieger, Dec 13 2017 *)
  • PARI
    a(n) = digits(2^prime(n)-1)[1];

Formula

a(n) = A000030(A001348(n)).