This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A367618 #17 Feb 07 2024 13:21:43 %S A367618 -1,-1,-1,3,1,1,-1,6,2,9,7,5,12,10,8,15,13,13,11,18,16,14,21,19,17,24, %T A367618 20,27,25,23,30,28,26,33,31,29,36,34,32,39,37,35,42,40,38,45,43,41,48, %U A367618 46,44,51,49,49,47,54,52,50,57,55,53,60,58,56,63,61,59,66,64,62,69,67,65,72,70,68,75,73,71,78,74,81,79,77,84,82 %N A367618 a(n) is the unique k such that n is a comma-child of k in base 3, or -1 if k does not exist. %C A367618 Analogous to A367616, but the calculations are done in base 3. %C A367618 See A367338 for definitions of comma-child. %C A367618 May also be called the "comma-parent" of n since n is the comma-child of a(n). %H A367618 Michael S. Branicky, <a href="/A367618/b367618.txt">Table of n, a(n) for n = 1..10000</a> %H A367618 Eric Angelini, Michael S. Branicky, Giovanni Resta, N. J. A. Sloane, and David W. Wilson, The Comma Sequence: A Simple Sequence With Bizarre Properties, <a href="http://arxiv.org/abs/2401.14346">arXiv:2401.14346</a>, <a href="https://www.youtube.com/watch?v=_EHAdf6izPI">Youtube</a> %F A367618 a(n) = n - y - b*((n-y) mod b) where b is the base and y is the first digit of a(n); it is said to exist if a(n) > 0, else undefined (here, -1). %o A367618 (Python) %o A367618 from functools import cache %o A367618 from sympy.ntheory.factor_ import digits %o A367618 def a(n, base=3): %o A367618 y = digits(n, base)[1] %o A367618 x = (n-y)%base %o A367618 k = n - y - base*x %o A367618 return k if k > 0 else -1 %o A367618 print([a(n) for n in range(1, 88)]) %Y A367618 Cf. A367338, A367355, A367616, A367619. %K A367618 sign,base %O A367618 1,4 %A A367618 _Michael S. Branicky_ and _N. J. A. Sloane_, Dec 20 2023