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-1 of 1 results.

A158086 Number of occurrences of n as an entry in rows <= 2n of Losanitsch's triangle (A034851).

Original entry on oeis.org

4, 4, 5, 4, 6, 4, 4, 6, 5, 4, 6, 4, 4, 4, 6, 4, 4, 6, 6, 4, 4, 4, 4, 6, 4, 4, 6, 4, 6, 4, 4, 4, 4, 4, 6, 4, 5, 4, 4, 4, 6, 4, 6, 4, 4, 4, 4, 6, 4
Offset: 2

Views

Author

Alonso del Arte, Mar 12 2009

Keywords

Comments

For n = 1 to 1000, the only values of a(n) are 4, 5, 6, 8, 10 and infinity.

Examples

			a(4) = 5 because 4 occurs five times in Losanitsch's triangle: the first time at row 4, column 2, being the sum of the two 2's in the row above; and at column 1 of rows 7 and 8, which are symmetrically duplicated at row 7, column 6 and row 8, column 7.
		

Crossrefs

Cf. A003016, Number of occurrences of n as an entry in rows <= n of Pascal's triangle.

Programs

  • Mathematica
    (* The following assumes a[n, k] has already been defined to give Losanitsch's triangle; see for example the program given for A153046 *)
    tallyLozOccs[1] := Infinity; tallyLozOccs[n_Integer?Positive] := Module[{i, searchMax, tally}, i = 0; searchMax = 2n; tally = 0; While[i <= searchMax, tally = tally + Length[Select[Table[a[i, m], {m, 0, i}], # == n &]]; i++ ]; Return[tally]]; Table[tallyLozOccs[n], {n, 2, 50}]
    (* this program also assumes a(n,k) has been defined for Losanitsch's triangle*)
    Table[Length[Select[Flatten[Table[a[i,m], {i,0,2n}, {m,0,i}]],#==n&]], {n,2,50}] (* Wilfredo Lopez (chakotay147138274(AT)yahoo.com), Mar 18 2009 *)
Showing 1-1 of 1 results.