# Search Results

Results tagged with Search options user 53880
34 results

For challenges involving some sort of sequence.

Gaia, 4 bytes ḍl2= 4 bytes seems to be a common length, I wonder why... :P Try it online! Explanation ḍ Prime factors l Length 2= Equals 2?
answered Aug 8 '17 by Business Cat
Gaia, 9 bytes A000012₉/ Works with A000012 and A000004. Try A000012! Try A000004! Explanation A Undefined (ignored) 000012 Push 12 ₉ Push 9 / Integer division, re …
answered Aug 2 '17 by Business Cat
CJam, 23 bytes q~),\>{_Ab_,,:).#:+=},p Try it online! Explanation q~ Get and eval all input ),\> Get the range between m and n, inclusive { …
answered Jan 19 '17 by Business Cat
the runs are now sequences of 1s, it will order them by length, from shortest to longest. 1+¶ ​ Replaces all sequences of 1's followed by a linefeed with nothing. This leaves only the last (longest) sequence behind. 1 Counts the number of 1s and outputs it. …
answered Jan 13 '17 by Business Cat
3 languages: Gaia, CJam, Retina, 7 bytes 1_0 @+ A005843 in Gaia, A010850 in CJam, and A000004 in Retina. Try it Gaia! Try it CJam! Try it Retina! Explanations Gaia Gaia only executes the bot …
answered Aug 6 '17 by Business Cat
99. Spaced, 30 bytes, A000153 $<2?$: $*f($-1) + ($-2)*f($-2) Try it online! Next sequence
answered Aug 11 '17 by Business Cat
PHP, 101 bytes function f($i){$a=array(23,26,30,35,40,46,52,60,70);return $i<11?$i*10:$i<20?$a[$i-11]*5:f($i-10)*4;} Huzzah for nested conditional operator!
answered May 20 '16 by Business Cat
CJam, 22 20 bytes Saved 2 bytes thanks to Martin Ender ri2,{(_(jAb\jAb+:+}j Straightforward recursive algorithm, nothing fancy. 0-indexed. Try it online! or test for 0-50 (actually runs pretty fa …
answered Feb 2 '17 by Business Cat
CJam, A000042, cracked by Lynn Byte set: {})_%si
answered Jul 27 '17 by Business Cat
CJam, 17 bytes ri,6m*{3/::+:=},, Input of 11 times out on TIO, and 12 and higher run out of memory. Try it online! Explanation ri e# Read an int from input. , e# G …
answered Apr 29 '17 by Business Cat
Gaia, 6 bytes 0₁@+₌ₓ I might make a built-in for this in the future, but built-ins are boring anyway. Explanation 0₁ Push 0 and 1 @ Push an input +₌ₓ Add the top two stack elements …
answered Jul 20 '17 by Business Cat
CJam, 11 bytes ri_mf,\mF,- Try it online! Explanation ri_ Get an integer from input and duplicate it mf, Get the number of prime factors (with repetition) \ Swap top 2 e …
answered Aug 31 '16 by Business Cat
JavaScript (Node.js) and PHP, 73 70 bytes function($n){for($d=$i=0;++$i<$n;)$d+=$i*!($n%$i);return"$n">10?0:\$d;} In both languages, this is an anonymous function. JavaScript gives the correct res …
answered Aug 1 '17 by Business Cat
CJam, geokavel {{)}%1+{*}*} Try it online!
answered Jul 28 '17 by Business Cat
Python 2, Rod n=input() l=[] p=[n] for i in range(n): lp=[] for t in l: lp[:len([])]=[n] for t in p: lp[:len([])]=[n] (l,p)=(p,lp) print len(l) Try it online!
answered Jul 27 '17 by Business Cat

15 30 50 per page