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

A274080 Table read by rows: row n gives all numbers less than n in the same row, column, or diagonal as n in the natural numbers read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Peter Kagey, Jun 09 2016

Keywords

Examples

			A000027 read by antidiagonals is:
1 2 4 7
3 5 8
6 9
...
Thus:
Row 1: []
Row 2: [1]
Row 3: [1, 2]
Row 4: [1, 2]
Row 5: [1, 2, 3, 4]
Row 6: [1, 3, 4, 5]
Row 7: [1, 2, 4]
Row 8: [2, 3, 4, 5, 7]
Row 9: [2, 3, 5, 6, 7, 8]
		

Crossrefs

Programs

  • Haskell
    import Data.List (sort, nub)
    a274080 n = a274080_list !! (n - 1)
    a274080_list = concatMap a274080_row [1..]
    a274080_tabf = map a274080_row [1..]
    a274080_row n = nub $ sort $ concatMap (\f -> f n) [a274079_row, a273825_row, a273824_row, a273823_row]
  • Mathematica
    nn = 18; t = Table[(n^2 - n)/2 + Accumulate@ Range[n - 1, Ceiling[(Sqrt[9 + 8 nn] - 3)/2]] + 1, {n, Ceiling[(Sqrt[9 + 8 nn] - 3)/2] + 1}]; Table[Function[a, Function[p, Most@ Union@ Flatten@ {Map[a[[#1, #2]] & @@ # &, Most@ NestWhileList[# - 1 &, First@ p, ! MemberQ[#, 0] &]], Range[SelectFirst[Reverse@ Join[{0}, First@ t], n >= # &], n - 1], Transpose[a][[ p[[1, 2]] ]], a[[ p[[1, 1]] ]]}]@ Position[a, n]]@ Array[t[[#1, #2]] &, First@ Position[t, n]], {n, nn}] // Flatten (* Michael De Vlieger, Jun 29 2016, Version 10 *)

A273823 Table read by rows: the n-th row is the list of numbers to the left of n in the natural numbers read by antidiagonals.

Original entry on oeis.org

1, 2, 1, 3, 4, 2, 1, 5, 3, 6, 7, 4, 2, 1, 8, 5, 3, 9, 6, 10, 11, 7, 4, 2, 1, 12, 8, 5, 3, 13, 9, 6, 14, 10, 15, 16, 11, 7, 4, 2, 1, 17, 12, 8, 5, 3, 18, 13, 9, 6, 19, 14, 10, 20, 15, 21, 22, 16, 11, 7, 4, 2, 1, 23, 17, 12, 8, 5, 3, 24, 18, 13, 9, 6, 25, 19, 14
Offset: 1

Views

Author

Peter Kagey, Jun 08 2016

Keywords

Examples

			A000027 read by antidiagonals is:
1 2 4 7
3 5 8
6 9
...
Thus:
Row 1: []
Row 2: [1]
Row 3: []
Row 4: [2, 1]
Row 5: [3]
Row 6: []
Row 7: [4, 2, 1]
Row 8: [5, 3]
Row 9: [6]
		

Crossrefs

Programs

  • Haskell
    a273823 n = genericIndex a273823_list (n - 1)
    a273823_list = concatMap a273823_row [1..]
    a273823_tabf = map a273823_row [1..]
    a273823_row n
      | a_i == 0  = []
      | otherwise = a_i : a273823_row a_i where
        a_i = a271439 n
  • Mathematica
    nn = 32; t = Table[(n^2 - n)/2 + Accumulate@ Range[n - 1, Ceiling[(Sqrt[9 + 8 nn] - 3)/2]] + 1, {n, Ceiling[(Sqrt[9 + 8 nn] - 3)/2] + 1}]; Table[Reverse@ Take[t[[#1]], #2 - 1] & @@ Flatten@ Position[t, n], {n, nn}] // Flatten (* Michael De Vlieger, Jun 10 2016 *)

A273824 Table read by rows: the n-th row is the list of numbers above n in the table of natural numbers read by antidiagonals.

Original entry on oeis.org

1, 2, 3, 1, 4, 5, 2, 6, 3, 1, 7, 8, 4, 9, 5, 2, 10, 6, 3, 1, 11, 12, 7, 13, 8, 4, 14, 9, 5, 2, 15, 10, 6, 3, 1, 16, 17, 11, 18, 12, 7, 19, 13, 8, 4, 20, 14, 9, 5, 2, 21, 15, 10, 6, 3, 1, 22, 23, 16, 24, 17, 11, 25, 18, 12, 7, 26, 19, 13, 8, 4, 27, 20, 14, 9, 5
Offset: 1

Views

Author

Peter Kagey, Jun 08 2016

Keywords

Examples

			A000027 read by antidiagonals is:
1 2 4 7
3 5 8
6 9
...
Thus:
Row 1: []
Row 2: []
Row 3: [1]
Row 4: []
Row 5: [2]
Row 6: [3, 1]
Row 7: []
Row 8: [4]
Row 9: [5, 2]
		

Crossrefs

Programs

  • Haskell
    a273824 n = genericIndex a273824_list (n - 1)
    a273824_list = concatMap a273824_row [1..]
    a273824_tabf = map a273824_row [1..]
    a273824_row n
      | a_i == 0  = []
      | otherwise = a_i : a273824_row a_i where
        a_i = a271439 (n - 1)
  • Mathematica
    nn = 35; t = Transpose@ Table[(n^2 - n)/2 + Accumulate@ Range[n - 1, n + Ceiling[(Sqrt[9 + 8 nn] - 3)/2]] + 1, {n, Ceiling[(Sqrt[9 + 8 nn] - 3)/2] + 1}]; Table[Reverse@ Take[t[[#1]], #2 - 1] & @@ Flatten@ Position[t, n], {n, nn}] // Flatten (* Michael De Vlieger, Jun 10 2016 *)

A273825 Table read by rows: the n-th row is the list of numbers diagonally up and to the left of n in the natural numbers read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Peter Kagey, Jun 08 2016

Keywords

Examples

			A000027 read by antidiagonals is:
1 2 4 7
3 5 8
6 9
...
Thus:
Row 1: []
Row 2: []
Row 3: []
Row 4: []
Row 5: [1]
Row 6: []
Row 7: []
Row 8: [2]
Row 9: [3]
		

Crossrefs

Programs

  • Haskell
    a273825 n = genericIndex a273825_list (n - 1)
    a273825_list = concatMap a273825_row [1..]
    a273825_tabf = map a273825_row [1..]
    a273825_row n
      | a_i == 0  = []
      | otherwise = a_i : a273825_row a_i where
        a_i = a271439 $ a271439 (n - 1)
  • Mathematica
    nn = 58; t = Table[(n^2 - n)/2 + Accumulate@ Range[n - 1, Ceiling[(Sqrt[9 + 8 nn] - 3)/2]] + 1, {n, Ceiling[(Sqrt[9 + 8 nn] - 3)/2] + 1}]; Table[Rest@ Map[t[[#1, #2]] & @@ # &, Most@ NestWhileList[# - 1 &, #, ! MemberQ[#, 0] &]] &@ First@ Position[t, n], {n, nn}] // Flatten (* Michael De Vlieger, Jun 29 2016 *)
Showing 1-4 of 4 results.