login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A367617 a(n) is the most remote positive ancestor of n in the comma-child graph. 3
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 1, 13, 14, 15, 16, 17, 18, 19, 20, 21, 20, 10, 2, 25, 26, 27, 28, 29, 30, 31, 32, 30, 21, 1, 3, 37, 38, 39, 40, 41, 42, 43, 40, 31, 20, 13, 4, 49, 50, 51, 52, 53, 54, 50, 41, 32, 10, 14, 14, 5, 62, 63, 64, 65, 14, 51, 42, 30, 30, 2, 15, 6, 74, 75 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Like A367366 but allows ancestors that are not comma-predecessors. More specifically, A367366(n) is the most remote positive ancestor of n in the comma-successor graph. See A367338 for definitions.
This sequence first differs from A367366 at n = 60.
LINKS
Eric Angelini, Michael S. Branicky, Giovanni Resta, N. J. A. Sloane, and David W. Wilson, The Comma Sequence: A Simple Sequence With Bizarre Properties, arXiv:2401.14346, Youtube
EXAMPLE
a(60) = a(66) = 14, since 66 is a comma-child of 60, and 60 is a comma-child of 14, and 14 is not the comma-child of any positive number. In other words, A367616(A367616(66)) = A367616(60) = 14, and A367616(14) = -1.
PROG
(Python)
def comma_parent(n): # A367616(n)
y = int(str(n)[0])
x = (n-y)%10
k = n - y - 10*x
return k if k > 0 else -1
def a(n):
an = n
while (cp:=comma_parent(an)) > 0: an = cp
return an
print([a(n) for n in range(1, 76)]) # Michael S. Branicky, Dec 18 2023
CROSSREFS
Sequence in context: A051503 A331375 A179622 * A367366 A285757 A136687
KEYWORD
nonn,base
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 29 10:45 EDT 2024. Contains 373837 sequences. (Running on oeis4.)