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-4 of 4 results.

A103977 Zumkeller deficiency of n: Let d_1 ... d_k be the divisors of n. Then a(n) = min_{ e_1 = +-1, ... e_k = +-1 } | Sum_i e_i d_i |.

Original entry on oeis.org

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

Views

Author

Yasutoshi Kohmoto, Jan 01 2007

Keywords

Comments

Like the ordinary deficiency (A033879) obtains 0's only at perfect numbers (A000396), the Zumkeller deficiency obtains 0's only at integer-perfect numbers, A083207. See the formula section. Unlike the ordinary deficiency, this obtains only nonnegative values. See A378600 for another version. - Antti Karttunen, Dec 03 2024

Examples

			a(6) = 1 + 2 + 3 - 6 = 0.
		

Crossrefs

Cf. A125732, A125733, A005835, A023196, A033879, A083206, A083207 (positions of 0's), A263837, A378643 (Dirichlet inverse), A378644 (Möbius transform), A378645, A378646, A378647 (an analog of A000027), A378648 (an analog of sigma), A378649 (an analog of Euler phi), A379503 (positions of 1's), A379504, A379505.
Cf. A378600 (signed variant).
Cf. also A058377, A119347.

Programs

  • Maple
    A103977 := proc(n) local divs,a,acandid,filt,i,p,sigs ; divs := convert(numtheory[divisors](n),list) ; a := add(i,i=divs) ; for sigs from 0 to 2^nops(divs)-1 do filt := convert(sigs,base,2) ; while nops(filt) < nops(divs) do filt := [op(filt), 0] ; od ; acandid := 0 ; for p from 0 to nops(divs)-1 do if op(p+1,filt) = 0 then acandid := acandid-op(p+1,divs) ; else acandid := acandid+op(p+1,divs) ; fi ; od: acandid := abs(acandid) ; if acandid < a then a := acandid ; fi ; od: RETURN(a) ; end: seq(A103977(n),n=1..80) ; # R. J. Mathar, Nov 27 2007
    # second Maple program:
    a:= proc(n) option remember; local l, b; l, b:= [numtheory[divisors](n)[]],
          proc(s, i) option remember; `if`(i<1, s,
            min(b(s+l[i], i-1), b(abs(s-l[i]), i-1)))
          end: b(0, nops(l))
        end:
    seq(a(n), n=1..80);  # Alois P. Heinz, Dec 05 2024
  • Mathematica
    a[n_] := Module[{d = Divisors[n], c, p, m}, c = CoefficientList[Product[1 + x^i, {i, d}], x]; p = -1 + Position[c, ?(# > 0 &)] // Flatten; m = Length[p]; If[OddQ[m], If[(d = p[[(m + 1)/2]] - p[[(m - 1)/2]]) == 1, 0, d], p[[m/2 + 1]] - p[[m/2]]]]; Array[a, 100] (* _Amiram Eldar, Dec 11 2019 *)
  • PARI
    nonzerocoefpositions(p) = { my(v=Vec(p), lista=List([])); for(i=1,#v,if(v[i], listput(lista,i))); Vec(lista); }; \\ Doesn't need to be 0-based, as we use their differences only.
    A103977(n) = { my(p=1); fordiv(n, d, p *= (1 + 'x^d)); my(plist=nonzerocoefpositions(p), m = #plist, d); if(!(m%2), plist[1+(m/2)]-plist[m/2], d = plist[(m+1)/2]-plist[(m-1)/2]; if(1==d,0,d)); }; \\ Antti Karttunen, Dec 03 2024, after Mathematica-program by Amiram Eldar

Formula

If n=p (prime), then a(n)=p-1. If n=2^m, then a(n)=1. [Corrected by R. J. Mathar, Nov 27 2007]
a(n) = 0 iff n is a Zumkeller number (A083207). - Amiram Eldar, Jan 05 2020
From Antti Karttunen, Dec 03 2024: (Start)
a(n) = A033879(n) iff n is a non-abundant number (A263837).
a(n) = abs(A378600(n)).
a(n) = 2*A378647(n) - A378648(n). [Analogously to A033879(n) = 2*n - sigma(n)]
a(n) = 0 <=> A083206(n) > 0.
(End)
a(p^e) = p^e - (1+p+...+p^(e-1)) = (p^e*(p-2) + 1)/(p-1) for prime p. - Jianing Song, Dec 05 2024
a(n) = 1 <=> A379504(n) > 0. - Antti Karttunen, Jan 07 2025

Extensions

More terms from R. J. Mathar, Nov 27 2007
Name "Zumkeller deficiency" coined by Antti Karttunen, Dec 03 2024

A156942 Odd abundant numbers whose abundance is odd.

Original entry on oeis.org

11025, 99225, 245025, 275625, 342225, 540225, 893025, 1334025, 1863225, 2205225, 2480625, 3080025, 3186225, 3980025, 4601025, 4862025, 5832225, 6125625, 6890625, 7868025, 8037225, 8555625, 9272025, 9828225, 10595025, 10989225
Offset: 1

Views

Author

Robert G. Wilson v, Feb 18 2009

Keywords

Comments

Number of terms <10^n: 0, 0, 0, 0, 2, 7, 24, 83, 250, 792, 2484, 7988, 25383, 80082, ..., . Not all are a multiple of 25, i.e.; 81162081 = 9009^2 = (9*7*11*13)^2. See A156943.
Any term must be an odd square. Square roots are in A174830.
Indeed, the sum of divisors of any number isn't odd unless it's a square or twice a square (A028982), and to get the abundance, twice the number is subtracted, so the parity remains the same. - M. F. Hasler, Jan 26 2020
Question: Is this a subsequence of A379503? (Is A379504(a(n)) > 0 for all n? See A379951). The first 15000 terms are all included there. - Amiram Eldar and Antti Karttunen, Jan 06 2025
Question 2: Is A379505(a(n)) > 1 for all n, especially if there are no quasiperfect numbers (numbers k such that sigma(k) = 2k+1)? - Antti Karttunen, Jan 06 2025
From Amiram Eldar, Jan 16 2025: (Start)
The least term that is not divisible by 5 is a(75) = 81162081.
The least term that is not divisible by 3 is a(296889) = 1382511906801025.
The least term that is coprime to 15 is 15285071557677427358507559514565648611799881. (End)

Crossrefs

Subsequences: A156943, A325311 (thus also A379490), A347890, A379949 (terms that are primitive abundant).

Programs

  • Mathematica
    fQ[n_] := Block[{ds = DivisorSigma[1, n] - 2 n}, ds > 0 && OddQ@ ds]; Select[ Range[1, 12006223, 2], fQ @# &]
  • PARI
    is(n)=my(s=sigma(n)); n%2 && s>2*n && (s-2*n)%2 \\ Charles R Greathouse IV, Feb 21 2017

Formula

a(n) = A174830(n)^2. - M. F. Hasler, Jan 26 2020

Extensions

Edited by Robert G. Wilson v at the suggestion of T. D. Noe, Mar 30 2010

A379504 a(n) is the number of ways of partitioning the divisors of n into two disjoint sets with equal sum, when an extra 1-divisor is added to the divisor set, and the two 1-divisors are considered distinct from each other.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Antti Karttunen, Jan 06 2025

Keywords

Comments

A379505 is a variant where two 1's are considered indistinguishable. See comments there.

Examples

			a(18) = 2 as its divisor set with an extra 1 is [1_a, 1_b, 2, 3, 6, 9, 18], and this can be partitioned to two sets with equal sums either as 1_a+1_b+3+6+9 = 2+18 or as 2+3+6+9 = 1_a+1_b+18.
a(36) = 8 as its divisor set with an extra 1 is [1_a, 1_b, 2, 3, 4, 6, 9, 12, 18, 36], and this can be partitioned in any of the following ways:
   1_a + 1_b + 2 + 6 + 36    = 3 + 4 + 9 + 12 + 18,
   1_a + 2 + 3 + 4 + 36      = 1_b + 9 + 6 + 12 + 18,
   1_b + 2 + 3 + 4 + 36      = 1_a + 9 + 6 + 12 + 18,
   1_a + 3 + 6 + 36          = 1_b + 2 + 4 + 9 + 12 + 18,
   1_b + 3 + 6 + 36          = 1_a + 2 + 4 + 9 + 12 + 18,
   1_a + 9 + 36              = 1_b + 2 + 3 + 4 + 6 + 12 + 18,
   1_b + 9 + 36              = 1_a + 2 + 3 + 4 + 6 + 12 + 18,
   4 + 6 + 36                = 1_a + 1_b + 2 + 3 + 9 + 12 + 18,
where each sum on the left and right hand side gives (sigma(36)+1)/2 = 46.
		

Crossrefs

Cf. A083206, A103977, A156942, A379502, A379503 (positions of nonzero terms), A379505 (variant where two 1's are considered indistinguishable).
Cf. A000079 (conjectured to give the positions of 1's).

Programs

  • PARI
    partitions_into_distinct_parts(n, parts, from=1) = if(!n, 1, if(from>#parts, 0, my(s=0); for(i=from, #parts, if(parts[i]<=n, s += partitions_into_distinct_parts(n-parts[i], parts, i+1))); (s)));
    A379504(n) = if(!issquare(n) && !issquare(2*n), 0, my(divs=concat(1,divisors(n)), s=sigma(n)); partitions_into_distinct_parts((s+1)/2, vecsort(divs,,4))/2);
    
  • PARI
    A379504(n) = if(!issquare(n) && !issquare(2*n), 0, my(p=('x^1 + 'x^-1)); fordiv(n, d, p *= ('x^d + 'x^-d)); (polcoeff(p, 0)/2)); \\ Faster program, after code in A083206.

Formula

a(n) >= A379505(n).
A103977(n) = 1 <=> a(n) > 0.

A379490 Odd squares s such that 2*s is equal to bitwise-AND of 2*s and sigma(s).

Original entry on oeis.org

399736269009, 1013616036225, 1393148751631700625, 2998748839068013955625, 3547850289210724050225
Offset: 1

Views

Author

Antti Karttunen, Jan 13 2025

Keywords

Comments

If there are any quasiperfect numbers, i.e., numbers x for which sigma(x) = 2*x+1, then they should occur also in this sequence.
Square roots of these terms are: 632247, 1006785, 1180317225, 54760833075, 59563833735.
Question: Are there any solutions to similar equations "Odd squares s such that 2*s is equal to bitwise-AND of 2*s and A001065(s)" and "Odd squares s such that 3*s is equal to bitwise-AND of 3*s and sigma(s)"? Such sequences would contain odd triperfect numbers, if they exist (cf. A005820, A347391, A347884). - Antti Karttunen, Aug 19 2025
a(6) > 4*10^21. - Giovanni Resta, Aug 19 2025

Crossrefs

Odd squares in A324647.
Intersection of A016754 and A324647.
Subsequence of A325311, which is a subsequence of A005231.
Cf. also A336700, A336701, A337339, A337342, A348742, A379474, A379503, A379505, A379949 for other conditions that quasiperfect numbers should satisfy.

Programs

  • PARI
    k=0; forstep(n=1,oo,2, if(!((n-1)%(2^27)),print1("("n")")); if(!isprime(n) && omega(n)>=3, f = factor(n); sq=n^2; sig=prod(i=1,#f~,((f[i,1]^(1+(2*f[i,2])))-1) / (f[i,1]-1)); if(((2*sq)==bitand(2*sq, sig)), k++; print1(sq,", "))));

Extensions

a(4) and a(5) from Giovanni Resta, Aug 19 2025
Showing 1-4 of 4 results.