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 10 results.

A109884 Indices k of members of A109883 such that A109883(k) is a divisor of k. Also k is a term if A109883(k) = 0.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 12, 16, 18, 24, 28, 30, 32, 40, 44, 48, 60, 64, 72, 84, 120, 126, 128, 136, 140, 150, 152, 180, 184, 204, 216, 224, 234, 256, 270, 360, 420, 440, 462, 468, 496, 512, 520, 528, 546, 672, 700, 750, 752, 864, 870, 884
Offset: 1

Views

Author

Amarnath Murthy, Jul 11 2005

Keywords

Comments

2^n is a term for all n. All perfect numbers are terms.

Examples

			18 is a term as A109883(18) = 6, 6 is a divisor of 18.
6 is a term as A109883(6) = 0.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 900 do if(A109883(n)=0 or type(n/A109883(n),integer))then print(n);fi:od: # Nathaniel Johnston, Apr 15 2011
  • Mathematica
    With[{s = Table[Catch@ Fold[If[#1 < #2, Throw[#1], #1 - #2] &, n, Divisors@ n], {n, 10^3}]}, Select[MapIndexed[{First@ #2, #1 /. 0 -> 1} &, s], Divisible[#1, #2] & @@ # &][[All, 1]]] (* Michael De Vlieger, Aug 17 2017, after Bobby R. Treat at A109883 *)

Extensions

Offset, a(11), and a(12) corrected by, and a(13) - a(52) from Nathaniel Johnston, Apr 15 2011

A109886 Index of first occurrence of n in A109883, or -1 if n does not occur in A109883.

Original entry on oeis.org

1, 2, 3, 30, 5, 9, 7, 50, 20, 42, 11, 36, 13, 6510, 27, 54, 17, 70620, 19, 25, 46, 66, 23, 168630, 124, 98, 58, 78, 29
Offset: 0

Views

Author

Amarnath Murthy, Jul 11 2005

Keywords

Comments

Sequence continues: a(29)=??, a(30)=??, 31, 70, 112, 100, 57, 200, 37, 484, 55, 102, 41, 49, 43, a(44)=??, 94, 114, 47, 225, 1264, 252, 104, 294, 53, 780, 87, 71940, 118, 138, 59, 4290, 61, 1470, 85, 306, 134, a(66)=??, 67, 6300, 142, 288, 71, 324, 73, a(74)=??, 712, 174, 158, 2940, 79, a(80)=??, 166, 186, 83, 1344210, 405, 242, 115, 1590, 89, a(90)=??, 141, 196, 406, 540, 119, 2310, 97, 390, 202, 222, ..., . - Jason Earls and Robert G. Wilson v, Jul 12 2005
Smallest number N with perfect deficiency n, that is, the first number such that A109883(N)=n. - Walter Kehowski, Sep 13 2005
a(29) > 10^9 if it exists. - Michel Marcus, Mar 30 2024

Examples

			a(7) = 50: divisors of 50 are 1,2,5,10,25,50; 50 - (1 + 2 + 5 + 10 + 25) = 7 and 50 is the smallest such number.
		

Crossrefs

Programs

  • Maple
    with(numtheory); pdef := proc(n) local k, d, divd; d:=n; divd:=sort([op(divisors(n))]); for k in divd while d>=k do d:=d-k; od; end: PDL:=[]; for z from 1 to 1 do for pd from 0 to 60 do for n from 1 to 200000 do missed:=true; if pdef(n)=pd then PDL:=[op(PDL),n]; missed:=false; break fi od; if missed then PDL:=[op(PDL),-1] fi od od; PDL; # Walter Kehowski, Sep 13 2005
  • Mathematica
    subtract = If[ #1 < #2, Throw[ #1], #1 - #2]&; f[n_] := Catch @ Fold[subtract, n, Divisors @ n] (* Bobby R. Treat, (DrBob(AT)bigfoot.com), Jul 14 2005 *)
    t = Table[0, {60}]; Do[ a = f[n]; If[a < 60 && t[[a + 1]] == 0, t[[a + 1]] = n], {n, 10^8}] (* Robert G. Wilson v, Jul 14 2005 *)

Extensions

Corrected and extended by Jason Earls, Jul 12 2005
More terms from Walter Kehowski, Sep 13 2005

A110002 Palindromes whose perfect deficiency (A109883) is also palindromic.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 44, 222, 292, 414, 646, 717, 848, 979, 27072, 28882, 45954, 74247, 90109, 96569, 118811, 2376732, 5136315, 5185815, 5266625, 5635365, 5684865, 6344436, 7424247, 7481847, 7484847, 7929297, 9858589, 12333321, 21922912, 32255223
Offset: 1

Views

Author

Jason Earls, Sep 02 2005

Keywords

Crossrefs

Programs

  • Mathematica
    subtract = If[ #1 < #2, Throw[ #1], #1 - #2]&;d[n_] := Catch @ Fold[subtract, n, Divisors @ n];Select[Range[10000000],PalindromeQ[#]&&PalindromeQ[d[#]]&] (* James C. McMahon, Mar 31 2024 *)
  • Python
    # uses imports, function in A109883
    from itertools import count, islice, product
    def ispal(n): return (s:=str(n)) == s[::-1]
    def pals(): # generator of palindromes
        digits = "0123456789"
        yield from map(int, digits)
        for d in count(2):
            for f in "123456789":
                for p in product(digits, repeat=d//2-1):
                    left = f + "".join(p); right = left[::-1]
                    for mid in [[""], digits][d%2]:
                        yield int(left + mid + right)
    def agen(): yield from (p for p in pals() if p>0 and ispal(A109883(p)))
    print(list(islice(agen(), 40))) # Michael S. Branicky, Mar 31 2024

Extensions

a(38) and beyond from Michael S. Branicky, Mar 31 2024

A110277 Values of n such that the perfect deficiency (A109883) of n is a square.

Original entry on oeis.org

1, 2, 4, 5, 6, 8, 14, 16, 17, 24, 28, 32, 37, 38, 42, 44, 64, 72, 92, 98, 101, 110, 128, 134, 152, 170, 172, 180, 186, 192, 197, 206, 248, 252, 256, 257, 284, 374, 398, 401, 410, 428, 434, 474, 480, 496, 512, 577, 590, 604, 616, 632, 638, 677, 752, 760, 864, 884
Offset: 1

Views

Author

Jason Earls, Jul 18 2005

Keywords

Crossrefs

Cf. A110278.

Programs

  • Mathematica
    subtract = If[ #1 < #2, Throw[ #1], #1 - #2]&; f[n_] := Catch @ Fold[subtract, n, Divisors @ n]; Select[ Range[905], IntegerQ[ Sqrt[ f[ # ]]] &] (* Robert G. Wilson v, Jul 21 2005 *)

A110278 Values of n such that the perfect deficiency (A109883) of n and n+1 are both squares.

Original entry on oeis.org

1, 4, 5, 16, 37, 256, 65536, 80656, 3459600, 166926400
Offset: 1

Views

Author

Jason Earls, Jul 18 2005

Keywords

Comments

Conjecture: sequence is infinite.
No more terms below 10^9. - Amiram Eldar, Dec 27 2018

Examples

			A109883(37)=36 & A109883(38)=16, both of which are squares, so 37 is a term.
		

Crossrefs

Cf. A110277.

Programs

  • Mathematica
    subtract = If[ #1 < #2, Throw[ #1], #1 - #2]&; f[n_] := Catch @ Fold[subtract, n, Divisors @ n]; a = False; Do[b = IntegerQ[ Sqrt[ f[ n]]]; If[{a, b} == {True, True}, Print[n - 1]]; a = b, {n, 10^7}] (* Robert G. Wilson v, Jul 21 2005 *)
  • PARI
    a109883(n) = {my(r = n); fordiv(n, d, if (r < d, return (r)); r -= d;); 0;}
    isok(n) = issquare(a109883(n)) && issquare(a109883(n+1)); \\ Michel Marcus, Dec 28 2018

Extensions

a(10) from Amiram Eldar, Dec 27 2018

A108864 Numbers n such that the perfect deficiency of n (A109883) is <= 10.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 28, 30, 32, 40, 42, 44, 50, 52, 60, 64, 68, 72, 110, 120, 126, 128, 130, 136, 144, 150, 152, 180, 184, 204, 228, 256, 315, 462, 496, 512, 528, 592, 656, 750, 884, 1012, 1024, 1155, 1188, 1248
Offset: 1

Views

Author

Jason Earls, Jul 12 2005

Keywords

Comments

Is 1155 the last odd number in this sequence?

A108865 Numbers n such that the perfect deficiency of n (A109883) is prime.

Original entry on oeis.org

3, 9, 10, 12, 25, 30, 36, 49, 50, 60, 70, 81, 121, 126, 136, 144, 150, 210, 225, 289, 324, 330, 338, 350, 390, 462, 484, 490, 510, 660, 676, 690, 750, 770, 780, 784, 800, 841, 961, 1058, 1089, 1156, 1190, 1225, 1250, 1380, 1470, 1500, 1610, 1650, 1682, 1750
Offset: 1

Views

Author

Jason Earls, Jul 12 2005

Keywords

Comments

Consecutive terms are 9,10 and 49,50. Are there any more?

A110018 Numbers n such that the perfect deficiency of n (A109883) equals the perfect deficiency of n + 1.

Original entry on oeis.org

10611, 145215
Offset: 1

Views

Author

Jason Earls, Sep 03 2005

Keywords

Comments

Are these the only terms?

A064510 Numbers m such that the sum of the first k divisors of m is equal to m for some k.

Original entry on oeis.org

1, 6, 24, 28, 496, 2016, 8128, 8190, 42336, 45864, 392448, 714240, 1571328, 33550336, 61900800, 91963648, 211891200, 1931236608, 2013143040, 4428914688, 8589869056, 10200236032, 137438691328, 214204956672
Offset: 1

Views

Author

Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Oct 06 2001

Keywords

Comments

Obviously all perfect numbers are included in this sequence.
a(25) > 5*10^11. Other than perfect numbers, 104828758917120, 916858574438400, 967609154764800, 93076753068441600, 215131015678525440 and 1371332329173024768 are also terms. - Donovan Johnson, Dec 26 2012
a(25) > 10^12. - Giovanni Resta, Apr 15 2017

Examples

			Divisors of 24 are 1, 2, 3, 4, 6, 8, 12 and 24. 1+2+3+4+6+8 = 24.
		

Crossrefs

Programs

  • Mathematica
    subtract = If[ #1 < #2, Throw[ #1], #1 - #2]&; f[n_] := Catch @ Fold[subtract, n, Divisors @ n]; lst = {}; Do[ If[ f[n] == 0, AppendTo[lst, n]], {n, 10^8}]; lst (* Bobby R. Treat and Robert G. Wilson v, Jul 14 2005 *)
    Select[Range[2000000],MemberQ[Accumulate[Divisors[#]],#]&] (* Harvey P. Dale, Mar 22 2012 *)
  • PARI
    isok(n) = {my(d = divisors(n)); my(k = 1); while ((k <= #d) && ((sd = sum(j=1, k, d[j])) != n), k++;); (sd == n);} \\ Michel Marcus, Jan 16 2014

Extensions

More terms from Don Reble, Dec 17 2001
a(19)-a(23) from Donovan Johnson, Aug 31 2008
a(24) from Donovan Johnson, Aug 11 2011

A117552 Largest partial sum of the increasingly ordered divisors of n, not exceeding n.

Original entry on oeis.org

1, 1, 1, 3, 1, 6, 1, 7, 4, 8, 1, 10, 1, 10, 9, 15, 1, 12, 1, 12, 11, 14, 1, 24, 6, 16, 13, 28, 1, 27, 1, 31, 15, 20, 13, 25, 1, 22, 17, 30, 1, 33, 1, 40, 33, 26, 1, 36, 8, 43, 21, 46, 1, 39, 17, 36, 23, 32, 1, 58, 1, 34, 41, 63, 19, 45, 1, 58, 27, 39, 1, 63, 1, 40, 49, 64, 19, 51, 1, 66
Offset: 1

Views

Author

Leroy Quet, Mar 28 2006

Keywords

Examples

			a(12)=10 because the increasingly ordered divisors of 12 are 1,2,3,4,6 and 12, with partial sums 1,3,6,10,16 and 28; the largest partial sum not exceeding 12 is 10.
		

Crossrefs

Cf. A117553, A109883, A377247 (corresponding largest divisor index).

Programs

  • Maple
    with(numtheory): a:=proc(n) local div,j: if n=1 then 1 else div:=divisors(n): for j from 1 by 1 while sum(div[i],i=1..j)<=n do sum(div[k],k=1..j) od: fi: end: seq(a(n),n=1..90); # Emeric Deutsch, Apr 01 2006
  • Mathematica
    Table[Last@ TakeWhile[Accumulate@ Divisors@ n, # <= n &], {n, 80}] (* Michael De Vlieger, Oct 30 2017 *)
  • PARI
    A117552(n) = { my(divs=divisors(n), s=0); for(i=1,#divs,if((s+divs[i])>n,return(s),s+=divs[i])); s; }; \\ Antti Karttunen, Oct 30 2017

Formula

a(n) = n - A109883(n). - Ridouane Oudra, Jan 25 2024

Extensions

More terms from Emeric Deutsch, Apr 01 2006
Showing 1-10 of 10 results.