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

A061428 Geometric mean of the digits = 4. In other words, the product of the digits is = 4^k where k is the number of digits.

Original entry on oeis.org

4, 28, 44, 82, 188, 248, 284, 428, 444, 482, 818, 824, 842, 881, 1488, 1848, 1884, 2288, 2448, 2484, 2828, 2844, 2882, 4188, 4248, 4284, 4428, 4444, 4482, 4818, 4824, 4842, 4881, 8148, 8184, 8228, 8244, 8282, 8418, 8424, 8442, 8481, 8814, 8822, 8841, 12888
Offset: 1

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Examples

			248 is a term as the geometric mean of digits is (2*4*8) = 64 = 4^3.
		

Crossrefs

Programs

  • Haskell
    a061428 n = a061428_list !! (n-1)
    a061428_list = g [1] where
       g ds = if product ds == 4 ^ length ds
              then foldr (\d v -> 10 * v + d) 0 ds : g (s ds) else g (s ds)
       s [] = [1]; s (8:ds) = 1 : s ds; s (d:ds) = 2*d : ds
    -- Reinhard Zumkeller, Jan 13 2014
    
  • Python
    from math import prod
    from sympy.utilities.iterables import multiset_combinations, multiset_permutations
    def auptod(maxdigits):
      n, digs, alst, powsexps2 = 0, 1, [], [(1, 0), (2, 1), (4, 2), (8, 3)]
      for digs in range(1, maxdigits+1):
        target, okdigs = 4**digs, set()
        mcstr = "".join(str(d)*(digs//max(1, r//2)) for d, r in powsexps2)
        for mc in multiset_combinations(mcstr, digs):
          if prod(map(int, mc)) == target:
            n += 1
            okdigs |= set("".join(mp) for mp in multiset_permutations(mc, digs))
        alst += sorted(map(int, okdigs))
      return alst
    print(auptod(4)) # Michael S. Branicky, Apr 28 2021

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 16 2001

A285094 Corresponding values of geometric means of digits of numbers from A061430.

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Apr 14 2017

Keywords

Crossrefs

Cf. A061430 (numbers with integer geometric mean of digits in base 10).
Sequences of numbers n such that a(n) = k for k = 0 - 9: A011540 (k = 0), A002275 (k = 1), A061426 (k = 2), A061427 (k = 3), A061428 (k = 4), A002279 (k = 5), A061429 (k = 6), A002281 (k = 7), A002282 (k = 8), A002283 (k = 9).

Programs

  • Magma
    [0] cat [Floor(&*Intseq(n) ^ (1/#Intseq(n))): n in [1..100000] | IsIntegral(&*Intseq(n) ^ (1/#Intseq(n)))];
Showing 1-2 of 2 results.