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-10 of 20 results. Next

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.

A333617 Numbers that are divisible by the sum of the digits of all their divisors (A034690).

Original entry on oeis.org

1, 15, 52, 444, 495, 688, 810, 1782, 1891, 1950, 2028, 2058, 2295, 2970, 3007, 3312, 3510, 4092, 4284, 4681, 4687, 4824, 4992, 5143, 5307, 5356, 5487, 5742, 5775, 5829, 6724, 6750, 6900, 6913, 6972, 7141, 7471, 7560, 7650, 7722, 7783, 7807, 8280, 8325, 8700, 8721
Offset: 1

Views

Author

Amiram Eldar, Mar 29 2020

Keywords

Comments

The corresponding quotients, k/A034690(k), are 1, 1, 2, 6, 5, 8, 6, 9, 61, ...

Examples

			15 is a term since its divisors are {1, 3, 5, 15}, and their sum of sums of digits is 1 + 3 + 5 + (1 + 5) = 15 which is a divisor of 15.
		

Crossrefs

Programs

  • Mathematica
    divDigSum[n_] := DivisorSum[n, Plus @@ IntegerDigits[#] &]; Select[Range[10^4], Divisible[#, divDigSum[#]] &]
  • PARI
    isok(k) = k % sumdiv(k, d, sumdigits(d)) == 0; \\ Michel Marcus, Mar 30 2020
    
  • Python
    from sympy import divisors
    def sd(n): return sum(map(int, str(n)))
    def ok(n): return n%sum(sd(d) for d in divisors(n)) == 0
    def aupto(limit): return [m for m in range(1, limit+1) if ok(m)]
    print(aupto(8721)) # Michael S. Branicky, Jan 15 2021

A095347 n sets a new record for number of iterations of A034690 (sum of digits of the divisors of n) needed to reach 15 (see A086793).

Original entry on oeis.org

2, 5, 9, 10, 16, 18, 34, 36, 66, 162, 924, 71820, 127005777360
Offset: 1

Views

Author

Jason Earls, Jun 03 2004

Keywords

Comments

323203999999676796 takes 22 iterations to reach 15, but it probably is not the next term.
One could prefix a(0)=1 and change the definition to "... reach a fixed point, 1 or 15." - M. F. Hasler, Nov 08 2015

Crossrefs

Programs

Extensions

Offset corrected and a(13) from Donovan Johnson, Oct 28 2010

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

A191000 Greedy inverse of A034690: the smallest number m such that sum of digits of all divisors of m equals n; a(n) = 0 if no such number exists.

Original entry on oeis.org

1, 0, 2, 3, 13, 5, 4, 7, 10, 0, 19, 6, 9, 21, 8, 403, 79, 34, 12, 39, 35, 16, 129, 38, 133, 52, 30, 100, 28, 18, 81, 63, 24, 75, 333, 66, 64, 117, 99, 243, 76, 60, 889, 171, 88, 36, 279, 54, 484, 387, 78, 48, 475, 136, 1209, 208, 132, 729, 112, 258, 225, 84, 90, 399, 1396, 162, 741, 796
Offset: 1

Views

Author

Jaroslav Krizek, Jun 15 2011

Keywords

Examples

			a(5) = 13 because 13 is the smallest number such that sum of digits of all its divisors is equal to 5: 1 + 1 + 3 = 5.
a(2) = a(10) = 0 because there is no number such that sum of digits of all its divisors is equal to 2 or 10.
		

Crossrefs

Cf. A034690.

Programs

  • PARI
    sdd(n) = sumdiv(n, d, sumdigits(d)); \\ A034690
    a(n) = if ((n==2) || (n==10), return (0)); my(k=1); while (sdd(k) != n, k++); k; \\ Michel Marcus, Oct 06 2021

A084049 Numbers k such that k and k+1 have the same sum of digits of divisors; A034690(k) = A034690(k+1).

Original entry on oeis.org

14, 49, 104, 118, 122, 213, 245, 296, 356, 424, 425, 459, 526, 537, 715, 878, 922, 969, 1003, 1065, 1085, 1138, 1202, 1275, 1334, 1335, 1431, 1445, 1581, 1605, 1614, 1625, 1642, 1886, 1941, 2055, 2247, 2264, 2295, 2421, 2566, 2585, 2769, 2870, 2914, 3054
Offset: 1

Views

Author

Jason Earls, Jun 19 2003

Keywords

Programs

A260059 Infinite square array whose n-th row lists the numbers k for which A086793(k)=n, where A086793 = number of iteration of A034690 (sum of digits of divisors) to reach a fixed point, read by antidiagonals.

Original entry on oeis.org

8, 14, 7, 20, 21, 4, 26, 39, 35, 3, 59, 43, 44, 54, 2, 62, 52, 48, 56, 11, 19, 122, 57, 49, 128, 101, 37, 12, 123, 61, 50, 171, 136, 73, 64, 6, 143, 67, 65, 182, 138, 109, 108, 29, 5, 149, 84, 99, 188, 160, 127, 301, 33, 23, 13, 167, 93, 104, 216, 184, 163, 553, 47, 24, 31, 9, 206, 112, 105, 248, 190, 181, 589, 83, 28, 38, 25, 10, 239
Offset: 1

Views

Author

M. F. Hasler, Nov 08 2015

Keywords

Comments

The fixed points of A034690 are 1 and 15, these are the only numbers not appearing in this table. All other positive integers appear exactly once.
Is there a simple explanation why row 7 seems to grow significantly faster than the neighboring rows?
From row 21 on, the terms become very large: cf. A094501 which is the first column with 15 prefixed.

Examples

			The rows read
[ 8, 14,  20,  26,  59,  62, 122, 123, 143, 149, 167, 206, 239, 257, 293, 302,...],
[ 7, 21,  39,  43,  52,  57,  61,  67,  84,  93, 112, 124, 139, 151, 157, 189,...],
[ 4, 35,  44,  48,  49,  50,  65,  99, 104, 105, 116, 121, 125, 132, 140, 141,...],
[ 3, 54,  56, 128, 171, 182, 188, 216, 248, 252, 261, 264, 268, 270, 333, 387,...],
[ 2, 11, 101, 136, 138, 160, 184, 190, 208, 232, 238, 255, 282, 290, 318, 328,...],
[19, 37,  73, 109, 127, 163, 181, 271, 307, 396, 433, 523, 541, 613, 631, ...],
[12, 64, 108, 301, 553, 589, 949,1089,1197,1273,1687,1876,1957,2116, ...],
[ 6, 29,  33,  47,  83, 137, 173, 191, 227, 263, 281, 303, 317, ...],
[ 5, 23,  24,  28,  41,  42,  45,  92, 113, 131, 158, 164, ...],
[13, 31,  38,  60,  69,  74,  76,  77,  80,  86, 88, ...],
[ 9, 25,  72,  81, 117, 126, 156, 172, 258, 300, ...],
[10, 17,  22,  53,  71,  96, 107, 133, 202, ...], etc.
The first column is A094501.
		

Crossrefs

Programs

  • PARI
    (f(k,N=20,a=[],n=0)=while(#aA086793(n++)==k&&a=concat(a,n));a); T=vector(20,n,f(n,21-n)); for(n=1,20,for(k=1,n,print1(T[k][n-k+1]",")))

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))

A084094 Positions of records in A034690.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 16, 18, 24, 36, 48, 72, 96, 108, 144, 168, 216, 252, 288, 336, 396, 432, 504, 576, 672, 720, 756, 792, 1008, 1260, 1344, 1440, 1512, 1584, 1980, 2016, 2376, 2520, 3024, 3168, 3696, 3780, 3960, 4752, 5040, 5544, 7560, 7920, 10080
Offset: 1

Views

Author

Jason Earls, Jun 19 2003

Keywords

A093653 Total number of 1's in binary expansion of all divisors of n.

Original entry on oeis.org

1, 2, 3, 3, 3, 6, 4, 4, 5, 6, 4, 9, 4, 8, 9, 5, 3, 10, 4, 9, 9, 8, 5, 12, 6, 8, 9, 12, 5, 18, 6, 6, 8, 6, 9, 15, 4, 8, 10, 12, 4, 18, 5, 12, 15, 10, 6, 15, 7, 12, 9, 12, 5, 18, 11, 16, 10, 10, 6, 27, 6, 12, 17, 7, 8, 16, 4, 9, 10, 18, 5, 20, 4, 8, 16, 12, 11, 20, 6, 15, 12, 8, 5, 27, 9, 10, 12
Offset: 1

Views

Author

Jason Earls, May 16 2004

Keywords

Examples

			a(8) = 4 because the divisors of 8 are [1, 2, 4, 8] and in binary: 1, 10, 100, 1000, so four 1's.
		

Crossrefs

Cf. A226590 (number of 0's in binary expansion of all divisors of n).
Cf. A182627 (number of digits in binary expansion of all divisors of n).
Cf. A034690 (a decimal equivalent).

Programs

  • Maple
    a:= n-> add(add(i, i=Bits[Split](d)), d=numtheory[divisors](n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, May 17 2022
  • Mathematica
    Table[Plus@@DigitCount[Divisors[n], 2, 1], {n, 75}] (* Alonso del Arte, Sep 01 2013 *)
  • PARI
    A093653(n) = sumdiv(n,d,hammingweight(d)); \\ Antti Karttunen, Dec 14 2017
    
  • PARI
    a(n) = {my(v = valuation(n, 2), n = (n>>v)); sumdiv(n, d, hammingweight(d)) * (v + 1)} \\ David A. Corneth, Feb 15 2023
    
  • Python
    from sympy import divisors
    def a(n): return sum(bin(d).count("1") for d in divisors(n))
    print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Apr 20 2022
    
  • Python
    from sympy import divisors
    def A093653(n): return sum(d.bit_count() for d in divisors(n, generator=True))
    print([A093653(n) for n in range(1, 88)]) # Michael S. Branicky, Feb 15 2023

Formula

a(n) = Sum_{k = 0..n} if(mod(n, k) = 0, A000120(k), 0). - Paul Barry, Jan 14 2005
a(n) = A182627(n) - A226590(n). - Jaroslav Krizek, Sep 01 2013
a(n) = A292257(n) + A000120(n). - Antti Karttunen, Dec 14 2017
From Bernard Schott, May 16 2022: (Start)
If prime p = A000043(n), then a(2^p-1) = a(A000668(n)) = p+1 = A050475(n).
a(2^n) = n+1 (End)
Showing 1-10 of 20 results. Next