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

A286449 Restricted growth sequence computed for A033879 (deficiency), or equally, for A033880 (abundance of n).

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 5, 1, 6, 2, 7, 8, 9, 3, 5, 1, 10, 11, 12, 13, 7, 14, 15, 16, 17, 7, 18, 4, 19, 16, 20, 1, 12, 18, 15, 21, 22, 10, 15, 23, 24, 16, 25, 3, 9, 26, 27, 28, 29, 30, 20, 5, 31, 16, 32, 33, 34, 35, 36, 37, 38, 19, 15, 1, 27, 16, 39, 7, 25, 8, 40, 41, 42, 34, 35, 9, 36, 16, 43, 44, 29, 32, 45, 46, 47, 24, 48, 8, 49, 50, 40, 10, 36, 51, 40, 52, 53
Offset: 1

Views

Author

Antti Karttunen, May 13 2017

Keywords

Examples

			We start by setting a(1) = 1 for A033879(1) = 1. Then, whenever A033879(k) is equal to some A033879(m) with m < k, we set a(k) = a(m). Otherwise (when the value is a new one, not encountered before), we allot for a(k) the least natural number not present among a(1) .. a(k-1).
For n=2, as A033879(2) = 1, which was already present at A033879(1), we set a(2) = a(1) = 1.
For n=3, as A033879(3) = 2, which is a new value not encountered before, we set a(3) = 1 + max(a(1),a(2)) = 2.
For n=4, as A033879(4) = 1, which was already present at n = 2 and n = 1, we set a(4) = a(1) = 1.
For n=5, as A033879(5) = 4, which is a new value not encountered before, we set a(5) = 1 + max(a(1),a(2),a(3),a(4)) = 3.
For n=12, as A033879(12) = -4, which is a new value not encountered before, we set a(12) = 1 + max(a(1),...,a(11)) = 8. Note that the sign matters here; -4 is not equal to +4, which was encountered already at n=5.
		

Crossrefs

Programs

  • PARI
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A033879(n) = ((2*n)-sigma(n));
    write_to_bfile(1,rgs_transform(vector(10000,n,A033879(n))),"b286449.txt");

A258250 Primitive weird numbers (pwn) (A002975) whose abundance (A033880) is a power of 2 (A000079).

Original entry on oeis.org

70, 836, 4030, 5830, 7192, 7912, 10792, 17272, 45356, 83312, 91388, 113072, 254012, 388076, 786208, 1713592, 4145216, 4559552, 4632896, 9928792, 11547352, 13086016, 15126992, 17999992, 29465852, 29581424, 34869056, 37111168, 38546576, 74899952, 89283592, 95327216
Offset: 1

Views

Author

Robert G. Wilson v, Jun 19 2015

Keywords

Comments

Number of terms < 10^n: 0, 1, 2, 6, 11, 15, 20, 32, 38, 48, 65, ..., .
Of the total of 499 terms < 10^11 which are pwn, only about 13% have an abundance which are powers of two.
Least term whose abundance has an exponent, e, of two > 1: 70, 836, 7192, 83312, 786208, 4145216, 98196134272, 4559552, 37111168, 22889716736, 141145802752, ?13?, 3307637248, ?15?, 154153326592, ..., .
Least term which has k prime factors, not counting multiplicity > 2: 70, 4030, 29465852, 44257207676, ..., .
Least term which has k prime factors, counting multiplicity > 2: 70, 836, 7192, 83312, 786208, 4145216, 37111168, 270788864, 2529837568, 22889716736, 141145802752, ..., .

Examples

			70 is in the sequence since sigma(70) = 144 which yields an abundance of 4 = 2^2.
		

Crossrefs

Programs

  • Mathematica
    (* copy the terms from A002975 and assign them to lst and then *) f[n_] := DivisorSigma[1, n] - 2n; lst[[#]] & /@ Select[ Range@ 695, IntegerQ@ Log2@ f@ lst[[#]] &]

Extensions

Corrected by Robert G. Wilson v, Dec 08 2015

A100696 Weird numbers m such that the sum of their divisors below A033880(m) is greater than A033880(m) = abundance of m.

Original entry on oeis.org

9272, 222952, 243892, 338572, 343876, 351956, 407132, 410476, 465652, 1188256, 1229152, 1901728, 2081824, 2189024, 3963968, 4199030, 4486208, 4559552, 5440192, 5568448, 5681270, 5763310, 5780810, 5804330, 5823790, 5921090, 6365870, 6460864, 6543110, 6911512
Offset: 1

Views

Author

N. J. A. Sloane, based on email from Alexey Aleksandrov (aleksandrov1988(AT)gmail.com), Mar 28 2006

Keywords

Comments

This sequence was posed as a puzzle by Prof. E. A. Roganov from Moscow State Industrial University at one of his seminars. It remained unsolved for several years. The solution (cf. current definition) was eventually revealed by the author (communicated by Max Alekseyev on Apr 19 2012).
It may be easily noticed that for an abundant number m, if the sum of its divisors below A033880(m) is smaller than A033880(m), then m is necessarily weird. So A100696 lists those weird numbers that cannot be detected this way. - Max Alekseyev, Apr 19 2012

Crossrefs

Cf. A033880.
Intersection of A006037 and A182225.

Programs

  • PARI
    is_A100696(n,d=divisors(n)[^-1],a=vecsum(d)-n,s=a)={for(i=1,#d,d[i]0||break); !is_A005835(n,d,a+n)} \\ M. F. Hasler, Jul 30 2016

Extensions

a(14)-a(30) from Donovan Johnson, Apr 19 2012
Data up to 10^7 double-checked by M. F. Hasler, Jul 30 2016

A182225 Numbers m such that the sum of their divisors smaller than A033880(m) is greater than A033880(m).

Original entry on oeis.org

12, 24, 30, 36, 40, 42, 48, 54, 56, 60, 66, 72, 80, 84, 90, 96, 100, 108, 112, 120, 126, 132, 140, 144, 150, 156, 160, 162, 168, 176, 180, 192, 198, 200, 204, 208, 210, 216, 220, 224, 228, 234, 240, 252, 260, 264, 270, 272, 276, 280, 288, 294, 300, 304, 306, 308, 312
Offset: 1

Views

Author

M. F. Hasler, Apr 19 2012

Keywords

Comments

Motivated by A100696. Subsequence of A005101: all terms are abundant.

Programs

  • Mathematica
    aQ[n_] := (ab = DivisorSigma[1, n] - 2 n) > 0 && DivisorSum[n, # &, # < ab &] > ab; Select[Range[312], aQ] (* Amiram Eldar, Sep 08 2019 *)
  • PARI
    is_A182225(n)=my(L=sigma(n)-2*n,s=L);fordiv(n,d,d
    				

A335254 Numbers k such that the abundance (A033880) of k is equal to the deficiency (A033879) of k+1.

Original entry on oeis.org

672, 523776, 19327369215
Offset: 1

Views

Author

Amiram Eldar, May 28 2020

Keywords

Comments

Equivalently, k and k+1 have the same absolute value of abundance (or deficiency) with opposite signs.
Equivalently, s(k) + s(k+1) = k + (k+1), where s(k) is the sum of proper divisors of k (A001065).
If k is a 3-perfect number (A005820) and k+1 is a prime, then k is in the sequence. Of the 6 known 3-perfect numbers only 672 and 523776 have this property.
a(4) > 10^11, if it exists.
a(4) > 10^13, if it exists. - Giovanni Resta, May 30 2020

Examples

			672 is a term since A033880(672) = sigma(672) - 2*672 = 2016 - 1344 = 672, and A033879(673) = 2*673 - sigma(673) = 1346 - 674 = 672.
		

Crossrefs

Programs

  • Mathematica
    ab[n_] := DivisorSigma[1, n] - 2*n; Select[Range[6 * 10^5], ab[#] == -ab[# + 1] &]

A082731 a(n) is the smallest number k such that A033880(k)= n, or 0 if no such number exists, where A033880 is the abundance of k.

Original entry on oeis.org

6, 0, 20, 18, 12, 0, 8925, 196, 56, 0, 40, 0, 24, 0, 272, 0, 550, 100, 208, 36, 176, 0, 1312, 0, 112, 0, 80, 0, 48, 0, 945, 15376, 572, 0, 928, 0, 2205, 0, 5696, 162, 736, 1352, 9555, 0, 350, 0, 490, 0, 60, 0, 416, 72, 352, 0, 90, 0, 84, 0, 160, 968, 96, 0, 24704, 0, 108, 200
Offset: 0

Views

Author

Amarnath Murthy, Apr 14 2003

Keywords

Comments

Caution: so far a(n)=0 only indicates no k < 3*10^6 exists; nonexistence is not proved. - R. J. Mathar, Jul 26 2007
For each term listed as 0 in the Data section, there is no such k < 10^14. - Jon E. Schoenfield, Jan 12 2021

Crossrefs

Cf. A082730.

Programs

  • Maple
    A082731 := proc(n) local k; k := 1 ; while numtheory[sigma](k)-2*k <> n do k := k+1 ; if k = 3000000 then RETURN(0) ; fi ; od ; RETURN(k) ; end: seq(A082731(n),n=0..200) ; # R. J. Mathar, Nov 07 2016

Extensions

More terms from R. J. Mathar, Jul 26 2007

A182226 Abundant numbers m (in A005101) whose sum of divisors less than their abundance A033880(m) does not exceed A033880(m).

Original entry on oeis.org

18, 20, 70, 78, 88, 102, 104, 114, 138, 174, 186, 196, 222, 246, 258, 282, 318, 354, 366, 368, 402, 426, 438, 464, 474, 498, 534, 582, 606, 618, 642, 650, 654, 678, 762, 786, 822, 834, 836, 894, 906, 942, 978, 1002, 1014, 1038, 1074, 1086, 1146, 1158, 1182, 1194, 1266, 1338, 1362, 1374, 1398
Offset: 1

Views

Author

M. F. Hasler, Apr 19 2012

Keywords

Comments

Complement of A182225 in A005101.

Programs

  • Mathematica
    aQ[n_] := (ab = DivisorSigma[1, n] - 2 n) > 0 && DivisorSum[n, # &, # < ab &] <= ab; Select[Range[1400], aQ] (* Amiram Eldar, Sep 08 2019 *)
  • PARI
    for(n=1,1999,sigma(n)>2*n||next;is_A182225(n)||print1(n","))

A371921 The number of iterations of the map x -> A033880(x) starting at n until the a nonpositive number is reached, or 0 if this does not happen.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1, 3, 1, 1, 1
Offset: 1

Views

Author

Amiram Eldar, Apr 12 2024

Keywords

Comments

Analogous to A098007 with A033880(n) = sigma(n) - 2*n instead of A001065(n) = sigma(n) - n.

Examples

			a(n) = 0 if the iterations that start at n are entering a cycle. Examples of cycles are:
  1) Cycles of length 1: the triperfect numbers (A005820), 120, 672, 523776, ..., which are the fixed points of A033880. The triperfect numbers can be reached from other values of n, e.g., 276, 448, 486, 510, 702, ... .
  2) Cycles of length 2: the only known cycle is (45840, 51168) (see A069085). It can be reached from other values of n, e.g., 32130, 39420, 45480, 66300, ... .
  3) Cycles of length 3: the least cycle is (243732672, 271303776, 256786848). It is first reached from n = 107689320.
  4) Cycles of length 4: the least cycle is (65071776, 82842816, 89761152, 77260656). It can be reached from other values of n, e.g., 33623940, 41132280, 42825888, ... . The next cycle of length 4 is (985948800, 1381340160, 2183133696, 1489384608).
		

Crossrefs

Programs

  • Mathematica
    ab[n_] := Module[{k}, If[n < 1, 0, k = DivisorSigma[1, n] - 2*n; If[k < 1, 0, k]]]; a[n_] := Module[{s = NestWhileList[ab, n, UnsameQ, All]}, If[s[[-1]] == 0, Length[s] - 2, 0]]; Array[a, 120]
  • PARI
    ab(n) = {my(k); if(n < 1, 0, k = sigma(n) - 2*n; if(k < 1, 0, k));}
    a(n) = {my(t = 0); until(bittest(t, n = ab(n)), t += 1<M. F. Hasler at A098007

Formula

a(n) = 1 if and only if n is nonabundant (A263837).
If a(n) > 0 then:
a(n) > 1 if n is abundant (A005101).
a(n) > 2 if n is in A371920.

A124109 Numbers whose abundance (A033880) or deficiency (A033879) is a semiprime number.

Original entry on oeis.org

5, 7, 11, 12, 14, 15, 21, 23, 26, 27, 34, 35, 39, 40, 44, 47, 52, 55, 57, 58, 59, 63, 65, 68, 70, 72, 74, 75, 77, 80, 82, 83, 85, 88, 93, 98, 107, 110, 115, 116, 119, 122, 125, 129, 133, 143, 144, 152, 155, 160, 162, 164, 167, 169, 171, 178, 179, 183, 185, 187, 189
Offset: 1

Views

Author

Jonathan Vos Post, Nov 26 2006

Keywords

Comments

If p is prime, then the only divisors of p are 1 and p, so sigma(p) = p + 1 and abundance(p) = abs(sigma(p) - 2*p) = abs((p+1) - 2*p) = abs(1-p) = p-1. Hence this sequence includes all values of the sequence of the primes which are one more than semiprimes. This is identical to A005385 Safe primes p: (p-1)/2 is also prime [then (p-1)/2 is called a Sophie Germain prime: see A005384] since as Zak Seidov commented, this is identical to primes p such that p-1 is a semiprime]. But the current sequence also contains composites, such as a(4) = 12, a(5) = 14, a(6) = 15 and a(7) = 21. If k = p*q is a semiprime (with p and q distinct primes) then the only divisors of k are 1, p, q and p*q, so sigma(k) = 1 + p + q + p*q and abs(abundance(k)) = abs(1 + p + q + p*q - p*q) = abs(1 + p + q) and these are in the sequence if 1 + p + q is semiprime. Note that numbers can be in the sequence which are neither prime nor semiprime, starting with a(4) = 12 and a(10) = 27.

Examples

			a(1) = 5 because abs(sigma(5) - 2*5) = abs(6-10) = abs(-4) = 4 = 2^2 is semiprime.
a(2) = 7 because abs(sigma(7) - 2*7) = abs(8-14) = abs(-6) = 6 = 2 * 3 is semiprime.
a(3) = 11 because abs(sigma(11) - 2*11) = abs(12-22) = abs(-10) = 10 = 2 * 5 is semiprime.
a(4) = 12 because abs(sigma(12) - 2*12) = abs(28-24) = abs(-4) = 4 = 2^2 is semiprime.
a(5) = 14 because abs(sigma(14) - 2*14) = abs(24-28) = abs(+4) = 4 = 2^2 is semiprime.
a(6) = 15 because abs(sigma(15) - 2*15) = abs(24-30) = abs(-6) = 6 = 2 * 3 is semiprime.
a(7) = 21 because abs(sigma(21) - 2*21) = abs(32-42) = abs(-10) = 10 = 2 * 5 is semiprime.
a(8) = 23 because abs(sigma(23) - 2*23) = abs(24-46) = abs(-22) = 22 = 2 * 11 is semiprime.
		

Crossrefs

Programs

  • Mathematica
    semiPrimeQ[n_] := Plus @@ Last /@ FactorInteger@n == 2; Select[ Range@ 193, semiPrimeQ@Abs[DivisorSigma[1, # ] - 2# ] &] (* Robert G. Wilson v *)

Formula

Abs[sigma(a(n)) - 2*a(n)] is a semiprime, where sigma(k) = sum of divisors of k. {Abs[sigma(a(n)) - 2*a(n)]} is in A001358.

Extensions

More terms from Robert G. Wilson v, Nov 29 2006

A182142 Abundance d = sigma(N) - 2*N = A033880(N) of numbers N = A153501(n), i.e., N has d > 0 as divisor.

Original entry on oeis.org

4, 3, 2, 12, 10, 8, 4, 2, 120, 7, 56, 78, 8, 2, 2, 672, 32, 16, 4, 2, 532, 152, 136, 8, 68, 31, 992, 128, 8, 64, 32, 16, 4, 8, 128, 32, 8, 2, 43648, 2528, 32, 4, 2, 523776, 32, 2272, 32, 32, 127, 16256, 32, 32, 4, 536, 8, 32, 8, 52, 16, 32, 41044, 64
Offset: 1

Views

Author

M. F. Hasler, Apr 14 2012

Keywords

Comments

It is conjectured that only powers of 2 can occur more than once.
Thanks to Amiram Eldar, reference to A181595 in the definition has been corrected to A153501 (which does include triperfect numbers, as required here, in contrast to A181595 where these are excluded). - M. F. Hasler, Sep 11 2019

Crossrefs

Programs

  • PARI
    f182142(n)={my(d=sigma(n)-2*n); d>0 && !(n%d) && return(d)} /* Note: This is A033880(n)*is_A153501(n), neither A182142 nor is_A182142. */
    for(n=1,1e6,(t=f182142(n))&&print1(t","))

Formula

Equals A033880 o A153501.
Showing 1-10 of 129 results. Next