Skip to main content
-6
Source Link
ngn
  • 15.3k
  • 2
  • 43
  • 87

K (ngn/k)K (ngn/k), 1919 13 bytes

{+//(64#2)\'x_2\x_!1+y}

Try it online!Try it online!

{ } is a function with arguments x and y

!1+y is the list 0 1 ... y

x_ drops the first x elements

64#2 is the list 2 2 ... 2 (64 times)

(64#2)\'2\ encodes each int as a list of 64 binary digits of the same length (this is specific to ngn/k)

+/ sum

+// sum until convergence; in this case sum of the sum of all binary digit lists

K (ngn/k), 19 bytes

{+//(64#2)\'x_!1+y}

Try it online!

{ } is a function with arguments x and y

!1+y is the list 0 1 ... y

x_ drops the first x elements

64#2 is the list 2 2 ... 2 (64 times)

(64#2)\' encodes each int as a list of 64 binary digits

+/ sum

+// sum until convergence; in this case sum of the sum of all binary digit lists

K (ngn/k), 19 13 bytes

{+//2\x_!1+y}

Try it online!

{ } is a function with arguments x and y

!1+y is the list 0 1 ... y

x_ drops the first x elements

2\ encodes each int as a list of binary digits of the same length (this is specific to ngn/k)

+/ sum

+// sum until convergence; in this case sum of the sum of all binary digit lists

added 321 characters in body
Source Link
ngn
  • 15.3k
  • 2
  • 43
  • 87

K (ngn/k), 19 bytes

{+//(64#2)\'x_!1+y}

Try it online!

{ } is a function with arguments x and y

!1+y is the list 0 1 ... y

x_ drops the first x elements

64#2 is the list 2 2 ... 2 (64 times)

(64#2)\' encodes each int as a list of 64 binary digits

+/ sum

+// sum until convergence; in this case sum of the sum of all binary digit lists

K (ngn/k), 19 bytes

{+//(64#2)\'x_!1+y}

Try it online!

K (ngn/k), 19 bytes

{+//(64#2)\'x_!1+y}

Try it online!

{ } is a function with arguments x and y

!1+y is the list 0 1 ... y

x_ drops the first x elements

64#2 is the list 2 2 ... 2 (64 times)

(64#2)\' encodes each int as a list of 64 binary digits

+/ sum

+// sum until convergence; in this case sum of the sum of all binary digit lists

Source Link
ngn
  • 15.3k
  • 2
  • 43
  • 87

K (ngn/k), 19 bytes

{+//(64#2)\'x_!1+y}

Try it online!