login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A289171 Irregular triangle T(n, k) read by rows with 1 <= k <= n: T(n, 1) = A020900(n - k + 1) - (n - k + 1) and T(n, k) = max(0, T(n - 1, k - 1) - 1) otherwise. 1
1, 1, 1, 2, 3, 1, 3, 2, 4, 2, 1, 4, 3, 1, 5, 3, 2, 6, 4, 2, 1, 7, 5, 3, 1, 9, 6, 4, 2, 9, 8, 5, 3, 1, 9, 8, 7, 4, 2, 9, 8, 7, 6, 3, 1, 11, 8, 7, 6, 5, 2, 13, 10, 7, 6, 5, 4, 1, 12, 12, 9, 6, 5, 4, 3, 13, 11, 11, 8, 5, 4, 3, 2, 14, 12, 10, 10, 7, 4, 3, 2, 1 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A107796 A194308 A257070 * A231633 A039702 A230294
KEYWORD
nonn,tabf,easy
AUTHOR
Michael De Vlieger, Jul 21 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 04:27 EDT 2024. Contains 372341 sequences. (Running on oeis4.)