« first day (1279 days earlier)      last day (1090 days later) » 

3:32 PM
CMC: Prime test without using the or ÆP builtins. I can't get it below 4 bytes :/
 
4:16 PM
3
A: A twist of a trivial sequence

DennisJelly, 13 bytes Æfḟ2µ‘,’߀€SP Try it online! How it works Æfḟ2µ‘,’߀€SP Main link. Argument: n Æf Yield the array of prime factors of n. ḟ2 Remove all occurrences of 2. µ Begin a new, monadic chain. Argument: A (array of odd prime factors) ‘ ...

I am struggling to find out how this works
bit of help pls
especially the last part
@cairdcoinheringaahing Try it online! got 5 here
 
@Razetime Which part don't you get?
 
߀€SP
that part
5 → [4,6] → 3????
I dont get how the program arrives at that
 
߀€ takes the list [A-1, A+1], and recursively runs the main link over each element. S then takes the sum` and P the product
 
so 4+6 → 10 right
then product should give 10
 
5 → [5] → [5] → [[4], [6]] That's up to the ߀€
 
4:24 PM
oh it runs the whole program over the main link
but i still dont get how the final answer turns up
 
The ߀€ then maps ߀ over each of [4] and [6], which runs ß on 4 and then on 6. If the main link is f(x), then [[4], [6]] → [[f(4)], [f(6)]] → [f(4)+f(6)] → f(4)+f(6) as sum works columnwise
It's different for a composite number
15 → [3, 5] → [3, 5] → [[4, 6], [2, 4]] → [[f(4), f(6)], [f(2), f(4)]] → [f(4)+f(2), f(6)+f(4)] → (f(4)+f(2))×(f(6)+f(4))
We know that f(2) = 1, f(4) = 1, f(6) = 2, so f(15) = (1+1)×(2+1) = 2×3 = 6 and f(5) = 1+2 = 3
 
oooooooo
 

« first day (1279 days earlier)      last day (1090 days later) »