A360639 Numbers k such that k and k+2 are both A000120-perfect numbers (A175522).
123, 219, 695, 1261, 1851, 1943, 3543, 5963, 7031, 7613, 7769, 7861, 10081, 11357, 11629, 12083, 13211, 13791, 14185, 15699, 15835, 15929, 16241, 18649, 20197, 20989, 22521, 23449, 23521, 23963, 24461, 27215, 27829, 28263, 28367, 29485, 29651, 30359, 30901, 31803
Offset: 1
Examples
123 is a term since 123 and 125 are both in A175522: A093653(123)/A000120(123) = A093653(125)/A000120(125) = 12/6 = 2.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
q[n_] := DivisorSum[n, DigitCount[#, 2, 1] &] == 2 * DigitCount[n, 2, 1]; seq[kmax_] := Module[{s = {}, k = 1, q1 = False, q2}, Do[q2 = q[k]; If[q1 && q2, AppendTo[s, k-2]]; q1 = q2, {k, 3, kmax, 2}]; s]; seq[32000]
-
PARI
lista(kmax) = {my(is1 = 0, is2); forstep(k=1, kmax, 2, is2 = (sumdiv(k, d, hammingweight(d)) == 2*hammingweight(k)); if(is1 && is2, print1(k-2, ", ")); is1 = is2); }
Comments