Skip to main content
Commonmark migration
Source Link

#Mathematica, 30 27 bytes

Mathematica, 30 27 bytes

0//.i_/;(i+1)∣(#+i):>i+1&

An unnamed function that takes an integer argument.

Try it on Wolfram Sandbox

Usage:

0//.i_/;(i+1)∣(#+i):>i+1&[2521]

10

#Mathematica, 30 27 bytes

0//.i_/;(i+1)∣(#+i):>i+1&

An unnamed function that takes an integer argument.

Try it on Wolfram Sandbox

Usage:

0//.i_/;(i+1)∣(#+i):>i+1&[2521]

10

Mathematica, 30 27 bytes

0//.i_/;(i+1)∣(#+i):>i+1&

An unnamed function that takes an integer argument.

Try it on Wolfram Sandbox

Usage:

0//.i_/;(i+1)∣(#+i):>i+1&[2521]

10

added 69 characters in body
Source Link
JungHwan Min
  • 13.9k
  • 3
  • 23
  • 69

#Mathematica, 30 27 bytes

0//.i_/;(i+1)∣(#+i):>i+1&

An unnamed function that takes an integer argument.

Try it on Wolfram Sandbox

Usage:

0//.i_/;(i+1)∣(#+i):>i+1&[2521]

10

#Mathematica, 30 27 bytes

0//.i_/;(i+1)∣(#+i):>i+1&

An unnamed function that takes an integer argument.

#Mathematica, 30 27 bytes

0//.i_/;(i+1)∣(#+i):>i+1&

An unnamed function that takes an integer argument.

Try it on Wolfram Sandbox

Usage:

0//.i_/;(i+1)∣(#+i):>i+1&[2521]

10

added 55 characters in body
Source Link
JungHwan Min
  • 13.9k
  • 3
  • 23
  • 69

#Mathematica, 3030 27 bytes

0//.i_/;(For[x=0;y=#,++x∣y++,];--xi+1)&∣(#+i):>i+1&

An unnamed function that takes an integer argument.

#Mathematica, 30 bytes

(For[x=0;y=#,++x∣y++,];--x)&

#Mathematica, 30 27 bytes

0//.i_/;(i+1)∣(#+i):>i+1&

An unnamed function that takes an integer argument.

Source Link
JungHwan Min
  • 13.9k
  • 3
  • 23
  • 69
Loading