« first day (29 days earlier)      last day (1298 days later) » 

1:37 AM
0
A: Is it a Cyclops number? "Nobody" knows!

H.PWizRegex (EcmaScript), 53 bytes ^((?=x(x*?)(\2(?!((xx)+x)\4*$)(x+)\6{3}))\3(?=\6)x)*$ Try it online! I use a more direct approach than the other regex answers. (Although the golfing make this less clear). My method is to just remove the first and last 1 from the binary representation of the numb...

@Deadcode Not anymore :)
 
@H.PWiz That's amazing!
But I was hoping you'd comment it, explaining how it works
Do you mind if I edit it to add a commented fully explained version, once I figure out how it works?
Or if you'd like to do that, I'd appreciate it
 
Maybe on Monday, when I can access my laptop again
Actually, if you're willing, thaat would be lovely
 
Okay
 
(Once you figure it out) you should try to make it clear which parts are special cased for 5
 
1:54 AM
Are you saying that without a certain modification, it was matching 0 and 119 and everything else, but not 5?
 
No, on the last iteration, I need to match 5, but in previous iterations, I need the number to have started with 11 in binary
Iteration referring to the inside of ()*
 
That implies that there's a modification that would preserve the matching of everything else but 5
0, 27, 119, 495, etc.
but not match 5
 
I'm not being clear. I reduce all the numbers to five, but when reducing 5 to 0, it happens slightly differently
(At least with the perspective that I have of the regex)
So 199 -> 27 -> 5 -> 0, but not 9 -> 0
 
Maybe I'm not being clear. If you're doing something special to reduce 5 to 0, that means that there's a version of the regex without that, which matches 0, 27, 119, 495, etc., but not 5.
Because it's of the form ^(...)*$, then regardless of anything, it'll still match 0
So what's the version of the regex that drops the match of 5? Is it shorter than 53 chars?
 
There is a version that marches numbers with any number of 0s in the middle. And a version which matches 0 or 1 0s in the middle. They are simpler
 
2:02 AM
Then you're not doing anything special for 5.
 
I used to have |x{5}$ inside the loop. Now I don't (that is significant)
 
Yes, that was the first thing I noticed.
 
That is what mean by special casing 5
 
Oh, just noticed my error in reasoning. None of the other values can match if 5 doesn't.
But what would it match without the special casing of 5?
 
Well, its special cased in a non-obvious way, I gave two examples of related rexedes that I had along the way above (not the regexes, I don't have those anymore, but the matches)
Sorry for the typos
The most obvious change might allow it to match any number 2^n+1 in the loop
(Don't know what that change is)
I just know I was being careful not to match those numbers
 
2:23 AM
@H.PWiz Your regex is the only one that can get up to 130815 (searching through all consecutive numbers) in a reasonable amount of time. The others just made it up to 32639 before getting unmanageably slow.
Do you mind if I change the (?!((xx)+x)\4*$) to (?!(x(xx)+)\4*$)? The latter should be slightly more efficient
 
Go ahead
 
 
12 hours later…
2:43 PM
Wow, down to 50 bytes while I wasn’t looking, impressive!
 
2:58 PM
49: ^((?=(x+?)(\2((x*)x(?=\5$)){2,}$))(?!\2{6})\3x)*$
Oh wait 47: ^((?=(x+?)(\2((x*)x(?=\5$))+x$))(?!\2{6})\3x)*$
 
 
3 hours later…
5:34 PM
Very cool, it will be a while until I can study these improvements
 

« first day (29 days earlier)      last day (1298 days later) »