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).

This page as a plain text file.
%I A360639 #14 Feb 16 2023 12:29:57
%S A360639 123,219,695,1261,1851,1943,3543,5963,7031,7613,7769,7861,10081,11357,
%T A360639 11629,12083,13211,13791,14185,15699,15835,15929,16241,18649,20197,
%U A360639 20989,22521,23449,23521,23963,24461,27215,27829,28263,28367,29485,29651,30359,30901,31803
%N A360639 Numbers k such that k and k+2 are both A000120-perfect numbers (A175522).
%C A360639 The smallest gap between two consecutive A000120-perfect numbers is 2.
%C A360639 All terms of this sequence are odd.
%H A360639 Amiram Eldar, <a href="/A360639/b360639.txt">Table of n, a(n) for n = 1..10000</a>
%e A360639 123 is a term since 123 and 125 are both in A175522: A093653(123)/A000120(123) = A093653(125)/A000120(125) = 12/6 = 2.
%t A360639 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]
%o A360639 (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); }
%Y A360639 Subsequence of A175522.
%Y A360639 Cf. A000120, A093653, A338452, A360640.
%K A360639 nonn,base
%O A360639 1,1
%A A360639 _Amiram Eldar_, Feb 15 2023