A367356 Length of base-3 Commas sequence when started at n.
17, 5, 2, 1, 16, 164, 490, 163, 4, 3, 489, 15, 14, 2, 162, 161, 13, 1472, 488, 1471, 160, 1, 159, 487, 12, 486, 1470, 1469, 11, 158, 157, 1468, 485, 484, 156, 10, 9, 483, 1467, 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
Offset: 1
Examples
For a(1) = 17, see A367355, which has 17 terms.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
- 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, Fibonacci Quarterly 62:3 (2024), 215-232.
- Eric Angelini, Michael S. Branicky, Giovanni Resta, N. J. A. Sloane, and David W. Wilson, The Comma Sequence: A Simple Sequence With Bizarre Properties, Local copy.
- N. J. A. Sloane, Eric Angelini's Comma Sequence, Experimental Math Seminar, Rutgers Univ., January 18, 2024, Youtube video; Slides
Programs
-
Python
from itertools import islice from sympy.ntheory.factor_ import digits def a(n, b=3): # generator of terms an, y, c = n, 1, 0 while y < b: an, y, c = an + b*(an%b), 1, c+1 while y < b: if str(digits(an+y, b)[1]) == str(y): an += y break y += 1 return c print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Nov 18 2023
Comments