OFFSET
1,1
COMMENTS
A comma number n is the concatenation of numbers a,b (no leading zeros allowed) which occurs ("again") in the comma sequence S = S(a,b) defined by S[0]=a, S[1]=b, S[n+1] = S[n] + 10*last_digit(S[n-1]) + first_digit(S[n]), i.e., add to a given term the number formed by the two digits surrounding the preceding comma.
The sequence S is infinite and straightforward to compute, in contrast to the implicitly defined terms of A121805.
The sequence S(a,b) is strictly increasing, unless a=0 (mod 10) and b=0 (which implies n=0 (mod 100)), in which case all following terms are zero.
LINKS
E. Angelini, Comma numbers, SeqFan mailing list, Oct 15 2009
E. Angelini, k-comma numbers, Oct. 2009.
E. Angelini, k-comma numbers [Cached copy, with permission]
EXAMPLE
a(1)=10 is in the sequence, because splitting 10 into (1,0) gives the sequence S(1,0) = 1, 0, 0+10=10, 10+01=11, 11+01=12, 12+11=23,... which contains 10.
a(10)=109 is in the sequence, because splitting 109 into (10,9) gives the sequence S(10,9) = 10, 9, 9+09=18, 18+91=109, 109+81=190,... which contains 109.
108 is not in the sequence since S(10,8) does not contain 108 and it is not allowed to split 108 -> 1,08 -> S(1,08).
PROG
(PARI) {for(n=1, 1e4, /*iscomma(n)=*/for(d=1, #Str(n)-1, my( a=n\10^d, b=n%10^d ); b<10^(d-1) & (d>1 || a%10==0) & next; while(n > b=10*(a%10)+b\10^(#Str(b)-1)+a=b, ); b>n & next; /*return(1)*/ print1(n", "); break))}
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and M. F. Hasler, Oct 28 2009
STATUS
approved