OFFSET
1,4
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..13692 (rows 1 <= n <= 250).
FORMULA
Row lengths = A107347(n + 1).
EXAMPLE
Triangle begins:
n a(n)
1: 0
2: 1
3: 1
4: 2
5: 3 1
6: 3 2
7: 4 2 1
8: 4 3 1
9: 5 3 2
10: 6 4 2 1
11: 7 5 3 1
12: 9 6 4 2
13: 9 8 5 3 1
14: 9 8 7 4 2
15: 9 8 7 6 3 1
16: 11 8 7 6 5 2
17: 13 10 7 6 5 4 1
18: 12 12 9 6 5 4 3
19: 13 11 11 8 5 4 3 2
20: 14 12 10 10 7 4 3 2 1
...
MATHEMATICA
T[n_, k_] := T[n, k] = If[k == 1, PrimePi[2 Prime@ #] - # &[n - k + 1], Max[0, T[n - 1, k - 1] - 1]]; Map[DeleteCases[#, 0] &, Table[T[n, k], {n, 20}, {k, n}]] // Flatten (* or *)
T[n_, k_] := T[n, k] = If[k == 1, PrimePi[2 Prime@ #] - # &[n - k + 1], Max[0, T[n - 1, k - 1] - 1]]; Table[T[n, k], {n, 60}, {k, Count[Range[# + 1, 2 # - 1] &@ Prime[n + 1], s_ /; PrimeOmega@ s == 2 && EvenQ@ s]}] // Flatten (* Michael De Vlieger, Jul 21 2017 *)
CROSSREFS
KEYWORD
nonn,tabf,easy
AUTHOR
Michael De Vlieger, Jul 21 2017
STATUS
approved