Skip to main content
deleted 6 characters in body
Source Link
randomra
  • 20.9k
  • 4
  • 46
  • 111

J, 14 chars

This is just hardcodinghardcodes the [1,2, 4+3*k (k=0..n-1) ] sequence and takes the first N.

   ({.1,2,4+3*i.) 10
1 2 4 7 10 13 16 19 22 25

. J, 18 chars

This one uses thea linear combination of [0,1,2,3...], [1,1,0,0...] and [0,1,1,1...]. Should be shorter but can't seem to golf it.

   ((3&*+<&2-2**)@i.) 10
1 2 4 7 10 13 16 19 22 25

J, 14 chars

This is just hardcoding the [1,2, 4+3*k (k=0..n-1) ] sequence and takes the first N.

   ({.1,2,4+3*i.) 10
1 2 4 7 10 13 16 19 22 25

. J, 18 chars

This one uses the linear combination of [0,1,2,3...], [1,1,0,0...] and [0,1,1,1...]. Should be shorter but can't seem to golf it.

   ((3&*+<&2-2**)@i.) 10
1 2 4 7 10 13 16 19 22 25

J, 14 chars

This just hardcodes the [1,2, 4+3*k (k=0..n-1) ] sequence and takes the first N.

   ({.1,2,4+3*i.) 10
1 2 4 7 10 13 16 19 22 25

. J, 18 chars

This one uses a linear combination of [0,1,2,3...], [1,1,0,0...] and [0,1,1,1...]. Should be shorter but can't seem to golf it.

   ((3&*+<&2-2**)@i.) 10
1 2 4 7 10 13 16 19 22 25
added 2 characters in body
Source Link
randomra
  • 20.9k
  • 4
  • 46
  • 111

J, 14 chars

This is just hardcoding the [1,2, 4+3*k (k=0..n-1) ] sequence and takes the first N.

   ({.1,2,4+3*i.) 10
1 2 4 7 10 13 16 19 22 25

. J, 18 chars

This one uses the linear combination of [0,1,2,3...], [1,1,0,0...] and [0,1,1,1...]. Should be shorter but can't seem to golf it.

   ((3&*+<&2-2**)@i.) 10
1 2 4 7 10 13 16 19 22 25

J, 14 chars

This is just hardcoding the [1,2, 4+3*k (k=0..n) ] sequence and takes the first N.

   ({.1,2,4+3*i.) 10
1 2 4 7 10 13 16 19 22 25

. J, 18 chars

This one uses the linear combination of [0,1,2,3...], [1,1,0,0...] and [0,1,1,1...]. Should be shorter but can't seem to golf it.

   ((3&*+<&2-2**)@i.) 10
1 2 4 7 10 13 16 19 22 25

J, 14 chars

This is just hardcoding the [1,2, 4+3*k (k=0..n-1) ] sequence and takes the first N.

   ({.1,2,4+3*i.) 10
1 2 4 7 10 13 16 19 22 25

. J, 18 chars

This one uses the linear combination of [0,1,2,3...], [1,1,0,0...] and [0,1,1,1...]. Should be shorter but can't seem to golf it.

   ((3&*+<&2-2**)@i.) 10
1 2 4 7 10 13 16 19 22 25
added 262 characters in body
Source Link
randomra
  • 20.9k
  • 4
  • 46
  • 111

J, 14 chars

This is just hardcoding the [1,2, 4+3*k (k=0..n) ] sequence and takes the first N.

   ({.1,2,4+3*i.) 10
1 2 4 7 10 13 16 19 22 25

. J, 18 chars

This shouldone uses the linear combination of [0,1,2,3...], [1,1,0,0...] and [0,1,1,1...]. Should be shorter... trying but can't seem to golf moreit.

   ((3&*+<&2-2**)@i.) 10
1 2 4 7 10 13 16 19 22 25

J, 18 chars

This should be shorter... trying to golf more.

   ((3&*+<&2-2**)@i.) 10
1 2 4 7 10 13 16 19 22 25

J, 14 chars

This is just hardcoding the [1,2, 4+3*k (k=0..n) ] sequence and takes the first N.

   ({.1,2,4+3*i.) 10
1 2 4 7 10 13 16 19 22 25

. J, 18 chars

This one uses the linear combination of [0,1,2,3...], [1,1,0,0...] and [0,1,1,1...]. Should be shorter but can't seem to golf it.

   ((3&*+<&2-2**)@i.) 10
1 2 4 7 10 13 16 19 22 25
Source Link
randomra
  • 20.9k
  • 4
  • 46
  • 111
Loading