cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

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.

Original entry on oeis.org

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
Offset: 1

Views

Author

Michael De Vlieger, Jul 21 2017

Keywords

Examples

			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
   ...
		

Crossrefs

Programs

  • 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 *)

Formula

Row lengths = A107347(n + 1).

A338365 a(n) = (index of prime(n) in A280985) - prime(n).

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 5, 5, 5, 6, 8, 7, 7, 8, 9, 9, 10, 11, 10, 11, 11, 11, 12, 12, 14, 14, 15, 14, 15, 16, 16, 16, 16, 17, 18, 19, 19, 20, 20, 21, 21, 22, 21, 19, 20, 23, 22, 22, 25, 26, 26, 25, 25, 26, 26, 26, 31, 30, 28, 28, 29, 32, 30, 30, 31, 31, 32, 32, 33, 36
Offset: 1

Views

Author

N. J. A. Sloane, Nov 04 2020

Keywords

Comments

Gives amount by which primes are delayed in A280985. For comparison, the amount by which primes are delayed in A283312 is given by A107347. There is a simple formula for the latter sequence, but no such formula is presently known for the current sequence.

Crossrefs

Showing 1-2 of 2 results.