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.

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.

This page as a plain text file.
%I A061428 #17 Jan 19 2023 01:42:17
%S A061428 4,28,44,82,188,248,284,428,444,482,818,824,842,881,1488,1848,1884,
%T A061428 2288,2448,2484,2828,2844,2882,4188,4248,4284,4428,4444,4482,4818,
%U A061428 4824,4842,4881,8148,8184,8228,8244,8282,8418,8424,8442,8481,8814,8822,8841,12888
%N 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.
%H A061428 Reinhard Zumkeller, <a href="/A061428/b061428.txt">Table of n, a(n) for n = 1..10000</a>
%e A061428 248 is a term as the geometric mean of digits is (2*4*8) = 64 = 4^3.
%o A061428 (Haskell)
%o A061428 a061428 n = a061428_list !! (n-1)
%o A061428 a061428_list = g [1] where
%o A061428    g ds = if product ds == 4 ^ length ds
%o A061428           then foldr (\d v -> 10 * v + d) 0 ds : g (s ds) else g (s ds)
%o A061428    s [] = [1]; s (8:ds) = 1 : s ds; s (d:ds) = 2*d : ds
%o A061428 -- _Reinhard Zumkeller_, Jan 13 2014
%o A061428 (Python)
%o A061428 from math import prod
%o A061428 from sympy.utilities.iterables import multiset_combinations, multiset_permutations
%o A061428 def auptod(maxdigits):
%o A061428   n, digs, alst, powsexps2 = 0, 1, [], [(1, 0), (2, 1), (4, 2), (8, 3)]
%o A061428   for digs in range(1, maxdigits+1):
%o A061428     target, okdigs = 4**digs, set()
%o A061428     mcstr = "".join(str(d)*(digs//max(1, r//2)) for d, r in powsexps2)
%o A061428     for mc in multiset_combinations(mcstr, digs):
%o A061428       if prod(map(int, mc)) == target:
%o A061428         n += 1
%o A061428         okdigs |= set("".join(mp) for mp in multiset_permutations(mc, digs))
%o A061428     alst += sorted(map(int, okdigs))
%o A061428   return alst
%o A061428 print(auptod(4)) # _Michael S. Branicky_, Apr 28 2021
%Y A061428 Cf. A061426, A061427, A061429, A061430.
%Y A061428 Cf. A028846, A069518.
%K A061428 nonn,base,easy
%O A061428 1,1
%A A061428 _Amarnath Murthy_, May 03 2001
%E A061428 More terms from Larry Reeves (larryr(AT)acm.org), May 16 2001