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

A004426 Arithmetic mean of digits of n (rounded down).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

From Reinhard Zumkeller, May 27 2010: (Start)
A004427(n) <= a(n);
a(A061383(n)) = A004427(A061383(n));
a(A000040(n)) = A074461(n). (End)

Crossrefs

Cf. A175688.

Programs

Formula

a(n) = floor(A007953(n)/A055642(n)). - Reinhard Zumkeller, May 27 2010

A074462 Average digit (rounded up) in the decimal expansion of prime(n).

Original entry on oeis.org

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

Views

Author

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

Keywords

Examples

			The prime numbers begin with 2,3,5,7,11,13,17,19,23,... so the average digits rounded up are 2, 3, 5, 7, (1+1)/2=1, (1+3)/2=2, (1+7)/2=4, (1+9)/2=5, ceiling((2+3)/2)=3, ...
		

Crossrefs

Programs

  • Mathematica
    Table[Ceiling[Mean[IntegerDigits[p]]],{p,Prime[Range[120]]}] (* Harvey P. Dale, Nov 06 2022 *)
  • PARI
    a(n) = my(d=digits(prime(n))); ceil(vecsum(d)/#d); \\ Michel Marcus, Apr 23 2022

Formula

a(n) = ceiling(A007605(n)/A097944(n)). - R. J. Mathar, Sep 23 2008
a(n) = A004427(A000040(n)). - Reinhard Zumkeller, May 27 2010

Extensions

Offset changed to 1, cf. to A073342 added, and extended by R. J. Mathar, Sep 23 2008

A130742 Reciprocal of the base-2 logarithm of the ratio between consecutive primes, rounded down.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 6, 3, 2, 10, 3, 6, 14, 7, 5, 6, 20, 7, 11, 24, 8, 14, 9, 8, 17, 35, 18, 37, 19, 5, 22, 15, 47, 9, 51, 17, 18, 28, 19, 20, 62, 12, 66, 33, 68, 11, 12, 38, 79, 40, 27, 83, 17, 29, 30, 30, 93, 31, 48, 97, 19, 14, 53, 108, 54, 16, 38, 23, 120, 60, 41, 31, 42, 43, 66, 44, 34
Offset: 1

Views

Author

Jack W Grahl, Jul 07 2007

Keywords

Comments

a(n) is the largest power to which the fraction prime(n+1)/prime(n) can be raised without yielding a result which is greater than 2. It has been proved that lim inf of this sequence is (positive) infinity; e.g., the ratio between subsequent primes tends to 1.

Examples

			a(5) = 4 because the sixth prime, 13, divided by the fifth prime, 11, has base-two logarithm 0.241008... and this lies between 1/4 and 1/5.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Floor[1/Log[2, Prime[n + 1]/Prime[n]]]
  • PARI
    a(n) = log(2)\log(prime(n+1) / prime(n)); \\ Michel Marcus, Apr 14 2021

Formula

a(n) = floor(1 / log_2(prime(n+1) / prime(n))).

Extensions

Edited by Jon E. Schoenfield, Apr 13 2021
Showing 1-3 of 3 results.