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

A004428 Geometric 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, 1, 2, 2, 2, 2, 2, 3, 0, 1, 2, 2, 2, 3, 3, 3, 4, 4, 0, 1, 2, 3, 3, 3, 4, 4, 4, 5, 0, 2, 2, 3, 4, 4, 4, 5, 5, 6, 0, 2, 3, 3, 4, 5, 5, 5, 6, 6, 0, 2, 3, 4, 4, 5, 6, 6, 6, 7, 0, 2, 3, 4, 5, 5, 6, 7, 7, 7, 0, 2, 4, 4, 5, 6, 6, 7, 8, 8, 0, 3, 4, 5, 6, 6, 7, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Keywords

Comments

a(n) = 0 for almost all n (in the sense of asymptotic density). - Charles R Greathouse IV, Jan 30 2023

Crossrefs

Programs

  • Mathematica
    A004428[n_] := Floor[GeometricMean[IntegerDigits[n]]]
  • PARI
    A004428(n)=sqrtn(prod(i=1,#n=digits(n),n[i]),#n)\1 \\ M. F. Hasler, May 10 2015

A257830 The decimal representation of the geometric mean of the digits of n starts with the digits of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 34, 79, 215, 437, 2514, 3833, 32453, 35194, 49672, 5695449, 357129525, 44683966971145538, 383375167535817138, 4377829714163336859592836
Offset: 1

Views

Author

Giovanni Resta, May 10 2015

Keywords

Comments

a(24) > 10^30.

Crossrefs

Programs

  • Mathematica
    pr[n_] := Union@Flatten@ Table[Union[ Times @@@ Flatten[Outer[Power, Subsets[ Range@9, {Length@e}], Permutations[e], 1], 1]], {e, IntegerPartitions@ n}]; sol[nd_] := Block[{p = ppr[nd], L}, L = Table[FromDigits[ RealDigits[x^(1/nd), 10, nd][[1]]], {x, p}]; L[[Select[Range@Length@p, Times @@ IntegerDigits[L[[#]]] == p[[#]] &]]]]; Union@ Flatten@ Array[sol, 17] (* terms with up to 17 digits *)
  • PARI
    is(n)=n==sqrtn(prod(i=1,#n=digits(n),n[i]),#n)\10^(1-#n) \\ M. F. Hasler, May 10 2015

A257295 Arithmetic mean of the digits of n, rounded to the nearest integer.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 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, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 0, 1, 1, 1, 2, 2, 2, 3
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Coincides up to a(99) with the variant A004427 (= arithmetic mean of digits, rounded up). - M. F. Hasler, May 10 2015
0 <= a(n) <= 9. a(10*n + a(n)) = a(n). - Robert Israel, May 11 2015

Crossrefs

Programs

  • Maple
    f:= proc(n) local L;
       L:= convert(n,base,10);
       round(convert(L,`+`)/nops(L))
    end proc:
    map(f, [$0..100]); # Robert Israel, May 11 2015
  • Mathematica
    Round[Mean[IntegerDigits[#]]]&/@Range[0,110]
  • PARI
    A257295(n)=round(sum(i=1, #n=digits(n), n[i])/#n) \\ ...Vecsmall(Str(n))...-48 is a little faster.
    
  • PARI
    a(n)=round(sumdigits(n)/#digits(n)) \\ Charles R Greathouse IV, May 11 2015

Formula

a(n) = round(A007953(n)/A055642(n)).
A004426(n) <= a(n) <= A004427(n).

A257294 The first d decimal digits of the geometric mean of the digits of n, where d is the number of digits of n, without leading zeros.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 10, 14, 17, 20, 22, 24, 26, 28, 30, 0, 14, 20, 24, 28, 31, 34, 37, 40, 42, 0, 17, 24, 30, 34, 38, 42, 45, 48, 51, 0, 20, 28, 34, 40, 44, 48, 52, 56, 60, 0, 22, 31, 38, 44, 50, 54, 59, 63, 67, 0, 24, 34, 42, 48, 54, 60, 64, 69, 73, 0, 26, 37, 45, 52, 59, 64
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Since the geometric mean of the digits of any number is either 0 or between 1 and 9, "the first d digits" is equivalent to the integer part of this value multiplied by 10^(d-1), which leads to the given formula.
Motivated by sequence A257830.

Examples

			For n = 11, a 2-digit number, the geometric mean of the digits is trivially 1, which is 1.000..., and the first two decimal digits are 10, so a(11) = 10. For n=12, geometric mean is sqrt(2) = 1.414..., so a(12) = 14. - _N. J. A. Sloane_, May 11 2015
		

Crossrefs

Programs

  • PARI
    a(n)=sqrtn(prod(i=1, #n=digits(n), n[i]), #n)\10^(1-#n)

Formula

a(n) = floor(A007954(n)^(1/A055642(n))*10^(A055642(n)-1))
Showing 1-4 of 4 results.