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.

A367356 Length of base-3 Commas sequence when started at n.

This page as a plain text file.
%I A367356 #23 Jan 09 2025 12:32:29
%S A367356 17,5,2,1,16,164,490,163,4,3,489,15,14,2,162,161,13,1472,488,1471,160,
%T A367356 1,159,487,12,486,1470,1469,11,158,157,1468,485,484,156,10,9,483,1467,
%U A367356 1466,8,155,154,1465,482,481,153,7,6,480,1464,1463,5,41,152,40,1462,479,1461,151,4,150,478,39,477,3,1460,2,38,149,37,1459,476,1458,148,1,147,475,36,474,1457,1456,35,146,145,1455,473,472,144,34,33,471,1454,1453,32,143,142,1452,470,469
%N A367356 Length of base-3 Commas sequence when started at n.
%C A367356 a(n) = 1 for n = 4, 22, 76, ... (the numbers 222...2211 in ternary)
%C A367356 We now know that a(n) is finite for all n.
%H A367356 Michael S. Branicky, <a href="/A367356/b367356.txt">Table of n, a(n) for n = 1..10000</a>
%H A367356 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 A367356 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 A367356 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 A367356 For a(1) = 17, see A367355, which has 17 terms.
%o A367356 (Python)
%o A367356 from itertools import islice
%o A367356 from sympy.ntheory.factor_ import digits
%o A367356 def a(n, b=3): # generator of terms
%o A367356     an, y, c = n, 1, 0
%o A367356     while y < b:
%o A367356         an, y, c = an + b*(an%b), 1, c+1
%o A367356         while y < b:
%o A367356             if str(digits(an+y, b)[1]) == str(y):
%o A367356                 an += y
%o A367356                 break
%o A367356             y += 1
%o A367356     return c
%o A367356 print([a(n) for n in range(1, 101)]) # _Michael S. Branicky_, Nov 18 2023
%Y A367356 Cf. A121805, A330128, A367355.
%K A367356 nonn,base
%O A367356 1,1
%A A367356 _N. J. A. Sloane_, Nov 18 2023