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).
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
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.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
- Lars Blomberg, Notes (2011) on Problem of the Month (February 2000).
- Erich Friedman, Problem of the Month (February 2000).
- Dana G. Korssjoen, Biyao Li, Stefan Steinerberger, Raghavendra Tripathi, and Ruimin Zhang, Finding structure in sequences of real numbers via graph theory: a problem list, arXiv:2012.04625 [math.CO], 2020.
Crossrefs
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
Comments