OFFSET
1,2
LINKS
Rémy Sigrist, PARI program
FORMULA
a(p) = 2*a(p-1) - 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 2 (1, 2)
3 3 (1, 3, 2)
4 4 (1, 4, 3, 2)
5 7 (1, 5, 4, 5, 3, 5, 2)
6 8 (1, 6, 5, 4, 5, 3, 5, 2)
7 15 (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