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.

A083178 Numbers with a digit sum of n and a maximum product of digits. In case of two identical products choose the largest number.

Original entry on oeis.org

1, 2, 3, 22, 32, 33, 322, 332, 333, 3322, 3332, 3333, 33322, 33332, 33333, 333322, 333332, 333333, 3333322, 3333332, 3333333, 33333322, 33333332, 33333333, 333333322, 333333332, 333333333, 3333333322, 3333333332, 3333333333
Offset: 1

Views

Author

Amarnath Murthy, Apr 26 2003

Keywords

Comments

The corresponding maximum product is A000792(n). - Lekraj Beedassy, Nov 13 2009
Except for the first term, terms in the sequence are exactly those numbers formed by sequence of digits 3 followed by either zero, one or two digits 2. - Chai Wah Wu, Dec 11 2015

Crossrefs

Cf. A000792.

Programs

  • Python
    from _future_ import division
    def A083178(n):
        return 1 if n == 1 else (2*10**((n+2)//3)+(63*(n%3)**2-129*(n%3)-2))//6 # Chai Wah Wu, Dec 11 2015

Formula

Conjecture: a(n) = 10*a(n-3)+a(n-6)-10*a(n-9) for n>10. - Colin Barker, Oct 14 2014
Empirical g.f.: x*(90*x^6+10*x^4+11*x^3+3*x^2+2*x+1) / ((x-1)*(x^2+x+1)*(10*x^3-1)). - Colin Barker, Oct 14 2014
For n > 7, a(n) = 11*a(n-3)-10*a(n-6). For n > 4, a(n-3) + 3*10^(floor((n-1)/3)). For n > 1, (2*10^(floor((n+2)/3))+(63*m^2-129*m-2))/6, where m is the least nonnegative residue of n mod 3. - Chai Wah Wu, Dec 11 2015

Extensions

Corrected and extended by David Wasserman, Oct 25 2004