OFFSET
1,3
COMMENTS
If a(n) = 0, then a(n+1) = 1 and a(n+2) >= 2.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, PARI program for A338774
FORMULA
a(n) < n.
EXAMPLE
The first terms, alongside the corresponding squares, are:
n a(n) Corresponding squares (A338780(n)^2)
-- ---- ------------------------------------
1 0 0^2 (empty sum)
2 1 0 = 0^2
3 2 0+1 = 1^2
4 0 0^2 (empty sum)
5 1 0 = 0^2
6 5 0+1+2+0+1 = 2^2
7 6 0+1+2+0+1+5 = 3^2
8 0 0^2 (empty sum)
9 1 0 = 0^2
10 9 0+1+2+0+1+5+6+0+1 = 4^2
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Nov 08 2020
STATUS
approved