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 63 results. Next

A050235 a(n) is the number of n-digit Keith numbers A007629.

Original entry on oeis.org

0, 6, 2, 9, 7, 10, 2, 3, 2, 0, 2, 4, 2, 3, 3, 3, 5, 3, 5, 3, 1, 1, 3, 1, 1, 3, 7, 1, 2, 5, 2, 4, 6, 3
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007629.

Extensions

More terms from Eric W. Weisstein using results from D. Lichtblau, Aug 24 2004
a(27)-a(31) from Eric W. Weisstein from computations by Daniel Lichtblau Eric W. Weisstein, Jun 23 2009
a(32)-a(34) from computations by Daniel Lichtblau -- Eric W. Weisstein, Aug 26 2009

A246544 Consider the aliquot parts, in ascending order, of a composite number. Take their sum and repeat the process deleting the minimum number and adding the previous sum. The sequence lists the numbers that after some iterations reach a sum equal to themselves.

Original entry on oeis.org

6, 21, 28, 85, 496, 2133, 8128, 19521, 77125, 97273, 176661, 615281, 4948133, 33550336, 68353213, 129127041, 8589869056
Offset: 1

Views

Author

Paolo P. Lava, Aug 29 2014

Keywords

Comments

Similar to Keith numbers and Primonacci numbers, using proper divisors instead of digits or prime factors.
The perfect numbers A000396 are a subset.
The numbers of iterations are: 1, 2, 1, 3, 1, 2, 1, 2, 3, 4, 2, 5, ...; with 1 when the term is perfect. - Michel Marcus, Aug 30 2014
The 2-hyperperfect numbers A007593 are a subset, with number of iterations 2. - Michel Marcus, Sep 22 2014

Examples

			Aliquot parts of 85 are 1, 5 and 17:
  1 + 5 + 17 = 23;
  5 + 17 + 23 = 45;
  17 + 23 + 45 = 85.
Aliquot parts of 19521 are 1, 3, 9, 27, 81, 241, 723, 2169 and 6507:
  1 + 3 + 9 + 27 + 81 + 241 + 723 + 2169 + 6507 = 9761;
  3 + 9 + 27 + 81 + 241 + 723 + 2169 + 6507 + 9761 = 19521.
		

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 if not isprime(n) then
    a:=sort([op(divisors(n))]); b:=nops(a)-1;
    for k from 1 to b do v[k]:=a[k]; od;
    t:=b+1; v[t]:=add(v[k],k=1..b);
    while v[t]
    				
  • Mathematica
    A246544 = {};
    For[n = 4, n <= 1000000, n++,
     If[PrimeQ[n], Continue[]];
     a = Most[Divisors[n]];
     sum = Total[a];
     While[sum < n, sum = Total[a = Join[Rest[a], {sum}]]];
     If[sum == n, AppendTo[A246544, n]];
    ]; A246544 (* Robert Price, Sep 08 2019 *)
  • PARI
    lista(nn) = {forcomposite(n=1, nn, d = divisors(n); v = vector(#d-1, i, d[i]); vs = sum(i=1, #v, v[i]); ind = 1; while (vs < n, v = concat(v, vs); vs += vs - v[ind]; ind++;); if (vs == n, print1(n, ", ")););} \\ Michel Marcus, Aug 29 2014
    
  • Python
    import math
    def divs(n):
        large_divisors = []
        for i in range(1, int(math.sqrt(n) + 1)):
            if n % i == 0:
                yield i
                if i !=  n // i:
                    large_divisors.insert(0, n / i)
        for divisor in large_divisors:
            yield divisor
    a = 2
    while a < 1000000000:
        q = list(divs(a))[:-1]
        r = sum(q)
        if r > a or len(q) == 1:
            pass
        elif r == a:
            print(a)
        else:
            c = 1
            while r < a:
                q.append(r)
                r = sum(q[c:])
                c += 1
            if r == a:
                print(a)
        a += 1
    # David Consiglio, Jr., Sep 09 2014
    
  • Python
    from sympy import divisors, isprime
    A246544_list = []
    for n in range(2,10**5):
        if not isprime(n):
            x = divisors(n)
            x.pop()
            y = sum(x)
            while y < n:
                x, y = x[1:]+[y], 2*y-x[0]
            if y == n:
                A246544_list.append(n)
    # Chai Wah Wu, Nov 03 2014

Extensions

a(13)-a(15) from Michel Marcus, Aug 29 2014
a(16) from David Consiglio, Jr., Sep 06 2014
a(17) from Lars Blomberg, Oct 27 2014

A282757 2*n analog to Keith numbers.

Original entry on oeis.org

5, 9, 10, 15, 19, 20, 25, 28, 30, 35, 40, 45, 47, 66, 88, 132, 198, 2006, 2740, 4012, 4419, 13635, 56357, 338540, 354164, 419966, 441972, 685704, 803678, 1528803, 1844810, 9127005, 12305952, 14315686, 14650155, 15828353, 17838087, 22618003, 37826729, 71644613
Offset: 1

Views

Author

Paolo P. Lava, Feb 22 2017

Keywords

Comments

Like Keith numbers but starting from 2*n digits to reach n.
Consider the digits of 2*n. Take their sum 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 themselves.

Examples

			2*28 = 56 :
5 + 6 = 11;
6 + 11 = 17;
11 + 17 = 28.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h,w) local a, b, k, n, t, v; v:=array(1..h);
    for n from 1 to q do a:=w*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^6], Function[n, Module[{d = IntegerDigits[2 n], s, k = 0}, s = Total@ d; While[s < n, AppendTo[d, s]; k++; s = 2 s - d[[k]]]; s == n]]] (* Michael De Vlieger, Feb 22 2017, after T. D. Noe at A007629 *)

A282765 10*n analog to Keith numbers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 19, 28, 56, 176, 904, 3347, 4795, 5301, 9775, 10028, 16165, 16715, 35103, 49693, 111039, 191103, 370287, 439385, 845772, 1727706, 1836482, 3631676, 3767812, 4363796, 4499932, 5351605, 6940437, 20090073, 28246243, 38221997, 60220332
Offset: 1

Views

Author

Paolo P. Lava, Feb 22 2017

Keywords

Comments

Like Keith numbers but starting from 10*n digits to reach n.
Consider the digits of 10*n. Take their sum 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 themselves.

Examples

			10*14 = 140:
1 + 4 + 0 = 5;
4 + 0 + 5 = 9;
0 + 5 + 9 = 14.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h,w) local a, b, k, n, t, v; v:=array(1..h);
    for n from 1 to q do a:=w*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^6], Function[n, Module[{d = IntegerDigits[10 n], s, k = 0}, s = Total@ d; While[s < n, AppendTo[d, s]; k++; s = 2 s - d[[k]]]; s == n]]] (* Michael De Vlieger, Feb 22 2017, after T. D. Noe at A007629 *)

A274769 Square analog to Keith numbers.

Original entry on oeis.org

1, 9, 37, 40, 43, 62, 70, 74, 160, 1264, 1952, 2847, 12799, 16368, 16584, 42696, 83793, 97415, 182011, 352401, 889871, 925356, 1868971, 1881643, 3661621, 7645852, 15033350, 21655382, 63288912, 88192007, 158924174, 381693521, 792090500, 2025078249, 2539401141
Offset: 1

Views

Author

Paolo P. Lava, Jul 06 2016

Keywords

Comments

Like Keith numbers but starting from n^2 digits to reach n.
Consider the digits of the square of a number n. Take their sum 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 themselves.

Examples

			1264^2 = 1597696 :
1 + 5 + 9 + 7 + 6 + 9 + 6 = 43;
5 + 9 + 7 + 6 + 9 + 6 + 43 = 85;
9 + 7 + 6 + 9 + 6 + 43 + 85 = 165;
7 + 6 + 9 + 6 + 43 + 85 + 165 = 321;
6 + 9 + 6 + 43 + 85 + 165 + 321 = 635;
9 + 6 + 43 + 85 + 165 + 321 + 635 = 1264.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h) local a,b,k,n,t,v; v:=array(1..h);
    for n from 1 to q do b:=n^2; a:=[];
    for k from 1 to ilog10(b)+1 do a:=[(b mod 10),op(a)]; b:=trunc(b/10); od;
    for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^2)+1;
    t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
    				
  • Mathematica
    Select[Range[10^6], Function[n, Module[{d = IntegerDigits[n^2], s, k = 0}, s = Total@ d; While[s < n, AppendTo[d, s]; k++; s = 2 s - d[[k]]]; s == n]]] (* Michael De Vlieger, Feb 22 2017, after T. D. Noe at A007629 *)
    (* function keithQ[ ] is defined in A007629 *)
    a274769[n_] := Join[{1, 9}, Select[Range[10, n], keithQ[#, 2]&]]
    a274769[10^6] (* Hartmut F. W. Hoft, Jun 02 2021 *)

Extensions

a(32)-a(35) from Giovanni Resta, Jul 08 2016

A274770 Cube analog to Keith numbers.

Original entry on oeis.org

1, 8, 17, 18, 26, 27, 44, 55, 63, 80, 105, 187, 326, 776, 1095, 2196, 6338, 13031, 13131, 25562, 27223, 70825, 140791, 553076, 632489, 1402680, 1404312, 3183253, 11311424, 50783292, 51231313, 182252596, 255246098, 522599548, 1180697763, 2025114819, 2137581414
Offset: 1

Views

Author

Paolo P. Lava, Jul 06 2016

Keywords

Comments

Like Keith numbers but starting from n^3 digits to reach n.
Consider the digits of the cube of a number n . Take their sum 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 themselves.

Examples

			776^3 = 467288576 :
4 + 6 + 7 + 2 + 8 + 8 + 5 + 7 + 6 = 53;
6 + 7 + 2 + 8 + 8 + 5 + 7 + 6 + 53 = 102;
7 + 2 + 8 + 8 + 5 + 7 + 6 + 53 + 102 = 198;
2 + 8 + 8 + 5 + 7 + 6 + 53 + 102 + 198 = 389;
8 + 8 + 5 + 7 + 6 + 53 + 102 + 198 + 389 = 776.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h) local a,b,k,n,t,v; v:=array(1..h);
    for n from 1 to q do b:=n^3; a:=[];
    for k from 1 to ilog10(b)+1 do a:=[(b mod 10),op(a)]; b:=trunc(b/10); od;
    for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^3)+1;
    t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
    				
  • Mathematica
    (* function keithQ[ ] is defined in A007629 *)
    a274770[n_] := Join[{1, 8}, Select[Range[10, n], keithQ[#, 3]&]]
    a274770[10^6] (* Hartmut F. W. Hoft, Jun 02 2021 *)

Extensions

a(34)-a(37) from Giovanni Resta, Jul 08 2016

A263534 Consider the 10's complements mod 10 of the digits of a number k. Take their sum 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 k.

Original entry on oeis.org

29, 76, 157, 174, 191, 475, 713, 1129, 1961, 3286, 4424, 7812, 8973, 19978, 24317, 35845, 37041, 51712, 68022, 166838, 443275, 444247, 445219, 509439, 706317, 1189312, 1933197, 2686010, 10809303, 55558901, 58338037, 257990335, 504050156, 839186880
Offset: 1

Views

Author

Paolo P. Lava, Oct 20 2015

Keywords

Comments

Like Keith numbers but using the ten's complements of their digits.
a(35) > 10^9. - Robert Price, Apr 08 2019

Examples

			For 29, the 10's complements of its digits are 8, 1. Then:
  8 + 1 = 9;
  1 + 9 = 10;
  9 + 10 = 19;
  10 + 19 = 29.
For 475, the 10's complements of its digits are 6, 3, 5. Then:
  6 + 3 + 5 = 14;
  3 + 5 + 14 = 22;
  5 + 14 + 22 = 41;
  14 + 22 + 41 = 77;
  22 + 41 + 77 = 140;
  41 + 77 + 140 = 258;
  77 + 140 + 258 = 475.
		

Crossrefs

Cf. A007629.

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,c,k,n,t,v; v:=array(1..h);
    for n from 10 to q do b:=ilog10(n)+1; c:=n; a:=[];
    for k from 1 to b do a:=[(10-c) mod 10,op(a)]; c:=trunc(c/10); od;
    for k from 1 to b do v[k]:=a[k]; od; t:=b+1; v[t]:=add(v[k], k=1..b);
    while v[t]
    				
  • Mathematica
    Select[Range[10^5], Function[{m, n}, Last@ NestWhile[Append[#, Total@ Take[#, -m]] &, Flatten[{#, Total@ #}] &[IntegerDigits[n] /. d_?Positive :> 10 - d], Last@ # < n &, 1, 10^2] == n] @@ {IntegerLength@#, #} &] (* Michael De Vlieger, Mar 09 2018 *)

Extensions

Name clarified, some terms and Maple code corrected by Paolo P. Lava, Mar 08 2018
a(30)-a(32) from Robert Price, Apr 05 2019
a(33)-a(34) from Robert Price, Apr 08 2019

A281915 4th power analog of Keith numbers.

Original entry on oeis.org

1, 7, 19, 20, 22, 25, 28, 36, 77, 107, 110, 175, 789, 1528, 1932, 3778, 5200, 7043, 8077, 38855, 41234, 44884, 49468, 204386, 763283, 9423515, 73628992, 87146144, 146124072, 146293356, 326194628, 1262293219, 1321594778, 2767787511, 11511913540, 12481298961, 13639550655
Offset: 1

Views

Author

Paolo P. Lava, Feb 02 2017

Keywords

Comments

Like Keith numbers but starting from n^4 digits to reach n.
Consider the digits of n^4. Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some number of iterations reach a sum equal to n.

Examples

			175^4 = 937890625:
9 + 3 + 7 + 8 + 9 + 0 + 6 + 2 + 5 = 49;
3 + 7 + 8 + 9 + 0 + 6 + 2 + 5 + 49 = 89;
7 + 8 + 9 + 0 + 6 + 2 + 5 + 49 + 89 = 175.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
    for n from 1 to q do b:=n^w; a:=[];
    for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
    for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
    t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
    				
  • Mathematica
    (* function keithQ[ ] is defined in A007629 *)
    a281915[n_] := Join[{1, 7}, Select[Range[10, n], keithQ[#, 4]&]]
    a281915[10^6] (* Hartmut F. W. Hoft, Jun 02 2021 *)

Extensions

a(27)-a(28) from Jinyuan Wang, Jan 30 2020
Missing a(25) and a(29)-a(37) from Giovanni Resta, Jan 31 2020

A281916 5th power analog of Keith numbers.

Original entry on oeis.org

1, 28, 35, 36, 46, 51, 99, 109, 191, 239, 476, 491, 1022, 1126, 1358, 1362, 15156, 21581, 44270, 63377, 100164, 375830, 388148, 2749998, 5215505, 10158487, 81082532, 87643314, 410989134, 1485204944, 3496111364, 3829840893, 15889549579, 16107462404, 16766005098, 17608009898
Offset: 1

Views

Author

Paolo P. Lava, Feb 02 2017

Keywords

Comments

Like Keith numbers but starting from n^5 digits to reach n.
Consider the digits of n^5. Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some number of iterations reach a sum equal to n.

Examples

			109^5 = 15386239549:
1 + 5 + 3 + 8 + 6 + 2 + 3 + 9 + 5 + 4 + 9 = 55;
5 + 3 + 8 + 6 + 2 + 3 + 9 + 5 + 4 + 9 + 55 = 109.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
    for n from 1 to q do b:=n^w; a:=[];
    for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
    for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
    t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
    				
  • Mathematica
    (* function keithQ[ ] is defined in A007629 *)
    a281916[n_] := Join[{1}, Select[Range[10, n], keithQ[#, 5]&]]
    a281916[5*10^5] (* Hartmut F. W. Hoft, Jun 03 2021 *)

Extensions

a(27)-a(28) from Jinyuan Wang, Jan 31 2020
a(29)-a(36) from Giovanni Resta, Jan 31 2020

A281917 6th power analog of Keith numbers.

Original entry on oeis.org

1, 18, 45, 54, 64, 125, 218, 246, 935, 1125, 6021, 6866, 7887, 40210, 89330, 457625, 577655, 613385, 640118, 5200210, 6809148, 7293243, 10013591, 50980917, 216864574, 885859983, 4556794863, 4939169289, 8580755055, 8672110451, 18562634876, 18992278338, 36013476739
Offset: 1

Views

Author

Paolo P. Lava, Feb 02 2017

Keywords

Comments

Like Keith numbers but starting from n^6 digits to reach n.
Consider the digits of n^6. Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some number of iterations reach a sum equal to n.

Examples

			125^6 = 3814697265625:
3 + 8 + 1 + 4 + 6 + 9 + 7 + 2 + 6 + 5 + 6 + 2 + 5 = 64;
8 + 1 + 4 + 6 + 9 + 7 + 2 + 6 + 5 + 6 + 2 + 5 + 64 = 125.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
    for n from 1 to q do b:=n^w; a:=[];
    for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
    for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
    t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
    				
  • Mathematica
    (* function keithQ[n_, e_] is defined in A007629 *)
    a281917[n_] := Join[{1}, Select[Range[10, n], keithQ[#, 6]&]]
    a281917[10^4] (* Hartmut F. W. Hoft, Jun 03 2021 *)

Extensions

a(24) from Jinyuan Wang, Jan 31 2020
a(25)-a(33) from Giovanni Resta, Jan 31 2020
Showing 1-10 of 63 results. Next