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.

A230288 Sum of two digits touching a comma = difference between the two terms separated by that comma; start with a(0)=0, a(1)=5. If there is a choice, choose the smaller value for a(n).

This page as a plain text file.
%I A230288 #55 Nov 04 2024 01:33:38
%S A230288 0,5,11,13,17,26,35,44,53,62,71,79,97,105,111,113,117,125,131,133,137,
%T A230288 145,151,153,157,165,171,173,177,185,191,193,197,206,214,220,222,226,
%U A230288 234,240,242,246,254,260,262,266,274,280,282,286,294,301
%N A230288 Sum of two digits touching a comma = difference between the two terms separated by that comma; start with a(0)=0, a(1)=5. If there is a choice, choose the smaller value for a(n).
%C A230288 Comment from Jack Brennen: This sequence stops after 123 terms. The 123rd term is 989 which has no possible successor. It looks like many low starting points lead to 989 and halt there. The smallest starting point which goes beyond that seems to be the number 396 (which has no possible predecessor). The sequence beginning with 396 goes on for quite some distance. I traced it up to values in excess of 20 million (over 3 million terms).
%C A230288 Comment from Lars Blomberg: (Start)
%C A230288 1. As for 396, I notice that the first differences of the sequence are: 396,10,10,10,10,10,10,10,10,10,10,11,12,14,8,6,12,14,8,6,12,15, 10,10,10,10,10,10,10,10,11,12,14,8,16,12,14,8,17,14,8,16,12,14, 8,16,13,16,12,14,18,16,12,(6,2,4,8) ... repeated indefinitely, which suggests that the sequence started with 396 is infinite.
%C A230288 2. Numbers with no successors, empirically for number of digits n=2,3,4:
%C A230288 86    986    9986
%C A230288 87    987    9987
%C A230288 88    988    9988
%C A230288 89    989    9989
%C A230288 91    991    9991
%C A230288 92    992    9992
%C A230288 93    993    9993
%C A230288 94    994    9994
%C A230288 It seems that the rule is that numbers of the form 10^n - s, s=14, 13, 12, 11, 9, 8, 7, 6 have no successors. Can this be proved? It suggests that once an iteration has come into the millions, the chance of hitting a no-successor becomes very small. (End)
%C A230288 Comment from Nicolas Graner (Start):
%C A230288 Here is an argument to try to prove that the sequence starting with 396 is infinite.
%C A230288 Starting from 1001 (which is reached from 396), you eventually reach 9995. The next number is 10001, which eventually yields 99995, followed by 100001.
%C A230288 More generally, take 1x001, where x is any sequence of digits. It will reproduce the sequence from 1001 to 1995, up to 1x995. This is followed by 1y001, with y = X+1. This repeats until x becomes all 9's, at which point the first digit will change: 199..995 -> 200..002.
%C A230288 Now we get numbers of the form 2x002, which reproduce the sequence from 2002 to 2994 while x increases, until it reaches all 9's and the first digit becomes 3.
%C A230288 You can repeat this reasoning with each value of the first digit. There are some subtleties because, when the first digit changes, the last one is not always the same. But since the sequence is very "robust" (as evidenced by forking sequences, which reunite pretty quickly), variations in the last digit have no effect beyond a couple of terms.
%C A230288 So starting with 100*001, we are bound to get eventually to 999*995, which is followed with 1000*001 (with one more digit). Which shows that the sequence is almost certainly infinite. (End)
%C A230288 See A230450 for the (probably) infinite sequence starting with 396. See A230452 for the numbers not ending in 989 (as does the present sequence). See A230453 for the number of terms in the comma sum sequence depending on the starting value. - _M. F. Hasler_, Oct 19 2013
%D A230288 Eric Angelini and others, Postings to Sequence Fans Mailing List, Oct 11 2011.
%H A230288 M. F. Hasler, <a href="/A230288/b230288.txt">Table of n, a(n) for n = 0..122</a>
%H A230288 Eric Angelini, <a href="http://www.cetteadressecomportecinquantesignes.com/CommaSum.htm">Comma Sums</a>
%H A230288 Eric Angelini, <a href="/A230288/a230288.txt">Comma Sums</a> [Cached copy, with permission]
%F A230288 a(n+1) - a(n) = lsd(a(n)) + msd(a(n+1)), where
%F A230288 lsd(a) = "a mod 10" is the least significant (leftmost), and msd(a) = floor(a/10^floor(log[10](a))) the most significant (rightmost) digit. - _M. F. Hasler_, Oct 19 2013
%e A230288 Consider the first comma: Its closest digits are 0 and 5. Add 0 to 5: The sum (5) is the difference between 0 and 5.
%e A230288 Consider the second comma: Its closest digits are 5 and 1. Add 5 to 1: The sum (6) is the difference between 5 and 11.
%e A230288 Etc.
%o A230288 (PARI) print_A230288(s=5,nMax=9e9,verbose=1)={print1(s);for(i=1,nMax, for(d=1,18,digits(s+d)[1]+s%10==d&&print1(","s+=d)+next(2));verbose && print("\nSequence stops after the term a("i")="s);return([i,s]))} \\ Starting with 0 yields the 2-term sequence (0,1); start with 5 to get the sequence 0,5,... without the initial zero, _M. F. Hasler_, Oct 19 2013
%o A230288 (PARI) A230288_vec(a=[0,5],nMax=9e9)={ for(i=1,nMax, for(d=1,18, d==a[#a]%10+digits(a[#a]+d)[1] && (a=concat(a,a[#a]+d)) && next(2)); break);a} \\ _M. F. Hasler_, Oct 19 2013
%o A230288 (Python)
%o A230288 from itertools import count, islice
%o A230288 def A230288gen(start=[0, 5]): # generator of terms
%o A230288     yield from start
%o A230288     an = start[-1]
%o A230288     for n in count(len(start)+1):
%o A230288         lsd = an%10; b = an+lsd
%o A230288         an = next((k for k in range(b+1, b+20) if k==b+int(str(k)[0])), 0)
%o A230288         if not an: return
%o A230288         yield an
%o A230288 print(list(islice(A230288gen(), 123))) # _Michael S. Branicky_, Nov 03 2024
%Y A230288 Cf. A230450, A230452, A230453.
%K A230288 nonn,fini,full,base
%O A230288 0,2
%A A230288 _N. J. A. Sloane_, Oct 17 2013
%E A230288 More terms (full sequence) and minor edits from _M. F. Hasler_, Oct 19 2013