OFFSET
1,1
COMMENTS
A084904(a(n)) > 0; for all m = a(n) exists at least one k such that (m mod 10^k) > 0 and ((m/10^k) mod (m mod 10^k)) = 0.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
364 is a term, as 36/4=9; 365 is not a term, as 3/65 and 36/5 are not integers.
MATHEMATICA
matchQ@l_:=MatchQ[l, {x__ /; (c = FromDigits@{x})>0, y__ /; (d = FromDigits@{y}) > 0 && Divisible[c, d]}]; Select[Range@2500, matchQ@IntegerDigits@# &] (* Hans Rudolf Widmer, Sep 08 2024 *)
PROG
(Python)
def ok(n):
s = str(n)
pairs = ((int(s[:i]), int(s[i:])) for i in range(1, len(s)))
return any(c%d == 0 for c, d in pairs if d > 0)
print([k for k in range(214) if ok(k)]) # Michael S. Branicky, Nov 21 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Jun 10 2003
STATUS
approved
