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.

A357840 Numbers k in A018900 with arithmetic derivative k' (A003415) in A018900.

Original entry on oeis.org

6, 9, 20, 40, 65, 68, 96, 144, 192, 528, 576, 1028, 4097, 73728, 81920, 262148, 557056, 6291456, 9437184, 12582912, 201326592, 335544320, 2415919104, 1374389534720, 11258999068426240, 90071992547409920, 648518346341351424, 78398662313265594368, 116056878683004400771792896
Offset: 1

Views

Author

Marius A. Burtea, Oct 20 2022

Keywords

Comments

Numbers with Hamming weight 2 that have the arithmetic derivative with Hamming weight 2.
If p is in A019434 then m = 4*p is a term. Indeed p = 2^k + 1 and m' = 4*p + 4 = 4 (p + 1) = 4*(2^k + 2) = 8*(2^(k - 1) +1) = 2^(k + 2) + 2^3 and m, m' have only two of 1 in the expansion binary.
Numbers of the form m = 5*2^s, where s = (16^k - 1)/5, s >= 1, are terms. Indeed m = 4*2^s + 2^s = 2^(s + 2) + 2^s and m' = 2^s + 5*s*2^(s - 1) = 2^(s - 1)*(5*s + 2) = 2^(s - 1)*(16^k + 1) = 2^(4*k + s - 1) + 2^(s - 1), so m is a term.
Numbers of the form m = 3*2^s, where s = (4^k - 1)/3, s >= 1, are terms. Indeed m = 2*2^s + 2^s = 2^(s + 1) + 2^s and m' = 2^s + 3*s*2^(s - 1) = 2^(s - 1)*(3*s + 2) = 2^(s - 1)*(4^k + 1) = 2^(2*k + s - 1) + 2^(s - 1), so m is a term.

Examples

			6 = 110_2 = 2^2 + 2^1 and 6' = 5 = 101_2 = 2^2 + 2^0, so 6 is a term.
9 = 1001_2 = 2^3 + 2^0 and 9' = 6 = 110_2, so 9 is a term.
20 = 10100_2 = 2^4 + 2^2 and 20' = 24 = 11000_2 = 2^4 + 2^3, so 20 is a term.
		

Crossrefs

Programs

  • Magma
    f1:=func; f:=func; a:=[]; for n in [1..75] do sn:=[2^n+2^k: k in [0..n-1]]; for i in [1..#sn] do if f1(sn[i]) and f1(Floor(f(sn[i]))) then Append(~a,sn[i]); end if; end for; end for; a;
    
  • Mathematica
    d[0] = d[1] = 0; d[n_] := n*Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); Select[Union[Plus @@@ (2^Subsets[Range[0, 86], {2}])], Count[IntegerDigits[d[#], 2], 1] == 2 &] (* Amiram Eldar, Oct 21 2022 *)
  • PARI
    ish2(n) = hammingweight(n)==2; \\ A018900
    ad(n) = vecsum([n/f[1]*f[2]|f<-factor(n+!n)~]); \\ A003415
    isok(m) = ish2(m) && ish2(ad(m)); \\ Michel Marcus, Oct 23 2022