A381073 Numbers k such that k and k+2 are both terms in A380846.
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
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
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);}
Comments