Put the flour, sugar and salt in a food processor and whizz with the butter until the mix is crumbly, then add 1-3 tablespoons of cold water to bring it together into a dough. Wrap in cling film and chill for 30 minutes.
Peel and core 400g (14 oz) of the apples and cut into chunks. Put in a pan with the butter, rind and juice of the lemon and the brown sugar. Cook with the lid on until thick and pulpy then remove fromt the heat and leave to cool.
Grease a 25cm (10 inch) tart tin. Roll out the pastry on a lightly floured surface to about 5mm (1/4 inch). Line the tin and leave some over the edges. Prick with a fork and chill for half an hour.
Next make the frangipane. Beat together the butter, icing sugar and almond essence until fluffy, then whisk in the egg. Fold in the ground almonds, cornflour and brandy and mix until well combined.
Peel and core the remaining apples and slice to about 3-4mm thick.
Heat the oven to 200C/390F/gas 6. Spread the pastry base with the apple pulp, spread the frangipane mixture on top then arrange the apple slices over that. Bake for about 30 minutes, until golden brown.
Heat the apricot jam over a low heat until runny, then brush over the apples to give a final gloss.