cp's OEIS Frontend

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.

A367366 a(n) = smallest k such that the commas sequence (cf. A121805) with initial term k contains n.

This page as a plain text file.
%I A367366 #24 Jan 09 2025 12:30:37
%S A367366 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,
%T A367366 27,28,29,30,31,32,30,21,1,3,37,38,39,40,41,42,43,40,31,20,13,4,49,50,
%U A367366 51,52,53,54,50,41,32,10,14,60,5,62,63,64,65,60,51,42,30,70,2,15,6,74,75
%N A367366 a(n) = smallest k such that the commas sequence (cf. A121805) with initial term k contains n.
%C A367366 Every k >= 1 appears in this sequence exactly A330128(k) times. So there are 2137453 1's, 194697747222394 2's,  2 3's, 209534289952018960 6's, and so on.
%C A367366 a(n) is the most remote ancestor of n in the comma-successor graph.
%H A367366 Michael S. Branicky, <a href="/A367366/b367366.txt">Table of n, a(n) for n = 1..10000</a>
%H A367366 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>, Fibonacci Quarterly 62:3 (2024), 215-232.
%H A367366 Eric Angelini, Michael S. Branicky, Giovanni Resta, N. J. A. Sloane, and David W. Wilson, <a href="/A121805/a121805_1.pdf">The Comma Sequence: A Simple Sequence With Bizarre Properties</a>, Local copy.
%H A367366 N. J. A. Sloane, <a href="https://www.youtube.com/watch?v=_EHAdf6izPI">Eric Angelini's Comma Sequence</a>, Experimental Math Seminar, Rutgers Univ., January 18, 2024, Youtube video; <a href="https://sites.math.rutgers.edu/~zeilberg/expmath/sloane2024.pdf">Slides</a>
%e A367366 All terms n in A121805 have a(n) = 1, all n in A139284 have a(n) = 2, all n in A366492 have a(n) = 4, and so on.
%o A367366 (Python)
%o A367366 def comma_predecessor(n): # A367614(n)
%o A367366     y = int(str(n)[0])
%o A367366     x = (n-y)%10
%o A367366     k = n - y - 10*x
%o A367366     kk = k + 10*x + y-1
%o A367366     return k if k > 0 and int(str(kk)[0]) != y-1 else -1
%o A367366 def a(n):
%o A367366     an = n
%o A367366     while (cp:=comma_predecessor(an)) > 0: an = cp
%o A367366     return an
%o A367366 print([a(n) for n in range(1, 76)]) # _Michael S. Branicky_, Dec 18 2023
%Y A367366 Cf. A121805, A139284, A330128, A366492, A367338, A367341, A367617.
%K A367366 nonn,base
%O A367366 1,2
%A A367366 _N. J. A. Sloane_, Dec 05 2023