login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A069512 Geometric mean of digits = 2 and digits are in nondecreasing order. 4

%I #10 Feb 14 2021 19:25:03

%S 2,14,22,118,124,222,1128,1144,1224,2222,11148,11228,11244,12224,

%T 22222,111188,111248,111444,112228,112244,122224,222222,1111288,

%U 1111448,1112248,1112444,1122228,1122244,1222224,2222222,11111488,11112288,11112448,11114444

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

%C 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.

%H Michael S. Branicky, <a href="/A069512/b069512.txt">Table of n, a(n) for n = 1..10000</a>

%e 1128 is a term but 2118 is not.

%t 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}]

%o (Python)

%o from math import prod

%o from sympy.utilities.iterables import multiset_combinations

%o def aupton(terms):

%o n, digits, alst, powsexps2 = 0, 1, [], [(1,0), (2,1), (4,2), (8,3)]

%o while n < terms:

%o target = 2**digits

%o mcstr = "".join(str(d)*(digits//max(1, r)) for d, r in powsexps2)

%o for mc in multiset_combinations(mcstr, digits):

%o if prod(map(int, mc)) == target:

%o n += 1

%o alst.append(int("".join(mc)))

%o if n == terms: break

%o else: digits += 1

%o return alst

%o print(aupton(34)) # _Michael S. Branicky_, Feb 14 2021

%Y Cf. A061426, A069516, A069518.

%K nonn,base

%O 1,1

%A _Amarnath Murthy_, Mar 30 2002

%E Edited and extended by _Robert G. Wilson v_, Apr 01 2002

%E a(31) corrected by and a(33) and beyond from _Michael S. Branicky_, Feb 14 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 4 02:59 EDT 2024. Contains 372225 sequences. (Running on oeis4.)