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.

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);}