OFFSET
0,3
COMMENTS
To build the sequence:
- we start with a(0) = 0, and repeatedly:
- let a(n) be the last known term and v the least value not yet in the sequence,
- if a(n) + v is a multiple of n+1 then a(n+1) = v,
- otherwise a(n+2) = v and a(n+1) is chosen as small as possible in such a way as to satisfy the required congruences (this is always possible as n+1 and n+2 are coprime).
The construction is similar to that of A367288.
LINKS
EXAMPLE
The first terms are:
n a(n) (a(n-1) + a(n))/n
-- ---- -----------------
0 0 N/A
1 1 1
2 7 4
3 2 3
4 22 6
5 3 5
6 45 8
7 4 7
8 76 10
9 5 9
10 115 12
11 6 11
12 18 2
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Mar 15 2024
STATUS
approved