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.

A308121 Irregular triangle read by rows: T(n,k) = A109395(n)*k-A076512(n)*A038566(n,k).

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 2, 3, 4, 2, 1, 1, 2, 3, 4, 5, 6, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 1, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 4, 5, 6, 1, 2, 3, 7, 14, 13, 4, 11, 2, 1, 8
Offset: 1

Views

Author

Jamie Morken, May 13 2019

Keywords

Comments

Row n has length A000010(n).
Row n > 1 has sum = n*A076512(n)/2.
First value on row(n) = A076511(n).
Last value on row(n) = A076512(n) for n > 1.
For n > 1, A109395(n) = Max(row) + Min(row).
For values x and y on row n > 1 at positions a and b on the row:
x + y = A109395(n), where a = A000010(n) - (b-1).
For n > 2 the penultimate value on row A002110(n) is given by
From Charlie Neder, Jun 05 2019: (Start)
If p is a prime dividing n, then row p*n consists of p copies of row n.
Conjecture: If n is odd, then row 2n can be obtained from row n by interchanging the first and second halves. (End)

Examples

			The sequence as an irregular triangle:
  n/k 1, 2, 3, 4, ...
   1: 0
   2: 1
   3: 1, 2
   4: 1, 1
   5: 1, 2, 3, 4
   6: 2, 1
   7: 1, 2, 3, 4, 5, 6
   8: 1, 1, 1, 1
   9: 1, 2, 1, 2, 1, 2
  10: 3, 4, 1, 2
  11: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
  12: 2, 1, 2, 1
  13: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
  14: 4, 5, 6, 1, 2, 3
  15: 7, 14, 13, 4, 11, 2, 1, 8
  ...
  Row sums: 0, 1, 3, 2, 10, 3, 21, 4, 9, 10, 55, 6, 78, 21, 60.
T(14,5) = A109395(14)*5 - A076512(14)*A038566(14,5) = 7*5 - 3*11 = 2.
T(210,2) = A109395(210)*2 - A076512(210)*A038566(210,2) = 35*2 - 8*11 = -18.
		

Crossrefs

Programs

  • Mathematica
    Flatten@ Table[With[{a = n/GCD[n, #], b = Numerator[#/n]}, MapIndexed[a First@ #2 - b #1 &, Flatten@ Position[GCD[Table[Mod[k, n], {k, n - 1}], n], 1] /. {} -> {1}]] &@ EulerPhi@ n, {n, 15}] (* Michael De Vlieger, Jun 06 2019 *)
  • PARI
    vtot(n) = select(x->(gcd(n, x)==1), vector(n, k, k));
    row(n) = my(q = eulerphi(n)/n, v = vtot(n)); vector(#v, k, denominator(q)*k - numerator(q)*v[k]); \\ Michel Marcus, May 14 2019