login
A367614
a(n) is the unique k such that n is the comma-successor of k, or -1 if k does not exist.
4
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, 30, 21, 12, 3, -1, -1, -1, -1, -1, -1, -1, 40, 31, 22, 13, 4, -1, -1, -1, -1, -1, -1, 50, 41, 32, 23, 14, -1, 5, -1, -1, -1, -1, 60, 51, 42, 33, -1, 24, 15, 6, -1, -1, -1, 70, 61, 52, -1, 43, 34, 25, 16, 7
OFFSET
1,11
COMMENTS
If k exists, it could be called the comma-predecessor of n.
a(n) is the unique k such that A367338(k) = n, or -1.
a(n) = -1 iff n is in A367600.
LINKS
PROG
(Python)
def a(n):
y = int(str(n)[0])
x = (n-y)%10
k = n - y - 10*x
kk = k + 10*x + y-1
return k if k > 0 and int(str(kk)[0]) != y-1 else -1
print([a(n) for n in range(1, 86)]) # Michael S. Branicky, Dec 16 2023
CROSSREFS
KEYWORD
sign,base
AUTHOR
N. J. A. Sloane, Dec 16 2023
STATUS
approved