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.

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

A069512 Geometric mean of digits = 2 and digits are in nondecreasing order.

Original entry on oeis.org

2, 14, 22, 118, 124, 222, 1128, 1144, 1224, 2222, 11148, 11228, 11244, 12224, 22222, 111188, 111248, 111444, 112228, 112244, 122224, 222222, 1111288, 1111448, 1112248, 1112444, 1122228, 1122244, 1222224, 2222222, 11111488, 11112288, 11112448, 11114444
Offset: 1

Views

Author

Amarnath Murthy, Mar 30 2002

Keywords

Comments

No number is obtainable by permuting the digits of other members - only one with ascending order of digits is included. Product of the digits = 2^k where k is the number of digits.

Examples

			1128 is a term but 2118 is not.
		

Crossrefs

Programs

  • Mathematica
    a = {}; b = 2; Do[c = Apply[ Times, IntegerDigits[n]]/b^Floor[ Log[10, n] + 1]; If[c == 1 && Position[a, FromDigits[ Sort[ IntegerDigits[n]]]] == {}, Print[n]; a = Append[a, n]], {n, 1, 10^7}]
  • Python
    from math import prod
    from sympy.utilities.iterables import multiset_combinations
    def aupton(terms):
      n, digits, alst, powsexps2 = 0, 1, [], [(1,0), (2,1), (4,2), (8,3)]
      while n < terms:
        target = 2**digits
        mcstr = "".join(str(d)*(digits//max(1, r)) for d, r in powsexps2)
        for mc in multiset_combinations(mcstr, digits):
          if prod(map(int, mc)) == target:
            n += 1
            alst.append(int("".join(mc)))
            if n == terms: break
        else: digits += 1
      return alst
    print(aupton(34)) # Michael S. Branicky, Feb 14 2021

Extensions

Edited and extended by Robert G. Wilson v, Apr 01 2002
a(31) corrected by and a(33) and beyond from Michael S. Branicky, Feb 14 2021

A069516 Geometric mean of digits = 3 and digits are in nondecreasing order.

Original entry on oeis.org

3, 19, 33, 139, 333, 1199, 1339, 3333, 11399, 13339, 33333, 111999, 113399, 133339, 333333, 1113999, 1133399, 1333339, 3333333, 11119999, 11133999, 11333399, 13333339, 33333333, 111139999, 111333999, 113333399, 133333339, 333333333, 1111199999, 1111339999
Offset: 1

Views

Author

Amarnath Murthy, Mar 30 2002

Keywords

Comments

No number is obtainable by permuting the digits of other members - only one with ascending order of digits is included.

Examples

			1339 belongs to this sequence but 1933 does not.
		

Crossrefs

Programs

  • Mathematica
    a = {}; b = 3; Do[c = Apply[ Times, IntegerDigits[n]]/b^Floor[ Log[10, n] + 1]; If[c == 1 && Position[a, FromDigits[ Sort[ IntegerDigits[n]]]] == {}, Print[n]; a = Append[a, n]], {n, 1, 10^8}]
  • Python
    from math import prod
    from sympy.utilities.iterables import multiset_combinations
    def aupton(terms):
      n, digits, alst, powsexps3 = 0, 1, [], [(1, 0), (3, 1), (9, 2)]
      while n < terms:
        target = 3**digits
        mcstr = "".join(str(d)*(digits//max(1, r)) for d, r in powsexps3)
        for mc in multiset_combinations(mcstr, digits):
          if prod(map(int, mc)) == target:
            n += 1
            alst.append(int("".join(mc)))
            if n == terms: break
        else: digits += 1
      return alst
    print(aupton(31)) # Michael S. Branicky, Apr 28 2021

Extensions

Edited and extended by Robert G. Wilson v, Apr 01 2002
Name edited and a(30) and beyond from Michael S. Branicky, Apr 28 2021
Showing 1-3 of 3 results.