Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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!)
A133195 Smallest number whose sum of digits is 3n. 1
0, 3, 6, 9, 39, 69, 99, 399, 699, 999, 3999, 6999, 9999, 39999, 69999, 99999, 399999, 699999, 999999, 3999999, 6999999, 9999999, 39999999, 69999999, 99999999, 399999999, 699999999, 999999999, 3999999999, 6999999999, 9999999999, 39999999999, 69999999999 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(n) = 1/3 * A133201(n).
a(n) = a(n-1)+10*a(n-3)-10*a(n-4). G.f.: 3*x*(x^2+x+1) / ((x-1)*(10*x^3-1)). [Colin Barker, Feb 01 2013]
MATHEMATICA
LinearRecurrence[{1, 0, 10, -10}, {0, 3, 6, 9}, 40] (* Harvey P. Dale, Oct 01 2018 *)
PROG
(Python)
def a(n): q, r = divmod(3*n, 9); return int(str(r) + "9"*q)
print([a(n) for n in range(31)]) # Michael S. Branicky, Feb 07 2022
CROSSREFS
Cf. A133201.
Sequence in context: A045638 A305322 A038224 * A196156 A103978 A289064
KEYWORD
nonn,base,easy
AUTHOR
Paul Curtz, Oct 09 2007
STATUS
approved

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 August 27 19:37 EDT 2024. Contains 375471 sequences. (Running on oeis4.)