login
Numbers k such that k and k+1 are both in A376617.
4

%I #7 Oct 05 2024 14:04:48

%S 1,10624,13824,1114112,2625664,4563999,6554624,16843904,17266688,

%T 17368064,20003840,27137024,32375160,32679360,42993664,44643599,

%U 63732096,69222464,69424640,70083584,80778752,84783104,85458944,90256383,92478000,116469899,118063231,121900544

%N Numbers k such that k and k+1 are both in A376617.

%H Amiram Eldar, <a href="/A376795/b376795.txt">Table of n, a(n) for n = 1..1000</a>

%e 10624 is a term since both 10624 and 10625 are in A376617: 10624/A000120(10624) = 2656, 2656/A000120(2656) = 664, and 664/A000120(664) = 166 are integers, and 10625/A000120(10625) = 2125, 2125/A000120(2125) = 425, and 425/A000120(425) = 85 are integers.

%t q[k_] := q[k] = Module[{w = DigitCount[k, 2, 1], w2, m, n}, IntegerQ[m = k/w] && Divisible[m, w2 = DigitCount[m, 2, 1]] && Divisible[n = m/w2, DigitCount[n, 2, 1]]]; Select[Range[1.2*10^6], q[#] && q[#+1] &]

%o (PARI) s(n) = {my(w = hammingweight(n)); if(w == 1, 0, if(n % w, 1, 1 + s(n/w)));}

%o is1(k) = {my(sk = s(k)); sk == 0 || sk >= 4;}

%o lista(kmax) = {my(q1 = is1(1), q2); for(k = 2, kmax, q2 = is1(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2);}

%Y Subsequence of A330931, A376617 and A376793.

%Y Cf. A000120.

%K nonn,base

%O 1,2

%A _Amiram Eldar_, Oct 04 2024