A121805 The "comma sequence": the lexicographically earliest sequence of positive numbers with the property that the sequence formed by the pairs of digits adjacent to the commas between the terms is the same as the sequence of successive differences between the terms.
1, 12, 35, 94, 135, 186, 248, 331, 344, 387, 461, 475, 530, 535, 590, 595, 651, 667, 744, 791, 809, 908, 997, 1068, 1149, 1240, 1241, 1252, 1273, 1304, 1345, 1396, 1457, 1528, 1609, 1700, 1701, 1712, 1733, 1764, 1805, 1856, 1917, 1988, 2070
Offset: 1
Examples
Replace each comma in the original sequence by the pair of digits adjacent to the comma; the result is the sequence of first differences between the terms of the sequence: Sequence: 1, 12, 35, 94, 135, 186, 248, 331, 344, 387, 461, 475, ... Differences: 11, 23, 59, 41 , 51 , 62 , 83 , 13 , 43 , 74 , 14 , ... To illustrate the formula in the comment: a(6) = 186 and a(7) = 248 = 186 + 62.
References
- Eric Angelini, "Jeux de suites", in Dossier Pour La Science, pp. 32-35, Volume 59 (Jeux math'), April/June 2008, Paris.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..20000 (terms 1..1001 from Zak Seidov)
- Eric Angelini, The Commas Sequence, Message to Sequence Fans, Sep 06 2016. [Cached copy, with permission]
- 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.
- Lorenzo Angelini, Happy birthday Éric!!, Youtube video.
- Michael S. Branicky, Graph of a(n)/n over entire sequence
- Simon Demers, Table of n, a(n) for n = 1..2137453 (full sequence)
- Robert Dougherty-Bliss, The Comma Sequence is WILD, 2024 video.
- Robert Dougherty-Bliss and Natalya Ter-Saakov, The Comma Sequence is Finite in Other Bases, arXiv:2408.03434 [math.NT], 2024.
- Carlos Rivera, Puzzle 980. The "Commas" sequence, The Prime Puzzles and Problems Connection.
- N. J. A. Sloane, Eric Angelini's Comma Sequence, Experimental Math Seminar, Rutgers Univ., January 18, 2024, Youtube video; Slides
- Index entries for sequences related to Benford's law
Crossrefs
Programs
-
Maple
digits:=n->ListTools:-Reverse(convert(n,base,10)): nextK:=proc(K) local i,L; for i from 0 to 9 do L:=K+digits(K)[ -1]*10+i; if i = digits(L)[1] then return L; fi; od; FAIL; end: A121805:=proc(n) option remember: if n = 1 then return 1; fi; return nextK(A121805(n-1)); end: # W. Edwin Clark
-
Mathematica
a[1] = 1; a[n_] := a[n] = For[x=Mod[a[n-1], 10]; y=0, y <= 9, y++, an = a[n-1] + 10*x + y; If[y == IntegerDigits[an][[1]], Return[an]]]; Array[a, 45] (* Jean-François Alcover, Nov 25 2014 *)
-
PARI
a=1; for(n=1,1000, print1(a", "); a+=a%10*10; for(k=1, 9, digits(a+k)[1]==k&&(a+=k)&&next(2)); error("blocked at a("n")=",a-a%10*10)) \\ M. F. Hasler, Jul 21 2015
-
Python
from itertools import islice def agen(): # generator of terms an, y = 1, 1 while y < 10: yield an an, y = an + 10*(an%10), 1 while y < 10: if str(an+y)[0] == str(y): an += y break y += 1 print(list(islice(agen(), 45))) # Michael S. Branicky, Apr 08 2022
-
R
A121805 <- data.frame(n=seq(from=1,to=2137453),a=integer(2137453)); A121805$a[1]=1; for (i in seq(from=2,to=2137453)){LSD=A121805$a[i-1] %% 10; k = 1; while (k != as.integer(substring(A121805$a[i-1]+LSD*10+k,1,1))){k = k+1; if(k>9) break} A121805$a[i]=A121805$a[i-1]+LSD*10+k} # Simon Demers, Oct 19 2017
Extensions
More terms from Zak Seidov, Dec 11 2006
Edited by N. J. A. Sloane, Sep 17 2023
Changed name from "commas sequence" to "comma sequence". - N. J. A. Sloane, Dec 20 2023
Comments