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.

A289868 Consider the digit reverse of a number x. Take the sum of these digits and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some iterations reach a sum equal to x.

This page as a plain text file.
%I A289868 #30 Jul 21 2017 08:37:51
%S A289868 0,1,2,3,4,5,6,7,8,9,17,21,25,42,63,84,143,286,2355,5821,6618,11709,
%T A289868 12482,33747,39571,129109,466957,1162248,1565166,1968084,3636638,
%U A289868 3853951,4898376,13443745,13933175,17118698,22421197,24153462,147440984,209989875,245742153
%N A289868 Consider the digit reverse of a number x. Take the sum of these digits and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some iterations reach a sum equal to x.
%C A289868 Numbers of iterations for the listed terms are  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 4, 5, 5, 5, 6, 6, 9, 10, 10, 11, 11, 12, 12, 14, 15, 17, 17, 17, 18, 18, 18, 20, 20, 20, 21, 21, 23, 23, 24.
%C A289868 From _David A. Corneth_, Jul 20 2017: (Start)
%C A289868 If n is in the sequence and its highest digit is m then n * (10\m) is in the sequence for m * (10\m) < 10.
%C A289868 Let T(q, k, n) = b(n) from the following recursion: for 0 <= i <= q-1, b(i) = 1 if i = k, else, b(i) = 0. Then b(n) = Sum(j=1..n, b(n-j)). If some m has q digits d1,..,dk,..,dq with d1 nonzero then after n iterations, we have Sum(j=1..q, T(q, k, n)*d(q-k+1)). This enables an iterative approach to finding solutions with q digits. (End)
%e A289868 Digit reverse of 17 is 71 and 7 + 1 = 8, 1 + 8 = 9, 8 + 9 = 17;
%e A289868 Digit reverse of 286 is 682 and 6 + 8 + 2 = 16, 8 + 2 + 16 = 26, 2 + 16 + 26 = 44, 16 + 26 + 44 = 86, 26 + 44 + 86 = 156, 44 + 86 + 156 = 286.
%p A289868 P:=proc(q) local a,b,k,n; for n from 0 to q do a:=convert(n,base,10); b:=convert(a,`+`); while b<n do for k from 1 to nops(a)-1 do a[k]:=a[k+1]; od; a[nops(a)]:=b;
%p A289868 b:=convert(a,`+`); od; if b=n then print(n); fi; od; end: P(10^9);
%t A289868 Select[Range[10^6], Function[n, Total@ NestWhile[Append[Drop[#, 1], Total@ #] &, Reverse@ IntegerDigits@ n, Total@ # < n &] == n]] (* _Michael De Vlieger_, Jul 20 2017 *)
%o A289868 (PARI) is(n) = {my(d = Vecrev(digits(n))); while(vecsum(d)<n, d = concat(vector(#d-1, i, d[i+1]), [vecsum(d)])); vecsum(d)==n} \\ _David A. Corneth_, Jul 20 2017
%Y A289868 Cf. A000045, A000073, A001590, A004086, A248134, A269309, A269307, A269311.
%K A289868 nonn,base
%O A289868 0,3
%A A289868 _Paolo P. Lava_, Jul 14 2017