login
A317596
a(n) is the number of k with 1 <= k <= n-1 such that a(k) + 2 * a(n-k) <= n.
2
0, 1, 2, 3, 3, 4, 4, 5, 6, 6, 7, 7, 8, 8, 9, 10, 11, 12, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 18, 19, 20, 23, 25, 29, 31, 33, 34, 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 38, 38, 38, 38, 38, 39, 39, 39, 39
OFFSET
1,3
COMMENTS
See A317582 for similar sequences.
LINKS
EXAMPLE
For n = 5:
- a(1) + 2 * a(4) = 0 + 2 * 3 = 6 > 5,
- a(2) + 2 * a(3) = 1 + 2 * 2 = 5 <= 5,
- a(3) + 2 * a(2) = 2 + 2 * 1 = 4 <= 5,
- a(4) + 2 * a(1) = 3 + 2 * 0 = 3 <= 5,
- hence a(5) = 3.
MATHEMATICA
a[n_] := a[n] = Length@ Select[ Range[n - 1], a[#] + 2a[n - #] <= n &]; a[0] = 0; Array[a, 70] (* Robert G. Wilson v, Aug 03 2018 *)
PROG
(PARI) a = vector(73); for (n=1, #a, a[n] = sum(k=1, n-1, a[k] + 2*a[n-k] <= n); print1 (a[n] ", "))
CROSSREFS
Cf. A317582.
Sequence in context: A219642 A139338 A244229 * A057355 A171975 A160511
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Aug 01 2018
STATUS
approved