I assume you have tested the lamp in another power outlet in you appartment and/or another appliance in the power outlet you have been using.
Hi dadpad, yes, i have tested the lamp in all the sockets in the appartment and it does not operate properly on any of them. I also have other appliances such as TV, HiFi, Microwave, Radio etc all on the same socket line as the lamp and they all work fine.
Now I know this is dumb but... Is it turned on at the power point? yeah but have you actually checked? dont tell me you have, go and check first.
When you mean power point, i assume you mean the socket switch itself? if so then yes it is switched on, there is power to the lamp, its just that it randomly switch itself on and off.
Do things logically and slowly
I'm willing to bet its a voltage drop type thing applicable to that one power outlet which means a short and possible fire risk.
If theres a voltage drop type thing happening, wouldnt other appliances that are connected to the same line as the sockets also suffer as a consequence?
I would reccomend a sparky have a look at the appartment.
I think that is probably the most logical idea seeing as im beginning to run out of other avenues.