The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A367619 a(n) is the most remote positive ancestor of n in the comma-child graph in base 3. 3
1, 2, 3, 3, 1, 1, 7, 1, 2, 2, 7, 1, 1, 2, 1, 1, 1, 1, 7, 1, 1, 2, 1, 7, 1, 7, 1, 1, 1, 1, 1, 1, 7, 7, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 7, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 7, 1, 7, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 7, 1, 7, 1, 1, 1, 1, 1, 1, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Analogous to A367617, but the calculations are done in base 3.
See A367338 for definitions of comma-child.
The sequence consists entirely of terms in {1, 2, 3, 7}. In particular, two terms, a(3) = a(4) = 3; five terms, a(2,9,10,14,22) = 2; and 490 terms are 7, ending with a(2182). All other terms a(k) are 1, since a(2183..2190) = 1 and 1 <= p(n) - n <= b^2 - 1 (= 8 for base b = 3).
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
FORMULA
a(n) is defined as n if A367618(n) = -1, else A367618(A367618(n)).
PROG
(Python)
from functools import cache
from sympy.ntheory.factor_ import digits
def comma_parent(n, base=3): # A367618(n)
y = digits(n, base)[1]
x = (n-y)%base
k = n - y - base*x
return k if k > 0 else -1
@cache
def a(n):
cp = comma_parent(n)
if cp <= 0: return n
return a(cp)
print([a(n) for n in range(1, 88)])
CROSSREFS
Sequence in context: A257451 A209007 A145854 * A097663 A247565 A204259
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 4 22:04 EDT 2024. Contains 373102 sequences. (Running on oeis4.)