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.

A100800 Let f(n) = n + sum of the digits of n. If f(n) is multiple of n then a(n)= f(n) else a(n) = f(f(f(n)))... until one gets a multiple of n; a(n) = 0 if no such number exists.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 14, 16, 18, 130, 341, 24, 130, 392, 30, 320, 119, 36, 950, 80, 84, 88, 115, 96, 950, 104, 54, 392, 406, 120, 341, 736, 231, 578, 455, 72, 851, 950, 507, 320, 328, 210, 559, 440, 90, 184, 658, 480, 392, 950, 204, 416, 530, 162, 1430, 2128, 114
Offset: 1

Views

Author

Amarnath Murthy, Dec 17 2004

Keywords

Comments

Conjecture: No term is zero.

Examples

			a(10) = 130, f(10) = 10 + 1 = 11, f(f(10)) = f(11) = 13,... we get the sequence 10,11,13,17,25,32,37,47,58,71,79,95,109,119,130,...
		

Crossrefs

Extensions

Extended by Ray Chandler, Dec 19 2004

A101183 Number of times (>0) function f must be applied in A100800 to arrive at multiple of n, or 0 if multiple of n is never reached.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 14, 32, 3, 12, 36, 3, 31, 10, 2, 71, 8, 8, 8, 11, 8, 67, 8, 3, 35, 35, 10, 31, 53, 22, 45, 38, 4, 59, 70, 44, 27, 27, 19, 44, 36, 5, 14, 47, 42, 33, 66, 16, 33, 42, 11, 105, 151, 5, 92, 69, 7, 7, 48, 6, 23, 20, 22, 7, 62, 22, 145, 7, 7, 20, 7, 58, 7, 184, 44
Offset: 1

Views

Author

Ray Chandler, Dec 19 2004

Keywords

Comments

Conjecture: No term is zero.

Examples

			a(10) = 14 since f has to be applied 14 times to 10 to arrive at 130, a multiple of 10.
		

Crossrefs

Programs

  • Maple
    f:= n -> n + convert(convert(n,base,10),`+`):
    g:= proc(n) local j,t;
      t:= n;
      for j from 1 do
        t:= f(t);
        if t mod n = 0 then return j fi
      od
    end proc:
    map(g, [$1..100]); # Robert Israel, May 14 2019
Showing 1-2 of 2 results.