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.

A269307 Consider the sum of the divisors of a number x>1. Take the sum of its digits. Repeat the process deleting the first addendum and adding the previous sum. The sequence lists the numbers that after some iterations reach x.

Original entry on oeis.org

17, 28, 31, 44, 51, 132, 133, 198, 208, 2528, 9241, 13570, 16577, 177568, 228742, 780889, 878078, 1854920, 2775787, 3663541, 8204010, 66326143, 73734437, 164211532, 670396359, 803230921, 832581731, 1036125551, 1572413223
Offset: 1

Views

Author

Paolo P. Lava, Feb 24 2016

Keywords

Comments

44 works in both directions: sigma(n) -> n and n -> sigma(n). See A269308.

Examples

			Sigma(17) = 18 :   1 + 8 = 9;  8 + 9 = 17.
Sigma(133) = 160 :  1 + 6 + 0 = 7;  6 + 0 + 7 = 13;  0 + 7 + 13 = 20; 7 + 13 + 20 = 40;  13 + 20 + 40 = 73;  20 + 40 + 73 = 133.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,k,n,t,v; v:=array(1..h);
    for n from 2 to q do a:=sigma(n); b:=ilog10(a)+1; if b>1 then
    for k from 1 to b do v[b-k+1]:=(a mod 10); a:=trunc(a/10); od; t:=b+1; v[t]:=add(v[k], k=1..b);
    while v[t]
    				
  • Mathematica
    Select[Range[2,10^5], (t = #; d = IntegerDigits[DivisorSigma[1, #]]; While[Total[d] < t, d = Join[Rest[d], {Total[d]}]]; Total[d] == t) &] (* Robert Price, May 21 2019 *)

Extensions

a(20)-a(29) from Lars Blomberg, Jan 18 2018

A269312 Consider a number x. Take the sum of its digits. Repeat the process deleting the first addendum and adding the previous sum. The sequence lists the numbers that after some iterations reach the arithmetic derivative of x.

Original entry on oeis.org

14, 51, 145, 285, 629, 708, 807, 1318, 2362, 2548, 2869, 3789, 4087, 4811, 6031, 6355, 10201, 15563, 17143, 17287, 17561, 19883, 20567, 21731, 22429, 23461, 26269, 27301, 30967, 33389, 69529, 73211, 85927, 86087, 90133, 96781, 110159, 116011, 159767, 161701, 162055, 190079
Offset: 1

Views

Author

Paolo P. Lava, Feb 24 2016

Keywords

Examples

			14’ = 9 : 1 + 4 = 5; 4 + 5 = 9.
51’ = 20 : 5 + 1 = 6; 1 + 6 = 7; 6 + 7  = 13; 7 + 13 = 20.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,c,k,n,p,t,v; v:=array(1..h);
    for n from 1 to q do a:=n; b:=ilog10(a)+1; if b>1 then
    for k from 1 to b do v[b-k+1]:=(a mod 10); a:=trunc(a/10); od; t:=b+1; v[t]:=add(v[k], k=1..b);c:=n*add(op(2,p)/op(1,p),p=ifactors(n)[2]);
    while v[t]
    				
  • Mathematica
    dn[n_] := If[Abs@n < 2, 0, n Total[#2/#1 & @@@ FactorInteger[Abs@n]]]; (* after Michael Somos,Apr 12 2011 *)
    Select[Range[10^5], # >= 10 && (s = dn[#]; d = IntegerDigits[#]; While[Total[d] < s, d = Join[Rest[d], {Total[d]}]]; Total[d] == s) &] (* Robert Price, May 22 2019 *)

A269310 Consider a number x > 1. Take the sum of its digits. Repeat the process deleting the first addendum and adding the previous sum. The sequence lists the numbers that after some iterations reach the Euler totient function of x.

Original entry on oeis.org

22, 44, 55, 88, 98, 136, 162, 166, 241, 462, 1020, 2040, 2416, 2899, 3060, 4080, 5110, 7942, 10738, 10996, 15006, 24822, 57040, 67054, 70625, 75588, 96888, 261524, 301834, 507471, 735840, 816584, 2893877, 6081064, 8155616, 16513570, 18772258, 40833543
Offset: 1

Views

Author

Paolo P. Lava, Feb 24 2016

Keywords

Examples

			phi(22) = 10: 2 + 2 = 4; 2 + 4 = 6; 4 + 6 = 10.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,k,n,t,v; v:=array(1..h);
    for n from 2 to q do a:=n; b:=ilog10(a)+1; if b>1 then
    for k from 1 to b do v[b-k+1]:=(a mod 10); a:=trunc(a/10); od; t:=b+1; v[t]:=add(v[k], k=1..b);
    while v[t]
    				
  • Mathematica
    Select[Range[2,10^5], (t = EulerPhi[#]; d = IntegerDigits[#]; While[Total[d] < t, d = Join[Rest[d], {Total[d]}]]; Total[d] == t) &] (* Robert Price, May 17 2019 *)

Extensions

a(38) from Lars Blomberg, Jan 18 2018

A269311 Consider the arithmetic derivative of a number x. Take the sum of its digits. Repeat the process deleting the first addendum and adding the previous sum. The sequence lists the numbers that after some iterations reach x.

Original entry on oeis.org

8, 18, 21, 160, 1590, 2420, 18620, 69229, 83790, 279964, 494520, 598810, 676450, 1183147, 4233720, 5600348, 14217074, 20025836, 64278677, 425208387, 604048830, 750851470, 1981942354
Offset: 1

Views

Author

Paolo P. Lava, Feb 24 2016

Keywords

Examples

			8’ = 12 : 1 + 2 = 3; 2 + 3 = 5; 3 + 5 = 8.
18’ = 21 : 2 + 1 = 3; 1 + 3 = 4; 3 + 4 = 7; 4 + 7 = 11; 7 + 11 = 18.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,k,p,t,v; global n; v:=array(1..h);
    for n from 1 to q do a:=n*add(op(2,p)/op(1,p),p=ifactors(n)[2]); b:=ilog10(a)+1; if b>1 then
    for k from 1 to b do v[b-k+1]:=(a mod 10); a:=trunc(a/10); od; t:=b+1; v[t]:=add(v[k], k=1..b);
    while v[t]
    				
  • Mathematica
    dn[n_] := If[Abs@n < 2, 0, n Total[#2/#1 & @@@ FactorInteger[Abs@n]]]; (* from Michael Somos, Apr 12 2011 *)
    Select[Range[10^5], dn[#] >= 10 && (d = IntegerDigits[dn[#]]; While[Total[d] < #, d = Join[Rest[d], {Total[d]}]]; Total[d] == #) &] (* Robert Price, May 22 2019 *)

Extensions

a(19)-a(23) from Lars Blomberg, Jan 18 2018

A269308 Consider a number x. Take the sum of its digits. Repeat the process deleting the first addendum and adding the previous sum. The sequence lists the numbers that after some iterations reach the sum of the divisors of x.

Original entry on oeis.org

20, 25, 43, 44, 49, 59, 122, 206, 2485, 11899, 17608, 24141, 56207, 195236, 2424613, 2842925, 6241233, 59087970, 111205290, 124735931, 224269761, 1086241193
Offset: 1

Views

Author

Paolo P. Lava, Feb 24 2016

Keywords

Comments

44 works in both directions: n -> sigma(n) and sigma(n) -> n. See A269307.

Examples

			sigma(20) = 42 :  2 + 0 = 2; 0 + 2 = 2; 2 + 2 = 4; 2 + 4 = 6; 4 + 6 = 10; 6 + 10 = 16; 10 + 16 = 26; 16 +26 = 42.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,k,n,t,v; v:=array(1..h);
    for n from 2 to q do a:=n; b:=ilog10(a)+1; if b>1 then
    for k from 1 to b do v[b-k+1]:=(a mod 10); a:=trunc(a/10); od; t:=b+1; v[t]:=add(v[k], k=1..b);
    while v[t]
    				
  • Mathematica
    Select[Range[10,10^5], (s = DivisorSigma[1, #]; d = IntegerDigits[#]; While[Total[d] < s, d = Join[Rest[d], {Total[d]}]]; Total[d] == s) &] (* Robert Price, May 21 2019 *)

Extensions

a(16)-a(22) from Lars Blomberg, Jan 18 2018

A289868 Consider the digit reverse of a number x. Take the sum of these digits and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some iterations reach a sum equal to x.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 21, 25, 42, 63, 84, 143, 286, 2355, 5821, 6618, 11709, 12482, 33747, 39571, 129109, 466957, 1162248, 1565166, 1968084, 3636638, 3853951, 4898376, 13443745, 13933175, 17118698, 22421197, 24153462, 147440984, 209989875, 245742153
Offset: 0

Views

Author

Paolo P. Lava, Jul 14 2017

Keywords

Comments

Numbers of iterations for the listed terms are 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 4, 5, 5, 5, 6, 6, 9, 10, 10, 11, 11, 12, 12, 14, 15, 17, 17, 17, 18, 18, 18, 20, 20, 20, 21, 21, 23, 23, 24.
From David A. Corneth, Jul 20 2017: (Start)
If n is in the sequence and its highest digit is m then n * (10\m) is in the sequence for m * (10\m) < 10.
Let T(q, k, n) = b(n) from the following recursion: for 0 <= i <= q-1, b(i) = 1 if i = k, else, b(i) = 0. Then b(n) = Sum(j=1..n, b(n-j)). If some m has q digits d1,..,dk,..,dq with d1 nonzero then after n iterations, we have Sum(j=1..q, T(q, k, n)*d(q-k+1)). This enables an iterative approach to finding solutions with q digits. (End)

Examples

			Digit reverse of 17 is 71 and 7 + 1 = 8, 1 + 8 = 9, 8 + 9 = 17;
Digit reverse of 286 is 682 and 6 + 8 + 2 = 16, 8 + 2 + 16 = 26, 2 + 16 + 26 = 44, 16 + 26 + 44 = 86, 26 + 44 + 86 = 156, 44 + 86 + 156 = 286.
		

Crossrefs

Programs

  • Maple
    P:=proc(q) local a,b,k,n; for n from 0 to q do a:=convert(n,base,10); b:=convert(a,`+`); while b
    				
  • Mathematica
    Select[Range[10^6], Function[n, Total@ NestWhile[Append[Drop[#, 1], Total@ #] &, Reverse@ IntegerDigits@ n, Total@ # < n &] == n]] (* Michael De Vlieger, Jul 20 2017 *)
  • PARI
    is(n) = {my(d = Vecrev(digits(n))); while(vecsum(d)David A. Corneth, Jul 20 2017
Showing 1-6 of 6 results.