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.

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).

This page as a plain text file.
%I A053392 #71 Sep 05 2021 02:31:06
%S A053392 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,
%T A053392 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,
%U A053392 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
%N 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).
%C A053392 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
%C A053392 According to the Friedman link, 1496 is the smallest number whose trajectory increases without limit: see A328974
%C A053392 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
%D A053392 Eric Angelini, Posting to Sequence Fans Mailing List, Oct 31 2019.
%H A053392 Reinhard Zumkeller, <a href="/A053392/b053392.txt">Table of n, a(n) for n = 0..10000</a>
%H A053392 Lars Blomberg, <a href="https://erich-friedman.github.io/mathmagic/0200/PDSC.pdf">Notes (2011) on Problem of the Month (February 2000).</a>
%H A053392 Erich Friedman, <a href="https://erich-friedman.github.io/mathmagic/0200.html">Problem of the Month (February 2000).</a>
%H A053392 Dana G. Korssjoen, Biyao Li, Stefan Steinerberger, Raghavendra Tripathi, and Ruimin Zhang, <a href="https://arxiv.org/abs/2012.04625">Finding structure in sequences of real numbers via graph theory: a problem list</a>, arXiv:2012.04625 [math.CO], 2020.
%e A053392 For n=10 we have 10 -> 1+0 = 1, hence a(10)=1;
%e A053392 987 -> 9+8.8+7 -> 17.15 -> 1715, so a(987)=1715.
%p A053392 read("transforms") :
%p A053392 A053392 := proc(n)
%p A053392     if n < 10 then
%p A053392         0;
%p A053392     else
%p A053392         dgs := convert(n,base,10) ;
%p A053392         dgsL := [op(1,dgs)+op(2,dgs)] ;
%p A053392         for i from 3 to nops(dgs) do
%p A053392             dgsL := [op(i,dgs)+op(i-1,dgs),op(dgsL)] ;
%p A053392         end do:
%p A053392         digcatL(dgsL) ;
%p A053392     end if;
%p A053392 end proc: # _R. J. Mathar_, Nov 26 2019
%t A053392 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 *)
%o A053392 (Haskell)
%o A053392 a053392 :: Integer -> Integer
%o A053392 a053392 n = if ys == "" then 0 else read ys where
%o A053392    ys = foldl (++) "" $ map show $ zipWith (+) (tail ds) ds
%o A053392    ds = (map (read . return) . show) n
%o A053392 -- _Reinhard Zumkeller_, Nov 26 2013
%o A053392 (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
%o A053392 (Python)
%o A053392 def A053392(n):
%o A053392     if n < 10: return 0
%o A053392     d = list(map(int, str(n)))
%o A053392     return int("".join(str(d[i] + d[i+1]) for i in range(len(d)-1)))
%o A053392 print([A053392(n) for n in range(120)]) # _Michael S. Branicky_, Sep 04 2021
%Y A053392 Cf. A053393 (periodic points), A060630, A103117, A194429, A328973 (a(n)>n), A328974 (trajectory of 1496), A328975 (numbers that blow up).
%K A053392 nonn,easy,nice,base,look
%O A053392 0,12
%A A053392 _N. J. A. Sloane_, Jan 07 2000