OFFSET
1,5
LINKS
Rémy Sigrist, PARI program
FORMULA
a(p) = (Sum_{k = 1, p-1} a(k)) - 1 for any odd prime number p.
EXAMPLE
The first terms, alongside the corresponding lists, are:
n a(n) L_n
- ---- ---------------------------------------------
1 1 (1 )
2 1 (1, 2)
3 1 (1, 3, 2)
4 1 (1, 4, 3, 2)
5 3 (1, 5, 4, 5, 3, 5, 2)
6 1 (1, 6, 5, 4, 5, 3, 5, 2)
7 7 (1, 7, 6, 7, 5, 7, 4, 7, 5, 7, 3, 7, 5, 7, 2)
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Mar 03 2024
STATUS
approved