Search
JavaScript (Node.js), 47 bytes f=(a,b=0,c=a=>a&&1/a+c(a-1))=>c(b)<a?f(a,b+1):b Try it online! For large numbers, a rounding error will occur and yield incorrect result. The ...
Given an positive integer $n$, return the least positive integer $k$ such that the $k$th partial sum of the harmonic series is greater than or equal to $n$. For example, if $n = 2$, then $k = 4$, b...
Raku, 19 bytes (*Z*(*X**0..*)).sum Try it online! Is it concerning that my solution is over 30% asterisks? Explanation ( ).sum # Get the sum of *Z*( ) # The inp...
Raku, 33 bytes {1+(3...{($^a...&is-prime)>=$_})} Try it online! Anonymous code block that takes a number and returns a number. Explanation { } # Anony...
Husk, 8 bytes Ψḟo≥⁰≠İp Try it online! or Verify first 8 values It is always a good day when you get to use Ψ in your program. Explanation Ψḟo≥⁰≠İp İp to the infinite list of prime num...
For reference, this is the list of tags we have from SE which is 9 pages long, so I'll take the liberty of listing out which ones are "required" tags, as they are used to signify a scoring criterio...
Another approach, suggested by ArtOfCode in chat, is to create a close reason for "graduated" sandbox posts. When defining a close reason you can require a URL (this is what's used for duplicates)...
I think there should be a standard set of tabs to use in Sandbox to indicate that a post has been turned into a Challenge, and possibly for other Sandbox-specific status issues as well.
Codidact allows you to define three special types of tags: topic tags: these are treated as ordinary tags in all respects except that they're styled differently so they stand out. You can see...
As we have set up communities here on the Codidact network we've been appointing temporary moderators. Ultimately, of course, we want each community to choose its own moderators; we've been doing ...
For a small number of posts, it will be easier to create them here than to import them. Your moderators (yes we need to get some) can create new help topics, which you can link to from question po...
I haven't been involved enough in SE Code Golf to really count for much. But I do think we need to have policies stated somewhere. One advantage we have here is that once policies get reasonably fi...
Over on codegolf.stackexchange.com, we have numerous meta posts outlining loopholes answers can't break, validity of output/input methods and other rule-type posts. Some examples: https://cod...
PHP, 13 bytes Hello, World! PHP by default prints all source to output until it encounters <? or <?php.
Canvas, 19 bytes ‾-{{╷¹²-m‾-¹-m] *]/ Try it here! ‾-{{╷¹²-m‾-¹-m] *]/ Program, ascii-fied for monospacing ‾- push 28 { ] for 1…28 (pushing counter & s...
Japt -R, 27 22 bytes 27òÈn28 ÇmX27-X-ZøÃÔû Test it Lots of credit goes to xnor for finding the min(i,j,27-i-j) trick. -5 bytes thanks to @Shaggy
Dyalog APL Extended, 14 bytes {¯4⍭4⍭⍣(⍵≤-)2} Try it online! {¯4⍭4⍭⍣(⍵≤-)2} Monadic dfn 2 start with 2 ⍣ Repeat 4⍭ the function "next prime" ...
Japt, 12 bytes ÊÆgX *VpXÃr+ Loops through the range of integers 0 to n-1, calculates each term, and sums. Try it
Given an integer n, output the smallest prime such that the difference between it and the next prime is at least n. For example, if n=5, you would output 23, since the next prime is 29, and 29-23&...
SOGL, 10 bytes ╥‰~⅜,(ε ‘ū Try it here! Built-in compression of "hello"; ", "; "world"; "!", with first letters of words uppercased.