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-1 of 1 results.

A283531 Number of steps to return to n through a chain-addition sequence mod 10 with window of size equal to the number of digits of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 60, 60, 60, 12, 60, 60, 60, 60, 12, 60, 20, 12, 20, 60, 20, 60, 4, 60, 20, 60, 60, 60, 60, 60, 12, 60, 60, 60, 60, 12, 20, 60, 4, 60, 20, 60, 20, 12, 20, 60, 3, 60, 60, 60, 60, 3, 60, 60, 60, 60, 20, 60, 20, 12, 20, 60, 20, 60, 4, 60
Offset: 0

Views

Author

Paolo P. Lava, Mar 10 2017

Keywords

Comments

Alternative definition: number of steps to return to n under a transform where the MSD(n) is deleted and as LSD(n) is concatenated Sd(n) mod 10, where Sd(n) is the sum of the digits of n.
Numbers n that need exactly n steps are 1, 20, 124, 1560.
Number of steps to return to 10^k, with k = 0, 1, 2, ..., are listed in A181190.

Examples

			a(18) = 12 because:
(1 + 8) mod 10 = 9 -> 89;
(8 + 9) mod 10 = 7 -> 97;
(9 + 7) mod 10 = 6 -> 76;
(7 + 6) mod 10 = 3 -> 63;
(6 + 3) mod 10 = 9 -> 39;
(3 + 9) mod 10 = 2 -> 92;
(9 + 2) mod 10 = 1 -> 21;
(2 + 1) mod 10 = 3 -> 13;
(1 + 3) mod 10 = 4 -> 34;
(3 + 4) mod 10 = 7 -> 47;
(4 + 7) mod 10 = 1 -> 71;
(7 + 1) mod 10 = 8 -> 18;
a(68) = 4 because:
(6 + 8) mod 10 = 4 -> 84;
(8 + 4) mod 10 = 2 -> 42;
(4 + 2) mod 10 = 6 -> 26;
(2 + 6) mod 10 = 8 -> 68.
		

Crossrefs

Programs

  • Maple
    S:=proc(w) local x, y, z; x:=w; y:=0; for z from 1 to ilog10(x)+1 do y:=y+(x mod 10); x:=trunc(x/10); od; y mod 10; end: P:=proc(q) local a,k,n; for n from 0 to q do a:=n;
    for k from 1 to q do a:=10*(a mod 10^(ilog10(n)))+S(a); if a=n then print(k);
    break; fi; od; od; end: P(10^5);
Showing 1-1 of 1 results.