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-1 of 1 results.

A074463 Average digit (rounded up) in the decimal expansion of a prime number p, where 2^p-1 is a Mersenne prime.

Original entry on oeis.org

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

Views

Author

Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 23 2002

Keywords

Examples

			Prime numbers for Mersenne: 2, 3, 5, 7, 13, 17, 19, 31, 61, ..., so the averages of digits rounded up are 2, 3, 5, 7, (1+3)/2=2, (1+7)/2=4, (1+9)/2=5, (3+1)/2=2, ceiling((6+1)/2)=4, ...
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{id = IntegerDigits@ n}, Ceiling[Plus @@ id/Length@ id]]; lst = { (* terms from A000043 *) }; f@# & /@ lst (* Robert G. Wilson v, Jun 26 2013 *)
    Ceiling[Mean[IntegerDigits[#]]]&/@MersennePrimeExponent[Range[47]] (* Harvey P. Dale, Feb 01 2023 *)

Formula

a(n) = A004427(A000043(n)). - Amiram Eldar, Oct 16 2024

Extensions

a(43)-a(47) from Ivan Panchenko, Aug 03 2018
a(48) from Amiram Eldar, Oct 16 2024
Showing 1-1 of 1 results.