The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A066409 Least positive integer not representable using exactly n 9's and the operations +-*/(). 0
 1, 2, 1, 4, 13, 22, 33, 103, 195, 381, 934, 1858, 3747, 9166, 31279 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS This sequence allows fractions as intermediate results; else, a(9) would equal 138. - Michael S. Branicky, Feb 08 2023 LINKS Table of n, a(n) for n=1..15. Joe K. Crump, The 9 Nines Index entries for similar sequences EXAMPLE a(4)=4 because 4 cannot be expressed with exactly 4 nines and the operations +-*/(). E.g. 1 = 9/9+9-9, 2 = 9/9+9/9, 3 = (9+9+9)/9, but 4 has no such representation. 138 = (((9 - (9 / ((9 + 9) + 9))) * (9 + 9)) - 9) - 9. 265 = ((((9 - (9 / (9 + 9))) + 9) + 9) * ((9 * 9) + 9)) / 9. PROG (Python) from fractions import Fraction from functools import lru_cache def a(n): @lru_cache() def f(m): if m == 1: return {9} out = set() for j in range(1, m//2+1): for x in f(j): for y in f(m-j): out.update([x + y, x - y, y - x, x * y]) if y: out.add(Fraction(x, y)) if x: out.add(Fraction(y, x)) return out k, s = 1, f(n) while k in s: k += 1 return k print([a(n) for n in range(1, 10)]) # Michael S. Branicky, Feb 08 2023 CROSSREFS Sequence in context: A225117 A088624 A309878 * A006173 A102055 A232376 Adjacent sequences: A066406 A066407 A066408 * A066410 A066411 A066412 KEYWORD more,nonn AUTHOR Joe K. Crump (joecr(AT)carolina.rr.com), Dec 24 2001 EXTENSIONS Corrected by Leonhard Vogt (leonhard.vogt(AT)gmx.ch), Jan 09 2006 a(11)-a(13) from Michael S. Branicky, Feb 08 2023 a(14)-a(15) from Michael S. Branicky, Aug 03 2023 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.

Last modified May 18 23:43 EDT 2024. Contains 372666 sequences. (Running on oeis4.)