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.

A259670 Numbers n with the property that it is possible to write the base 2 expansion of n as concat(a_2,b_2), with a_2>0 and b_2>0 such that, converting a_2 and b_2 to base 10 as a and b, we have antisigma(a) + antisigma(b) = n.

Original entry on oeis.org

50, 77, 179, 346, 347, 550, 1758, 1909, 9205, 27884, 30660, 37354, 52019, 88052, 107974, 131590, 164413, 232447, 295682, 326133, 328491, 1494561, 1541005, 1541851
Offset: 1

Views

Author

Paolo P. Lava, Jul 03 2015

Keywords

Examples

			50 in base 2 is 110010. If we take 110010 = concat(1100,10) then 1100 and 10 converted to base 10 are 12 and 2. Finally 12*13/2 - sigma(12) + 2*3/2 - sigma(2) = 78 - 28 + 3 - 3 = 50.
179 in base 2 is 1001101. If we take 1001101 = concat(11100,1) then 11100 and 1 converted to base 10 are 5 and 19. Finally 5*6/2 - sigma(5) + 19*20/2 - sigma(19) = 15 - 6 + 190 - 20 = 179.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a,b,c,j,k,n;
    for n from 1 to q do c:=convert(n,binary,decimal);
    j:=0; for k from 1 to ilog10(c) do
    a:=convert(trunc(c/10^k),decimal,binary);
    b:=convert((c mod 10^k),decimal,binary);
    if a*b>0 then if a*(a+1)/2-sigma(a)+b*(b+1)/2-sigma(b)=n then print(n);
    break; fi; fi; od; od; end: P(10^9);
  • Mathematica
    f[n_] := Block[{d = IntegerDigits[n, 2], len = IntegerLength[n, 2], k}, ReplaceAll[Reap[Do[k = {FromDigits[Take[d, i], 2], FromDigits[Take[d, -(len - i)], 2]}; If[! MemberQ[k, 0], Sow@ k], {i, 1, len - 1}]], {} -> {1}][[-1, 1]]]; Select[Range@ 100000, MemberQ[Total /@ (# (# + 1)/2 - DivisorSigma[1, #] &) /@ f@ #, #] &] (* Michael De Vlieger, Jul 03 2015 *)