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.

A376793 Numbers k such that k and k+1 are both in A376616.

Original entry on oeis.org

1, 1424, 2484, 4304, 4655, 6223, 10624, 13824, 20624, 22784, 29448, 33424, 33984, 36944, 41535, 43263, 45184, 45324, 65744, 66199, 68624, 69632, 70784, 74304, 74627, 99584, 103103, 103424, 105720, 114704, 120680, 139904, 147636, 164224, 166144, 192576, 199968
Offset: 1

Views

Author

Amiram Eldar, Oct 04 2024

Keywords

Examples

			1424 is a term since both 1424 and 1425 are in A376616: 1424/A000120(1424) = 356 and 356/A000120(356) = 89 are integers, and 1425/A000120(1425) = 285 and 285/A000120(285) = 57 are integers.
		

Crossrefs

Subsequence of A330931 and A376616.
Subsequences: A376794, A376795.
Cf. A000120.

Programs

  • Mathematica
    q[k_] := q[k] = Module[{w = DigitCount[k, 2, 1]}, Divisible[k, w] && Divisible[k/w, DigitCount[k/w, 2, 1]]]; Select[Range[20000], q[#] && q[#+1] &]
  • PARI
    is1(k) = {my(w = hammingweight(k)); !(k % w) && !((k/w) % hammingweight(k/w));}
    lista(kmax) = {my(q1 = is1(1), q2); for(k = 2, kmax, q2 = is1(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2);}