login
A074463
Average digit (rounded up) in the decimal expansion of a prime number p, where 2^p-1 is a Mersenne prime.
1
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,1
FORMULA
a(n) = A004427(A000043(n)). - Amiram Eldar, Oct 16 2024
EXAMPLE
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, ...
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 *)
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 23 2002
EXTENSIONS
a(43)-a(47) from Ivan Panchenko, Aug 03 2018
a(48) from Amiram Eldar, Oct 16 2024
STATUS
approved