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.

A360639 Numbers k such that k and k+2 are both A000120-perfect numbers (A175522).

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Feb 15 2023

Keywords

Comments

The smallest gap between two consecutive A000120-perfect numbers is 2.
All terms of this sequence are odd.

Examples

			123 is a term since 123 and 125 are both in A175522: A093653(123)/A000120(123) = A093653(125)/A000120(125) = 12/6 = 2.
		

Crossrefs

Subsequence of A175522.

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