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

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.

Original entry on oeis.org

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

Views

Author

Jason Earls, Aug 04 2003; revised Jun 03 2004

Keywords

Comments

Ecker states that every number (larger than 1) eventually reaches 15. "Take any natural number larger than 1 and write down its divisors, including 1 and the number itself. Now take the sum of the digits of these divisors. Iterate until a number repeats. The black-hole number this time is 15." [Ecker]
The only other fixed point of A034690, namely 1, cannot be reached by any other starting value than 1 itself. - M. F. Hasler, Nov 08 2015

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.]

Crossrefs

Cf. A034690, A114527. For records see A095347, A118358.

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.

A094501 Smallest number that requires n iterations of the sum of digits of the divisors (A034690) to reach 15.

Original entry on oeis.org

15, 8, 7, 4, 3, 2, 19, 12, 6, 5, 13, 9, 10, 16, 30, 18, 34, 36, 66, 162, 924, 71820, 127005777360
Offset: 0

Views

Author

Jason Earls, Jun 05 2004

Keywords

Examples

			a(0)=15 trivially because 15 is reached in no steps (number of steps is 0);
a(1)=8 because divisors of 8 are 1,2,4,8 with sum of digits = 15 hence 15 is reached in 1 steps (number of steps is 1);
a(2)=7 because divisors of 7 are 1,7 with sum of digits =8 and we need another one step to reach 15 (number of steps is 2);
a(3)=4 because divisors of 4 are 1,2,4 with sum of digits =7 and we need another two steps to reach 15 (number of steps is 3);
a(20)=924 because starting with 924 we have the trajectory 924, 168, 102, 36, 46, 18, 30, 27, 22, 9, 13, 5, 6, 12, 19, 11, 3, 4, 7, 8, 15 reaching 15 in 20 steps.
a(21)=71820 because starting with 71820 we have the trajectory 71820, 1104, 168, 102, 36, 46, 18, 30, 27, 22, 9, 13, 5, 6, 12, 19, 11, 3, 4, 7, 8, 15 reaching 15 in 21 steps. - _Sean A. Irvine_, Oct 04 2009
		

Crossrefs

See A260060 for another variant.

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a094501 = (+ 2) . fromJust . (`elemIndex` a086793_list)
    -- Reinhard Zumkeller, Nov 08 2015
    
  • Mathematica
    f[n_] := Block[{i = 0}, NestWhile[(i++; Plus @@ Flatten@ IntegerDigits@ Divisors@#) &, n, # != 15 &]; i]; t = Table[0, {100}]; Do[ a = f[n]; If[ t[[a]] < 101 && t[[a]] == 0, t[[a]] = n], {n, 2, 10^8}]; t (* Robert G. Wilson v, May 16 2006 *)
  • PARI
    A094501(n)=for(k=2, 9e9, A086793(k)==n&&return(k)) \\ M. F. Hasler, Nov 08 2015

Extensions

Examples provided by Zak Seidov, May 16 2006
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 10 2007
a(22) found by exhaustive search by Sean A. Irvine, Oct 04 2009
a(22) corrected by Donovan Johnson and Sean A. Irvine

A119396 Numbers n such that A086793(n)=20.

Original entry on oeis.org

924, 1104, 1134, 1540, 1650, 1760, 1820, 1908, 1992, 2016, 2288, 2556, 2632, 2744, 2860, 2940, 2970, 3000, 3192, 3204, 3220, 3248, 3400, 3630, 3738, 3784, 3840, 3852, 3880, 3968, 3990, 4134, 4260, 4410, 4464, 4674, 4736, 4860, 4875, 4930, 4992, 5016
Offset: 1

Views

Author

Zak Seidov, May 17 2006

Keywords

Comments

Some trajectories are: 924,168,102,36,46,18,30,27,22,9,13,5,6,12,19,11,3,4,7,8,15 1104,168,102,... 1540,162,66,36,... 1650,162,66,36,... 2016,297,66,36,... 2940,297,66,36,... 3192,312,102,36,... All trajectories eventually join one of previous trajectories.

Examples

			924 is a term because it reaches 15 in 20 steps with this trajectory 924,168,102,36,46,18,30,27,22,9,13,5,6,12,19,11,3,4,7,8,15.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; local t;
      if kernelopts(level) > 460 then return FAIL fi;
      t:= add(convert(convert(d,base,10),`+`),d=numtheory:-divisors(n));
      1+procname(t)
    end proc:
    f(15):= 0:
    f(1):= FAIL:
    Res:= NULL: count:= 0:
    for n from 1 while count < 100 do
      if f(n) = 20 then
        count:= count+1;
        Res:= Res, n;
       fi
    od:
    Res; # Robert Israel, Apr 03 2018

Extensions

Edited by Robert Israel, Apr 03 2018

A118358 Records in A086793.

Original entry on oeis.org

5, 9, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22
Offset: 1

Views

Author

N. J. A. Sloane, May 15 2006

Keywords

Crossrefs

Cf. A086793. A095347 is where these records happen.

Extensions

a(13) from Donovan Johnson, Dec 23 2010

A260060 Least number such that exactly n iterations of A034690 are required to reach one of the fixed points, 1 or 15.

Original entry on oeis.org

1, 8, 7, 4, 3, 2, 19, 12, 6, 5, 13, 9, 10, 16, 30, 18, 34, 36, 66, 162, 924, 71820
Offset: 0

Views

Author

M. F. Hasler, Nov 08 2015

Keywords

Comments

Apart from the initial term a(1), the same as A094501.

Examples

			The orbits are:
  {1},
  {8, 15},
  {7, 8, 15},
  {4, 7, 8, 15},
  {3, 4, 7, 8, 15},
  {2, 3, 4, 7, 8, 15},
  {19, 11, 3, 4, 7, 8, 15},
  {12, 19, 11, 3, 4, 7, 8, 15},
  {6, 12, 19, 11, 3, 4, 7, 8, 15},
  {5, 6, 12, 19, 11, 3, 4, 7, 8, 15},
  {13, 5, 6, 12, 19, 11, 3, 4, 7, 8, 15},
  {9, 13, 5, 6, 12, 19, 11, 3, 4, 7, 8, 15},
  {10, 9, 13, 5, 6, 12, 19, 11, 3, 4, 7, 8, 15},
  {16, 22, 9, 13, 5, 6, 12, 19, 11, 3, 4, 7, 8, 15},
  {30, 27, 22, 9, 13, 5, 6, 12, 19, 11, 3, 4, 7, 8, 15},
  {18, 30, 27, 22, 9, 13, 5, 6, 12, 19, 11, 3, 4, 7, 8, 15},
  {34, 18, 30, 27, 22, 9, 13, 5, 6, 12, 19, 11, 3, 4, 7, 8, 15},
  {36, 46, 18, 30, 27, 22, 9, 13, 5, 6, 12, 19, 11, 3, 4, 7, 8, 15},
  {66, 36, 46, 18, 30, 27, 22, 9, 13, 5, 6, 12, 19, 11, 3, 4, 7, 8, 15},
  {162, 66, 36, 46, 18, 30, 27, 22, 9, 13, 5, 6, 12, 19, 11, 3, 4, 7, 8, 15},
  {924, 168, 102, 36, 46, 18, 30, 27, 22, 9, 13, 5, 6, 12, 19, 11, 3, 4, 7, 8, 15},
  {71820, 1104, 168, 102, 36, 46, 18, 30, 27, 22, 9, 13, 5, 6, 12, 19, 11, 3, 4, 7, 8, 15}
		

Crossrefs

Programs

  • PARI
    a(n)=for(k=1,9e9, A086793(k)==n&&return(k))

A373094 a(n) is the least number k such that A373092(k) = n.

Original entry on oeis.org

1, 4, 7, 12, 24, 120, 1260, 1829520
Offset: 0

Views

Author

Amiram Eldar, May 23 2024

Keywords

Comments

a(n) is the least number k such that the number of iterations of the map x -> A093653(x) required to reach from k to a fixed point is n.
a(8) > 4*10^10.

Examples

			The iterations for the n = 0..7 are:
  n     a(n)  iterations
  -  -------  --------------------------------------------------
  0        1   1
  1        4   4 -> 3
  2        7   7 -> 4 -> 3
  3       12   12 -> 9 -> 5 ->3
  4       24   24 -> 12 -> 9 -> 5 -> 3
  5      120   120 -> 36 -> 15 -> 9 -> 5 -> 3
  6     1260   1260 -> 120 -> 36 -> 15 -> 9 -> 5 -> 3
  7  1829520   1829520 -> 1260 -> 120 -> 36 -> 15 -> 9 -> 5 -> 3
		

Crossrefs

Cf. A093653, A095347 (decimal analog), A373092.

Programs

  • Mathematica
    d[n_] := d[n] = DivisorSum[n, Plus @@ IntegerDigits[#, 2] &];
    f[n_] := -2 + Length@ FixedPointList[d, n];
    seq[len_] := Module[{s = Table[0, {len}], c = 0, i, n = 1}, While[c < len, i = f[n] + 1; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[7]
  • PARI
    f(n) = {my(c = 0); while(6 % n, n = sumdiv(n, d, hammingweight(d)); c++); c;}
    lista(len) = {my(s = vector(len), c = 0, i, n = 1); while(c < len, i = f(n) + 1; if(i <= len && s[i] == 0, c++; s[i] = n); n++); s;}
Showing 1-6 of 6 results.