A086793 Number of iterations of the map A034690 (x -> sum of digits of all divisors of x) required to reach one of the fixed points, 15 or 1.
0, 5, 4, 3, 9, 8, 2, 1, 11, 12, 5, 7, 10, 1, 0, 13, 12, 15, 6, 1, 2, 12, 9, 9, 11, 1, 13, 9, 8, 14, 10, 14, 8, 16, 3, 17, 6, 10, 2, 14, 9, 9, 2, 3, 9, 16, 8, 3, 3, 3, 16, 2, 12, 4, 16, 4, 2, 14, 1, 10, 2, 1, 15, 7, 3, 18, 2, 18, 10, 18, 12, 11, 6, 10, 17, 10, 10, 17, 13, 10, 11, 16, 8, 2, 14, 10, 15
Offset: 1
Examples
35 requires 3 iterations to reach 15 because 35 -> 1+5+7+3+5 = 21 -> 1+3+7+2+1 = 14 -> 1+2+7+1+4 = 15.
References
- Michael W. Ecker, Number play, calculators and card tricks ..., pp. 41-51 of The Mathemagician and the Pied Puzzler, Peters, Boston. [Suggested by a problem in this article.]
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 (corrected by _Georg Fischer_, Jan 20 2019)
- Eric Angelini et al., List the dividers, sum the digits, SeqFan list, Nov. 2015 [Broken link]
- Eric Angelini et al., List the dividers [sic], sum the digits, lost messages reconstructed by _N. J. A. Sloane_, Dec 21 2024
- Michael W. Ecker, Divisive Number 15. (Web archive, as of May 2008)
Programs
-
Haskell
a086793 = f 0 where f y x = if x == 15 then y else f (y + 1) (a034690 x) -- Reinhard Zumkeller, May 20 2015
-
Maple
with(numtheory); read transforms; f:=proc(n) local t1,t2,i; t1:=divisors(n); t2:=0; for i from 1 to nops(t1) do t2:=t2+digsum(t1[i]); od: t2; end; g:=proc(n) global f; local t2,i; t2:=n; for i from 1 to 100 do if t2 = 15 then return(i-1); fi; t2:=f(t2); od; end; # N. J. A. Sloane
-
Mathematica
f[n_] := (i++; Plus @@ Flatten@IntegerDigits@Divisors@n); Table[i = 0; NestWhile[f, n, # != 15 &]; i, {n, 2, 87}] (* Robert G. Wilson v, May 16 2006 *)
-
PARI
A086793(n)=n>1&&for(k=0, oo, n==15&&return(k); n=A034690(n)) \\ M. F. Hasler, Nov 08 2015
Extensions
Corrected by N. J. A. Sloane, May 17 2006 (a(15) changed to 0)
Corrected by David Applegate, Jan 23 2007 (reference book title corrected)
Extended to a(1)=0 by M. F. Hasler, Nov 08 2015.
Comments