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.

Showing 1-2 of 2 results.

A053392 a(n) is the concatenation of the sums of every pair of consecutive digits of n (with a(n) = 0 for 0 <= n <= 9).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 210
Offset: 0

Views

Author

N. J. A. Sloane, Jan 07 2000

Keywords

Comments

Let the decimal expansion of n be d_1 d_2 ... d_k; a(n) is formed by concatenating the decimal numbers d_1+d_2, d_2+d_3, ..., d_{k-1}+d_k. - N. J. A. Sloane, Nov 01 2019
According to the Friedman link, 1496 is the smallest number whose trajectory increases without limit: see A328974
The Blomberg link asks whether a number n can have more than 10 predecessors, i.e. values of p such that a(p) = n. The answer is no, because there can be at most one predecessor ending with any given digit d. That can be proved by induction by observing that d and the last digit of n determine the last 1-or-2-digit sum in the concatenation of sums forming n, and hence the penultimate digit of p. That is either incompatible with the known value of n, or it tells us what the last digit of p' is, where p' = p with its last digit removed. We also know that p' is the predecessor of n' = n with its known last digit sum removed, and so we know there is at most one solution for p' by inductive hypothesis, and hence at most one solution for p. - David J. Seal, Nov 06 2019

Examples

			For n=10 we have 10 -> 1+0 = 1, hence a(10)=1;
987 -> 9+8.8+7 -> 17.15 -> 1715, so a(987)=1715.
		

References

  • Eric Angelini, Posting to Sequence Fans Mailing List, Oct 31 2019.

Crossrefs

Cf. A053393 (periodic points), A060630, A103117, A194429, A328973 (a(n)>n), A328974 (trajectory of 1496), A328975 (numbers that blow up).

Programs

  • Haskell
    a053392 :: Integer -> Integer
    a053392 n = if ys == "" then 0 else read ys where
       ys = foldl (++) "" $ map show $ zipWith (+) (tail ds) ds
       ds = (map (read . return) . show) n
    -- Reinhard Zumkeller, Nov 26 2013
    
  • Maple
    read("transforms") :
    A053392 := proc(n)
        if n < 10 then
            0;
        else
            dgs := convert(n,base,10) ;
            dgsL := [op(1,dgs)+op(2,dgs)] ;
            for i from 3 to nops(dgs) do
                dgsL := [op(i,dgs)+op(i-1,dgs),op(dgsL)] ;
            end do:
            digcatL(dgsL) ;
        end if;
    end proc: # R. J. Mathar, Nov 26 2019
  • Mathematica
    a[n_] := Total /@ Transpose[{Most[id = IntegerDigits[n]], Rest[id]}] // IntegerDigits // Flatten // FromDigits; Table[a[n], {n, 0, 119}] (* Jean-François Alcover, Apr 05 2013 *)
  • PARI
    apply( {A053392(n)=if(n>9,n=digits(n);eval(concat(apply(i->Str(n[i-1]+n[i]),[2..#n]))))}, [1..199]) \\ M. F. Hasler, Nov 01 2019
    
  • Python
    def A053392(n):
        if n < 10: return 0
        d = list(map(int, str(n)))
        return int("".join(str(d[i] + d[i+1]) for i in range(len(d)-1)))
    print([A053392(n) for n in range(120)]) # Michael S. Branicky, Sep 04 2021

A328975 Numbers whose trajectory under repeated application of the map in A053392 increases without limit.

Original entry on oeis.org

1496, 1497, 1498, 1499, 1587, 1588, 1589, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1719, 1728, 1729, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1819, 1867, 1868, 1869, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885
Offset: 1

Views

Author

N. J. A. Sloane, Nov 02 2019

Keywords

Comments

Computed by Hans Havermann, Nov 01 2019.
There is a simple technique, due to Hans Havermann, that proves that many terms that in this sequence blow up: find a term in the trajectory that has an internal substring of three 9's. See A328974 for the case 1496.
The same reasoning shows that almost all numbers belong to the sequence.
From Scott R. Shannon, Nov 23 2019: (Start)
Although many of the numbers in this sequence eventually reach a term that contains three 9's, some do not. The first such example is 4949 which leads to 44444 after two steps, and starts a sequence of values that leads back to a much larger all-4's number every nine steps. No 9's appear in any of the intermediate values. Similar series found which lead to limitless loops are values with all 4's with a final 5, or all 3's with a final digit of 1 to 6. Of the first 33909 starting values that increase without limit 209 lead into one of these non-9 loops. (End)
From Scott R. Shannon, Nov 24 2019: (Start)
One can show that strings of repeated digits longer than a certain length will increase without limit by calculating the number of digits when a new value containing only the same digit appears again in the iterative sequence. Below shows the details of this for digits 1 to 9. The number of cycles is the number of iterations of A053392 required before a new value containing only the starting digit is seen. The minimum starting value is the smallest same-digit number such that subsequent iterations will produce another value with only the same digit of equal or longer length. The number of digits in the subsequence reoccurrence shows the number of digits in this value given the starting value has n digits. All sufficiently long single-digit numbers, with digits 1 to 8, increase 8-fold in length, minus a constant, after 9 iterations.
.
digit | # of cycles | min start value | # digits in reoccurrence
1 | 9 | 1111111 | 8*n - 45
2 | 9 | 222222 | 8*n - 38
3 | 3 | 33333 | 2*n - 5
4 | 9 | 44444 | 8*n - 31
5 | 9 | 55555 | 8*n - 33
6 | 3 | 6666 | 2*n - 4
7 | 9 | 77777 | 8*n - 27
8 | 9 | 8888 | 8*n - 28
9 | 2 | 999 | 2*n - 3
(End)

Crossrefs

Showing 1-2 of 2 results.