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

A240698 Partial sums of divisors of n, cf. A027750.

Original entry on oeis.org

1, 1, 3, 1, 4, 1, 3, 7, 1, 6, 1, 3, 6, 12, 1, 8, 1, 3, 7, 15, 1, 4, 13, 1, 3, 8, 18, 1, 12, 1, 3, 6, 10, 16, 28, 1, 14, 1, 3, 10, 24, 1, 4, 9, 24, 1, 3, 7, 15, 31, 1, 18, 1, 3, 6, 12, 21, 39, 1, 20, 1, 3, 7, 12, 22, 42, 1, 4, 11, 32, 1, 3, 14, 36, 1, 24, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 10 2014

Keywords

Comments

Triangle read by rows in which row n lists the partial sums of divisors of n. - Omar E. Pol, Apr 12 2014

Examples

			.    n |  n-th row of A240698   |  n-th row of A027750
.  ----+------------------------+---------------------
.    1 |  1                     |  1
.    2 |  1, 3                  |  1, 2
.    3 |  1, 4                  |  1, 3
.    4 |  1, 3, 7               |  1, 2, 4
.    5 |  1, 6                  |  1, 5
.    6 |  1, 3, 6, 12           |  1, 2, 3, 6
.    7 |  1, 8                  |  1, 7
.    8 |  1, 3, 7, 15           |  1, 2, 4, 8
.    9 |  1, 4, 13              |  1, 3, 9
.   10 |  1, 3, 8, 18           |  1, 2, 5, 10
.   11 |  1, 12                 |  1, 11
.   12 |  1, 3, 6, 10, 16, 28   |  1, 2, 3, 4, 6, 12
.   13 |  1, 14                 |  1, 13 .
		

Crossrefs

Cf. A000005 (row lengths), A240694.

Programs

  • Haskell
    a240698 n k = a240698_tabf !! (n-1) !! (k-1)
    a240698_row n = a240698_tabf !! (n-1)
    a240698_tabf = map (scanl1 (+)) a027750_tabf
    
  • Mathematica
    Table[Accumulate[Divisors[n]],{n,30}]//Flatten (* Harvey P. Dale, Dec 30 2019 *)
  • PARI
    row(n) = my(d=divisors(n)); vector(#d, k, sum(i=1, k, d[i])); \\ Michel Marcus, Jan 24 2022

Formula

T(n,1) = 1, T(n,k) = T(n,k-1) + A027750(n,k), 1 < k <= n.
T(n,1) = 1;
T(n,A000005(n)) = A000203(n);
T(n,A000005(n)-1) = A001065(n), n > 1.

A109883 Start subtracting from n its divisors beginning from 1 until one reaches a number smaller than the last divisor subtracted or reaches the last nontrivial divisor < n. Define this to be the perfect deficiency of n. Then a(n) = perfect deficiency of n.

Original entry on oeis.org

0, 1, 2, 1, 4, 0, 6, 1, 5, 2, 10, 2, 12, 4, 6, 1, 16, 6, 18, 8, 10, 8, 22, 0, 19, 10, 14, 0, 28, 3, 30, 1, 18, 14, 22, 11, 36, 16, 22, 10, 40, 9, 42, 4, 12, 20, 46, 12, 41, 7, 30, 6, 52, 15, 38, 20, 34, 26, 58, 2, 60, 28, 22, 1, 46, 21, 66, 10, 42, 31, 70, 9, 72, 34, 26, 12, 58, 27, 78
Offset: 1

Views

Author

Amarnath Murthy, Jul 11 2005

Keywords

Comments

If n is a perfect number then a(n) = 0. But if a(n) = 0, n needs not be perfect, e.g., a(24) = 0, but 24 is not a perfect number. See A064510.

Examples

			a(14) = 4: 14-1 = 13, 13-2 = 11, 11-7 = 4.
a(6) = 0: 6-1 = 5, 5-2 = 3, 3-3 = 0. 6 is a perfect number.
a(35) = 22: 35-1 = 34, 34-5 = 29, 29-7 = 22.
		

Crossrefs

Programs

  • Maple
    A109883:=proc(n)local d,j,k,m:if(n=1)then return 0:fi:j:=1:m:=n:d:=divisors(n);k:=nops(d):for j from 1 to k do m:=m-d[j]:if(mNathaniel Johnston, Apr 15 2011
  • Mathematica
    subtract = If[ #1 < #2, Throw[ #1], #1 - #2]&;
    a[n_] := Catch @ Fold[subtract, n, Divisors @ n]
    Table[ a[n], {n, 80}] (* Bobby R. Treat (DrBob(AT)bigfoot.com), Jul 14 2005 *)
  • PARI
    a(n) = {my(r = n); fordiv(n, d, if (r < d, return (r)); r -= d;); 0;} \\ Michel Marcus, Dec 28 2018
    
  • Python
    from sympy import divisors
    def A109883(n):
        if n == 1: return 0
        s = n
        for d in divisors(n)[:-1]:
            if s < d: break
            s -= d
        return s
    print([A109883(n) for n in range(1, 80)]) # Michael S. Branicky, Mar 31 2024

Formula

a(1) = 0, a(2^n) = 1.
a(p) = p-1, a(p^n) = (p^(n+1) - 2*p^n + 1)/(p-1), if p is a prime.
a(n) = n - A117552(n). - Ridouane Oudra, Jan 25 2024

Extensions

More terms from Jason Earls and Robert G. Wilson v, Jul 12 2005

A194472 Erdős-Nicolas numbers.

Original entry on oeis.org

24, 2016, 8190, 42336, 45864, 392448, 714240, 1571328, 61900800, 91963648, 211891200, 1931236608, 2013143040, 4428914688, 10200236032, 214204956672
Offset: 1

Views

Author

Alonso del Arte, Aug 24 2011

Keywords

Comments

Abundant numbers m such that the sum of the first k divisors is equal to m for some k, thus this is a subsequence of A064510. k has to be less than tau(m) - 1 for this sequence, whereas in A064510 k = tau(m) - 1 is allowed (and thus perfect numbers are in that sequence).
a(17) > 5*10^11. 104828758917120, 916858574438400, 967609154764800, 93076753068441600, 215131015678525440 and 1371332329173024768 are also terms. - Donovan Johnson, Dec 26 2012
a(17) > 10^12. - Giovanni Resta, Apr 15 2017
Equivalently, numbers whose abundancy equals 1 + the sum of the reciprocals of its first k divisors for some k > 1. - Charlie Neder, Feb 08 2019
96892692739248881664, 41407449045801454927872, 101616496263816777695232, 1346571992706422996646631651147776, 3304572752464376776401640967110656 are also terms. - Michel Marcus, Feb 09 2019
All known terms of A141643 (abundancy 5/2) are terms. - Michel Marcus, Feb 11 2019
Named after the Hungarian mathematician Paul Erdős (1913-1996) and the French mathematician Jean-Louis Nicolas. - Amiram Eldar, Jun 23 2021
Are all terms in this sequence even? - Jenaro Tomaszewski, May 07 2023

Examples

			The divisors of 24 are 1, 2, 3, 4, 6, 8, 12 and 24 and 1 + 2 + 3 + 4 + 6 + 8 = 24, hence 24 is in the list.
The divisors of 48 are 1, 2, 3, 4, 6, 8, 12, 16, 24, 48. The first seven of these add up to 36, but the first eight add up to 52, therefore 48 is not on the list.
		

References

  • Jean-Marie De Koninck, Those Fascinating Numbers, Amer. Math. Soc., 2009, p. 141.

Crossrefs

Programs

  • Mathematica
    subtr = If[#1 < #2, Throw[#1], #1 - #2] &; selDivs[n_] := Catch@Fold[subtr, n, Drop[Divisors[n], -2]]; erdNickNums = {}; Do[If[selDivs[n] == 0, AppendTo[erdNickNums, n]], {n, 2, 10^5}]; erdNickNums (* Based on the program by Bobby R. Treat and Robert G. Wilson v for A064510 *)
  • PARI
    isok(n) = {if (sigma(n) <= 2*n, return (0)); my(d = divisors(n), s = 0); for (k=1, #d-2, s += d[k]; if (s == n, return (1)); if (s > n, break);); return (0);} \\ Michel Marcus, Feb 09 2019
    
  • Python
    from itertools import accumulate, count, islice
    from sympy import divisors
    def A194472_gen(startvalue=1): # generator of terms >= startvalue
        return (n for n in count(max(startvalue,1)) if any(s == n for s in accumulate(divisors(n)[:-2])))
    A194472_list = list(islice(A194472_gen(),5)) # Chai Wah Wu, Feb 18 2022

Extensions

More terms from M. F. Hasler, Aug 24 2011

A185584 Positive numbers equal to the sum of the squares of their first k divisors for some k.

Original entry on oeis.org

1, 130, 1860, 148480, 3039520, 4172437680, 5788838100, 38341734200, 41251514850, 54116036100, 78936002964, 1059758860356
Offset: 1

Views

Author

Claudio Meller, Feb 04 2011

Keywords

Comments

676358763167556, 3238006053537840, 343869932366333100, 408390181577292600, 466477390306128600 and 5447947283895097800 are also terms. - Donovan Johnson, Jan 20 2014

Examples

			130 --> (1, 2, 5, 10): 1^2+2^2+5^2+10^2 = 1+4+25+100 = 130.
1860 --> (1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30).
148480 --> (1, 2, 4, 5, 8, 10, 16, 20, 29, 32, 40, 58, 64, 80, 116, 128, 145, 160, 232).
3039520 --> (1, 2, 4, 5, 8, 10, 11, 16, 20, 22, 32, 40, 44, 55, 80, 88, 110, 121, 157, 160, 176, 220, 242, 314, 352, 440, 484, 605, 628, 785, 880).
		

Crossrefs

Cf. A064510.
See A185873 for the values of k.

Programs

  • Mathematica
    Select[Range[5000000],MemberQ[Accumulate[Divisors[#]^2],#]&] (* Harvey P. Dale *)
  • PARI
    isA185584(n) = fordiv(n,d,(n-=d^2)<0&return;n|return(1))
    for(n=1,1e7,isA185584(n)&print1(n", ")) \\ M. F. Hasler

Extensions

a(6) from Charles R Greathouse IV, Feb 05 2011
a(7) from Donovan Johnson, Feb 05 2011
Edited by N. J. A. Sloane, Feb 05 2011
a(8)-a(11) from Donovan Johnson, Feb 07 2011
a(12) from Donovan Johnson, Jan 20 2014

A378314 a(n) = number of subsets of {1, 2, ..., n} that represent the first k divisors of m for some positive integers m and 1 <= k <= A000005(m).

Original entry on oeis.org

0, 1, 2, 4, 6, 12, 16, 28, 36, 52, 70, 118, 150, 246, 318, 382, 430, 670, 798, 1278, 1566, 1886, 2270, 3230, 3742, 4702, 5854, 6814, 7966, 11806, 14878, 22558, 25630, 32542, 40222, 46366, 52510, 70942, 86302, 100126, 112414, 149278, 172318, 246046, 295198, 344350, 405790, 553246, 626974, 774430, 897310
Offset: 0

Views

Author

Max Alekseyev, Nov 22 2024

Keywords

Examples

			a(4) = 6 enumerates subsets {1}, {1,2}, {1,2,3}, {1,2,4}, {1,2,3,4}, {1,3}.
		

Crossrefs

Programs

  • PARI
    a378314(n) = my(L=1); sum(i=1,n, L=lcm(L,i); sigma(L/i));

Formula

a(n) = Sum_{i=1..n} sigma(LCM(1,2,...,i)/i).

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

A378313 Numbers m such that such that Sum_{i=1..k} A027750(m,i)^i = m for some k <= A000005(m).

Original entry on oeis.org

1, 130, 135, 288, 5083, 8064, 10130, 374057639685, 3138436947541900183, 5386775810449231243, 74220449392444960903, 153525475816743446263, 1388286039882808958923, 8020029492466254993943, 8756593744534084572523, 16468366959402667137403
Offset: 1

Views

Author

Max Alekseyev, Nov 22 2024

Keywords

Comments

There are many terms of the form 1 + p^2 + q^3 with primes p < q. Next known term not of this form is 1254382690393861635950014154836028.

Crossrefs

A185729 Numbers that are the sum of their first k non-divisors for some k.

Original entry on oeis.org

5, 8, 12, 51, 56, 85, 87, 105, 132, 164, 224, 249, 280, 321, 324, 343, 357, 363, 366, 405, 427, 428, 553, 583, 591, 618, 638, 654, 689, 699, 820, 918, 978, 1028, 1045, 1077, 1144, 1207, 1261, 1267, 1268, 1342, 1377, 1417, 1477, 1505, 1517, 1691, 1692, 1707, 1758, 1794, 1805, 1883, 1927, 2197, 2322, 2334, 2384, 2461, 2481, 2523, 2525, 2568
Offset: 1

Views

Author

Andrew Weimholt, Feb 05 2011

Keywords

Examples

			51 is in the sequence because 51 = 2 + 4 + 5 + 6 + 7 + 8 + 9 + 10
(the sum of its first 8 non-divisors)
		

Crossrefs

Cf. A185811 (k-values associated with this sequence)
Cf. A064510.

Programs

  • Mathematica
    Select[Range[2600],MemberQ[Accumulate[Complement[Range[#],Divisors[#]]],#]&]  (* Harvey P. Dale, Feb 16 2011 *)
  • PARI
    is(n)=my(s,t=1); while(sCharles R Greathouse IV, Nov 23 2015

A194269 Numbers j such that Sum_{i=1..k} d(i)^i = j+1 for some k where d(i) is the sorted list of divisors of j.

Original entry on oeis.org

4, 9, 25, 49, 68, 121, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2809, 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12769, 16129, 17161, 17500, 18769, 19321, 22201, 22801, 24649, 26569, 27889
Offset: 1

Views

Author

Michel Lagneau, Aug 27 2011

Keywords

Comments

Equivalently, numbers j such that Sum_{i=2..k} A027750(j,i)^i = j for some k.
The majority of these numbers are squares.
The sequence of numbers j such that Sum_{i=1..k} A027750(j,i)^i = j for some k is given by A378313.
All prime squares p^2 (A001248) are terms because the partial sum 1^1 + p^2 satisfy the condition. The terms that are not squares are given by A307137. - Michel Marcus, Mar 25 2019

Examples

			The divisors of 68 are 1, 2, 4, 17, 34, 68; 1^1 + 2^2 + 4^3 = 69, so 68 is a term.
		

Crossrefs

Programs

  • Maple
    isA194269 := proc(n) local dgs ,i,k; dgs := sort(convert(numtheory[divisors](n),list)) ; for k from 1 to nops(dgs) do if add(op(i,dgs)^i,i=1..k) = n+1 then return true; end if; end do; false ; end proc:
    for n from 1 to 30000 do if isA194269(n) then print(n); end if; end do: # R. J. Mathar, Aug 27 2011
  • PARI
    isok(n) = {my(d=divisors(n), s=0); for(k=1, #d, s += d[k]^k; if(s == n+1, return(1)); if(s > n+1, break););0;} \\ Michel Marcus, Mar 25 2019

Extensions

Edited by Max Alekseyev, Nov 22 2024

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
Showing 1-10 of 14 results. Next