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.

A363802 Numbers whose digits can be interposed with one or more of the arithmetic operators +, -, *, /, with no parentheses or concatenation, to yield 10 as the result.

This page as a plain text file.
%I A363802 #47 Sep 02 2023 22:38:17
%S A363802 19,25,28,37,46,52,55,64,73,82,91,109,118,119,125,127,128,133,136,137,
%T A363802 145,146,152,154,155,163,164,172,173,181,182,190,191,208,215,217,218,
%U A363802 219,224,226,229,234,235,242,244,250,251,253,262,271,274,280,281,286,291,298,307
%N A363802 Numbers whose digits can be interposed with one or more of the arithmetic operators +, -, *, /, with no parentheses or concatenation, to yield 10 as the result.
%C A363802 This sequence is a variant of a "game" you can play using the numbers on train carriages (usually 4 digits in Australia's case), ignoring prefixed zeros, preventing re-ordering of the digits and allowing only addition, subtraction, multiplication and division.
%C A363802 No parentheses or concatenation are allowed and expressions follow operator precedence (*/) then (+-), and left to right within the same level of precedence: "2 + 3 * 2 / 6" is 2 + ((3*2)/6) = 2 + 1 = 3.
%C A363802 Infinite since A052224 is a subsequence. - _Michael S. Branicky_, Jun 24 2023
%e A363802 1 + 9 = 2 + 8 = 1 * 9 + 1 = 2 * 9 - 8 = 10 so 19, 28, 191 and 298 are terms.
%e A363802 110 is not a term even though 1 * 10 = 10 since concatenation is disallowed.
%o A363802 (Python)
%o A363802 from itertools import product
%o A363802 from fractions import Fraction
%o A363802 def is_A363802(n):
%o A363802     s = [f"Fraction({d}, 1)" for d in str(n)]
%o A363802     for ops in product("+-*/", repeat=len(s)-1):
%o A363802         try: v = eval("".join(sum(zip(ops, s[1:]), (s[0],))))
%o A363802         except: v = None
%o A363802         if v == 10: return True
%o A363802     return False
%o A363802 # _Evan Gillard_ and _Michael S. Branicky_, Jun 23 2023
%Y A363802 Supersequence of A052224.
%Y A363802 Cf. A342804, A357272.
%K A363802 nonn,base
%O A363802 1,1
%A A363802 _Evan Gillard_, Jun 23 2023