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.

A344375 Numbers n that can be written as the concatenation ab such that n mod (a*b) = a+b.

Original entry on oeis.org

23, 29, 33, 39, 43, 49, 53, 59, 63, 69, 73, 79, 83, 89, 93, 99, 103, 109, 113, 119, 123, 129, 133, 139, 143, 149, 153, 159, 163, 169, 173, 179, 183, 189, 193, 199, 203, 209, 211, 213, 219, 223, 229, 233, 239, 243, 249, 253, 259, 263, 269, 273, 279, 283, 289, 293, 299, 303, 309, 311, 313, 319, 323
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, May 16 2021

Keywords

Comments

Leading zeros are not allowed in b.
Includes all n >= 23 with n == 3 or 9 (mod 10), and all n >= 211 with n == 11 (mod 100).
Are there terms not of these forms?
Includes forms n == 142857 (mod 1000000) for n >= 2142857. - Michael S. Branicky, May 16 2021

Examples

			a(25) = 143 is a term because 143 mod (14*3) = 17 = 14+3.
		

Crossrefs

Cf. A268044.

Programs

  • Maple
    filter:= proc(n) local k,a,b;
      for k from 1 to ilog10(n) do
        a:= n mod 10^k;
        b:= (n-a)/10^k;
        if a < 10^(k-1) then next fi;
        if n mod (a*b) = a+b then return true fi
      od;
      false
    end proc:
    select(filter, [$10..1000]);
  • Python
    def ok(n):
      s = str(n)
      for i in range(1, len(s)):
        if s[i] == '0': continue
        a, b = int(s[:i]), int(s[i:])
        if n%(a*b) == a+b: return True
      return False
    print(list(filter(ok, range(1, 324)))) # Michael S. Branicky, May 16 2021