I also answered this incorrectly first but I think "This number is weird." would be هٰذا اَلرَقَم غَريب and "This is a weird number." هٰذا رَقَم غَريب
The difference is between the definite and indefinite forms (اَل / without اَل ). The latter has “a number” as its noun. The former has “the number” even though it is written “this number”. You can think “this” as “the [thing] here”.
But you wrote that to you they mean the same, so maybe that distinction doesn’t help you. I also have difficulties to explain the difference. Maybe that’s a sign I don’t fully understand the difference myself, as we don’t really have definite and indefinite forms in my first language; Finnish.
Nevertheless, I will give you my impression:
”This number is weird.” to me feels like ”This is a weird number among/compared to all the other numbers.” It seems that the context in which we are claiming that is the context of numbers. We are saying we should label and put that number in the “basket of weird numbers”.
I think ”This is a weird number” feels like ”This is a weird number (among/compared to all the other things).” The context is all the things in general (on the weird–not-weird spectrum). We are saying we should label and put the weird number in the “basket of weird things”.
I hope that helps but maybe it’s better to read more about the definite and indefinite articles and forms to truly grasp the issue :)
For the umpteenth time, please accept هٰذه and هٰذا (and لكن while we're at it) without the dagger alif. It is impossible to type on a standard Arabic computer keyboard and completely unnecessary and I can't get the answer correct without copying it and pasting it from the correction, which defeats the purpose.