A350002 a(n) is the smallest lucky number L(k) such that the n-th difference of (L(k), ..., L(k+n)) is zero, where L is A000959; a(n) = 0 if no such number exists.
37, 31, 87, 31, 517, 1797, 1797, 267, 483, 5649, 23815, 198223, 985921, 508401, 3720765, 1936245, 8302279, 16713091, 9857049, 16756749, 8904175
Offset: 2
Examples
The first six consecutive lucky numbers for which the fifth difference is 0 are (31, 33, 37, 43, 49, 51), so a(5) = 31. The successive differences are (2, 4, 6, 6, 2), (2, 2, 0, -4), (0, -2, -4), (-2, -2), and (0).
Comments