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.

Previous Showing 11-16 of 16 results.

A383366 Smallest of a sociable triple i < j < k such that j = s(i), k = s(j), and i = s(k), where s(k) = A380845(k) - k is the sum of aliquot divisors of k that have the same binary weight as k.

Original entry on oeis.org

4400700, 12963816, 29878920, 38353800, 44973480, 51894304, 52208520, 67849656, 73134432, 81685080, 100711656, 103759848, 105096096, 113044896, 113161320, 114608032, 128639034, 135465912, 135559080, 136786200, 139242740, 148758120, 156686088, 159628350, 171090416
Offset: 1

Views

Author

Amiram Eldar, Apr 24 2025

Keywords

Examples

			4400700 is a term since s(4400700) = 4840770, s(4840770) = 5456868, and s(5456868) = 4400700.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Module[{h = DigitCount[n, 2, 1]}, DivisorSum[n, # &, # < n && DigitCount[#, 2, 1] == h &]]; q[k_] := Module[{k1 = f[k], k2}, If[k1 <= k, False, k2 = f[k1]; k2 > k && f[k2] == k]]; Select[Range[13000000], q]
  • PARI
    f(n) = {my(h = hammingweight(n)); sumdiv(n, d, d * (d < n && hammingweight(d) == h)); }
    isok(k) = {my(k1 = f(k), k2); if(k1 <= k, 0, k2 = f(k1); k2 > k && f(k2) == k);}

A380844 The number of divisors of n that have the same binary weight as n.

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 1, 4, 2, 2, 1, 3, 1, 2, 1, 5, 1, 4, 1, 3, 2, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 6, 2, 2, 2, 6, 1, 2, 1, 4, 1, 4, 1, 3, 2, 2, 1, 5, 2, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 7, 2, 4, 1, 3, 1, 4, 1, 8, 1, 2, 2, 3, 1, 2, 1, 5, 1, 2, 1, 6, 1, 2, 1
Offset: 1

Views

Author

Amiram Eldar, Feb 05 2025

Keywords

Comments

First differs from A325565 at n = 133: a(133) = 3 while A325565(133) = 2.
The sum of these divisors is A380845(n).

Examples

			a(6) = 2 because 6 = 110_2 has binary weight 2, and 2 of its divisors, 3 = 11_2 and 6, have the same binary weight.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{h = DigitCount[n, 2, 1]}, DivisorSum[n, 1 &, DigitCount[#, 2, 1] == h &]]; Array[a, 100]
  • PARI
    a(n) = {my(h = hammingweight(n)); sumdiv(n, d, hammingweight(d) == h);}

Formula

a(n) = Sum_{d|n} [A000120(d) = A000120(n)], where [ ] is the Iverson bracket.
a(2^n) = n+1.
a(n) <= A000005(n) with equality if and only if n is a power of 2.
a(n) = a(A000265(n)) * (A007814(n)+1), or equivalently, a(k*2^n) = a(k)*(n+1) for k odd and n >= 0.
In particular, since a(p) = 1 for an odd prime p, a(p*2^n) = n+1 for an odd prime p and n >= 0.
a(A000396(n)) = A000043(n), assuming that odd perfect numbers do no exist.

A381071 Numbers k such that the sum of the proper divisors of k that have the same binary weight as k is larger than k, and no subset of these divisors sums to k.

Original entry on oeis.org

1050, 3150, 4284, 4410, 5148, 6292, 6790, 7176, 8890, 10764, 17850, 18648, 19000, 19530, 32886, 33072, 33150, 35088, 35530, 35720, 35770, 38850, 41360, 43164, 45084, 49368, 49764, 50456, 50730, 52884, 54280, 54340, 58410, 58696, 59010, 59408, 63492, 66010, 68376
Offset: 1

Views

Author

Amiram Eldar, Feb 13 2025

Keywords

Comments

Analogous to weird numbers (A006037), as A380846 is analogous to perfect numbers (A000396).

Crossrefs

Subsequence of A380929.
A381072 is a subsequence.

Programs

  • Mathematica
    divs[n_] := Module[{hw = DigitCount[n, 2, 1]}, Select[Divisors[n], DigitCount[#, 2, 1] == hw &]];
    weirdQ[n_, d_, s1_, m1_] :=  weirdQ[n, d, s1, m1] = Module[{s = s1, m = m1}, If[m == 0, False, While[m > 0 && d[[m]] > n, s -= d[[m]]; m--]; If[m == 0, True, d[[m]] < n && If[s > n, weirdQ[n - d[[m]], d, s - d[[m]], m - 1] && weirdQ[n, d, s - d[[m]], m - 1], s < n && m < Length[d] - 1]]]];
    q[n_] := Module[{d = divs[n], s, m}, s = Total[d] - n; m = Length[d] - 1; weirdQ[n, d, s, m]]; Select[Range[70000], q] (* based on a Pari code by M. F. Hasler at A006037 *)
  • PARI
    divs(n) = {my(h = hammingweight(n)); select(x -> hammingweight(x)==h, divisors(n));}
    is(n, d = divs(n), s = vecsum(d)-n, m = #d-1) = {if(m == 0, return(0)); while(m > 0 && d[m] > n, s -= d[m]; m--); if(m==0, return(1)); (d[m] < n &&
    if(s > n, is(n-d[m], d, s-d[m], m-1) && is(n, d, s-d[m], m-1), s < n && m < #d-1));} \\ based on a code by M. F. Hasler at A006037

A381073 Numbers k such that k and k+2 are both terms in A380846.

Original entry on oeis.org

8596, 9772, 10444, 17836, 19626, 21196, 23716, 27186, 35754, 36484, 38164, 42700, 45892, 54796, 56586, 85708, 91252, 98586, 100770, 104970, 112698, 132412, 136612, 139074, 140980, 141652, 144676, 149716, 152850, 165172, 166122, 171724, 182032, 182644, 184770, 190482
Offset: 1

Views

Author

Amiram Eldar, Feb 13 2025

Keywords

Comments

Numbers k such that A380845(k) = 2*k and A380845(k+2) = 2*(k+2).

Crossrefs

Subsequence of A380846.
A381074 is a subsequence.
Cf. A380845.

Programs

  • Mathematica
    f[n_] := Module[{h = DigitCount[n, 2, 1]}, DivisorSum[n, # &, DigitCount[#, 2, 1] == h &] == 2*n]; seq[lim_] := Module[{q = Table[False, {4}], s = {}}, q[[1 ;; 2]] = f /@ Range[2]; Do[q[[3 ;; 4]] = f /@ Range[k, k + 1]; If[q[[1]] && q[[3]], AppendTo[s, k - 2]]; If[q[[2]] && q[[4]], AppendTo[s, k - 1]]; q[[1 ;; 2]] = q[[3 ;; 4]], {k, 3, lim, 2}]; s]; seq[50000]
  • PARI
    is1(k) = {my(h = hammingweight(k)); sumdiv(k, d, d*(hammingweight(d) == h)) == 2*k;}
    list(lim) = {my(q1 = is1(1), q2 = is1(2), q3, q4); forstep(k = 3, lim, 2, q3 = is1(k); q4 = is1(k+1); if(q1 && q3, print1(k-2, ", ")); if(q2 && q4, print1(k-1, ", ")); q1 = q3; q2 = q4);}

A381074 Numbers k such that k, k+2 and k+4 are all terms in A380846.

Original entry on oeis.org

10820236, 24069388, 27802288, 39297580, 50717488, 56362960, 73070224, 97339504, 103605964, 112209580, 112526032, 140053564, 145315600, 155790124, 156415084, 158877232, 184667248, 185979664, 188913004, 189225484, 189541936, 224435536, 281740396, 292406380, 314388112
Offset: 1

Views

Author

Amiram Eldar, Feb 13 2025

Keywords

Comments

Numbers k such that A380845(k) = 2*k, A380845(k+2) = 2*(k+2), and A380845(k+4) = 2*(k+4).

Crossrefs

Subsequence of A380846 and A381073.
Cf. A380845.

Programs

  • Mathematica
    f[n_] := Module[{h = DigitCount[n, 2, 1]}, DivisorSum[n, # &, DigitCount[#, 2, 1] == h &] == 2*n]; seq[lim_] := Module[{q = Table[False, {6}], s = {}}, q[[1 ;; 4]] = f /@ Range[4]; Do[q[[5 ;; 6]] = f /@ Range[k, k + 1]; If[q[[1]] && q[[3]] && q[[5]], AppendTo[s, k - 4]]; If[q[[2]] && q[[4]] && q[[6]], AppendTo[s, k - 3]]; q[[1 ;; 4]] = q[[3 ;; 6]], {k, 5, lim, 2}]; s]; seq[11000000]
  • PARI
    is1(k) = {my(h = hammingweight(k)); sumdiv(k, d, d*(hammingweight(d) == h)) == 2*k;}
    list(lim) = {my(q1 = is1(1), q2 = is1(2), q3 = is1(3), q4 = is1(4), q5, q6); forstep(k = 5, lim, 2, q5 = is1(k); q6 = is1(k+1); if(q1 && q3 && q5, print1(k-4, ", ")); if(q2 && q4 && q6, print1(k-3, ", ")); q1 = q3; q2 = q4; q3 = q5; q4 = q6);}

A380933 Numbers k such that k and k+1 are both in A380929.

Original entry on oeis.org

121643775, 157390064, 161019495, 275734304, 584899875, 1493214975, 1614323655, 2043708975, 3081783375, 3118599224, 3426851295, 3902652495, 3947893424, 5849043375, 11731509855, 12138531615, 13008843224, 14598032624, 17588484584, 19782621495, 20191564575, 20759209064
Offset: 1

Views

Author

Amiram Eldar, Feb 08 2025

Keywords

Comments

Numbers k such that A380845(k) > 2*k and A380845(k+1) > 2*(k+1).

Examples

			121643775 is a term since A380845(121643775) = 244722015 > 2 * 121643775 = 243287550, and A380845(121643776) = 256456081 > 2 * 121643776 = 243287552.
		

Crossrefs

Subsequence of A096399 and A380929.

Programs

  • Mathematica
    q[k_] := Module[{h = DigitCount[k, 2, 1]}, DivisorSum[k, # &, DigitCount[#, 2, 1] == h &] > 2*k];
    seq[lim_] := Module[{s = {}}, Do[If[q[k], If[q[k-1], AppendTo[s, k-1]]; If[q[k+1], AppendTo[s, k]]], {k, 3, lim, 2}]; s];
    seq[3*10^8]
  • PARI
    isab(k) = {my(h = hammingweight(k)); sumdiv(k, d, d*(hammingweight(d) == h)) > 2*k;}
    list(lim) = forstep(k = 3, lim, 2, if(isab(k), if(isab(k-1), print1(k-1, ", ")); if(isab(k+1), print1(k, ", "))));
Previous Showing 11-16 of 16 results.