Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1, 6, 5, 4, 3, 2, 9, 8, 7, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 25, 24, 23, etc.
- Input | Output
- ---------------
- 1 | 1
- 5 | 3
- 20 | 10
- 50 | 72
- 78 | 76
- 123 | 155
- 1234 | 1324
- 3000 | 2996
- 9999 | 9903
- 29890 | 29796
- 8(s=⌊(⌊Sqrt[#-1]⌋+1)/2⌋)^2-#+2+If[#<=4s^2+2s,-2,6]s&
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement