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.

A194296 Triangular array: g(n,k)=number of fractional parts (i*r) in interval [(k-1)/n, k/n], for 1<=i<=n, 1<=k<=2^n, r=(1+sqrt(5))/2, the golden ratio.

Original entry on oeis.org

2, 2, 2, 3, 2, 3, 4, 4, 4, 4, 6, 6, 7, 7, 6, 10, 11, 10, 12, 10, 11, 19, 19, 17, 19, 19, 17, 18, 32, 33, 32, 31, 33, 32, 31, 32, 57, 57, 57, 56, 57, 58, 56, 58, 56, 102, 102, 103, 102, 102, 103, 102, 103, 103, 102, 187, 186, 187, 185, 185, 186, 187, 187, 186, 187
Offset: 1

Views

Author

Clark Kimberling, Aug 21 2011

Keywords

Comments

See A194285.

Examples

			First seven rows:
2
2...2
3...2...3
4...4...4...4
6...6...7...7...6
10..11..10..12..10..11
19..19..17..19..19..17..18
		

Crossrefs

Cf. A194285.

Programs

  • Mathematica
    r = GoldenRatio;
    f[n_, k_, i_] := If[(k - 1)/n <= FractionalPart[i*r] < k/n, 1, 0]
    g[n_, k_] := Sum[f[n, k, i], {i, 1, 2^n}]
    TableForm[Table[g[n, k], {n, 1, 14}, {k, 1, n}]]
    Flatten[%]    (* A194296 *)