OFFSET
1,1
COMMENTS
These concatenations are part of the sequence:
'737' with itself, if it is not a multiple of 7;
'7078' with itself, if it is not a multiple of 3.
LINKS
Carlos Rivera, Puzzle 1212 A381732, The Prime Puzzles and Problems Connection.
EXAMPLE
27 is a term since between 2 and 7 we have 3456 and 3456 / 27 = 128;
1845 is a term since between 1 and 8 we have 234567, between 8 and 4 765 and between 4 and 5 no digit to be added and 234567765 / 1845 = 127137.
PROG
(Python)
def f(n):
s, out = list(map(int, str(n))), 0
for i in range(len(s)-1):
dir = 1 if s[i+1] - s[i] >= 0 else -1
for j in range(s[i]+dir, s[i+1], dir):
out = 10*out + j
return out
def ok(n):
return (v:=f(n)) and v%n == 0
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Mar 06 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Mar 05 2025
EXTENSIONS
a(19)-a(29) from Michael S. Branicky, Mar 07 2025
STATUS
approved
