New answers tagged

2

PowerShell Core, 30 bytes for(;!($args[0]++%++$i)){}$i-1 Try it online!


0

TI-Basic, 19 bytes Input N Repeat remainder(N+Ans,Ans+1 Ans+1 End Output is stored in Ans. This only works on TI-84+/SE with the 2.53 MP OS. The below version is 2 bytes bigger but works on earlier OS's. 21 bytes Input N Repeat fPart((N+Ans)/(Ans+1 Ans+1 End


1

jq, 34 bytes . as$x|0|until((.+$x)%(1+.)>0;.+1) Try it online! jq, 40 bytes [range(.)as$x|(.+$x)%(1+$x)<1//-$x]|-max Try it online!


1

F#, 64 bytes let d n= let mutable m,l=n,1 while m%l=0 do m<-m+1;l<-l+1 l-1 Try it online! Simple explanation: let divisibilityStreak n = // Arg: 'n' let mutable l = 1 // For increase the 'divisible' number let mutable n2 = n // Another one for storing mutable 'n' while n2 % l = 0 do // While 'n' is divisible by 'l', n2 <...


2

Brachylog, 16 bytes N⁰ḋṀ{;N⁰↔÷;?%}ᵛ1 Try it online!


Top 50 recent answers are included