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.

Previous Showing 11-16 of 16 results.

A301851 Table read by antidiagonals: T(n, k) gives the number of distinct distances on an n X k pegboard.

Original entry on oeis.org

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

Views

Author

Peter Kagey, Mar 27 2018

Keywords

Comments

Main diagonal is A047800.

Examples

			The 4 X 6 pegboard has 17 distinct distances: 0, 1, sqrt(2), 2, sqrt(5), sqrt(8), 3, sqrt(10), sqrt(13), 4, sqrt(17), sqrt(18), sqrt(20), 5, sqrt(26), sqrt(29), and sqrt(34).
+---+---+---+---+---+---+
| * |   |   |   | 16| 25|
+---+---+---+---+---+---+
| 1 | 2 |   |   | 17| 26|
+---+---+---+---+---+---+
| 4 | 5 | 8 |   | 20| 29|
+---+---+---+---+---+---+
| 9 | 10| 13| 18|   | 34|
+---+---+---+---+---+---+
(As depicted, the pegs are at the center of each face.)
Square array begins:
  n\k|    1    2    3    4    5    6    7    8
  ---+----------------------------------------
    1|    1    2    3    4    5    6    7    8
    2|    2    3    5    7    9   11   13   15
    3|    3    5    6    9   12   15   18   21
    4|    4    7    9   10   14   17   21   25
    5|    5    9   12   14   15   19   24   29
    6|    6   11   15   17   19   20   26   31
    7|    7   13   18   21   24   26   27   33
    8|    8   15   21   25   29   31   33   34
		

Crossrefs

Programs

  • Haskell
    import Data.List (nub)
    a301851 n k = length $ nub [i^2 + j^2 | i <- [0..n-1], j <- [0..k-1]]

A301853 Triangle read by rows: T(n,k) gives the number of distinct distances on an n X k pegboard, with n >= 1, 1 <= k <= n.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 4, 7, 9, 10, 5, 9, 12, 14, 15, 6, 11, 15, 17, 19, 20, 7, 13, 18, 21, 24, 26, 27, 8, 15, 21, 25, 29, 31, 33, 34, 9, 17, 24, 29, 33, 36, 39, 41, 42, 10, 19, 27, 33, 38, 42, 45, 48, 50, 51, 11, 21, 30, 37, 43, 48, 51, 55, 58, 60, 61, 12, 23, 33, 41, 48, 53, 57, 61, 65, 68, 70, 71
Offset: 1

Views

Author

Peter Kagey, Mar 27 2018

Keywords

Comments

Is k*(2*n - k + 1)/2 an upper bound on T(n, k)? - David A. Corneth, Mar 28 2018

Examples

			Triangle begins:
  1;
  2,  3;
  3,  5,  6;
  4,  7,  9, 10;
  5,  9, 12, 14, 15;
  6, 11, 15, 17, 19, 20;
  7, 13, 18, 21, 24, 26, 27;
  8, 15, 21, 25, 29, 31, 33, 34;
  9, 17, 24, 29, 33, 36, 39, 41, 42;
  ...
		

Crossrefs

Programs

  • PARI
    T(n, k) = {my(d=[]); for (i=1, n, for (j=1, k, d = concat(d, (i-1)^2 + (j-1)^2););); #vecsort(d,,8);} \\ Michel Marcus, Mar 29 2018

A353386 Sums of two squares obtained by expanding a k X k matrix to (k+1) X (k+1) and taking the not yet seen squared distances of all positions in the matrix.

Original entry on oeis.org

1, 2, 4, 5, 8, 9, 10, 13, 18, 16, 17, 20, 25, 32, 26, 29, 34, 41, 50, 36, 37, 40, 45, 52, 61, 72, 49, 53, 58, 65, 74, 85, 98, 64, 68, 73, 80, 89, 100, 113, 128, 81, 82, 90, 97, 106, 117, 130, 145, 162, 101, 104, 109, 116, 125, 136, 149, 164, 181, 200, 121, 122, 137, 146, 157, 170, 185, 202, 221, 242
Offset: 1

Views

Author

Hugo Pfoertner, Apr 15 2022

Keywords

Comments

The terms are a permutation of the positive terms of A001481.

Examples

			The sequence can be viewed as a table with line lengths A047800(k+1) - A047800(k), in which the not yet seen sums of squares form a table line. The table starts:
   1,  2,
   4,  5,  8,
   9, 10, 13, 18,
  16, 17, 20, 25, 32,
  26, 29, 34, 41, 50,
  36, 37, 40, 45, 52, 61, 72,
  49, 53, 58, 65, 74, 85, 98
		

Crossrefs

Cf. A353387 (first term in lines), A001105 (last term in lines).

Programs

  • PARI
    a353386(nmax)={my(v=vectorsmall(2*nmax^2)); for(n=1,nmax,
    for(k=0,n,my(s=n^2+k^2); if(!v[s],print1(s,", ");v[s]++));print())};
    a353386(11)

A353387 a(n) is the least squared distance between 2 points of an n X n grid not occurring between two points of an (n-1) X (n-1) grid.

Original entry on oeis.org

1, 4, 9, 16, 26, 36, 49, 64, 81, 101, 121, 144, 173, 196, 226, 256, 293, 324, 361, 401, 441, 484, 529, 576, 626, 677, 729, 784, 842, 904, 961, 1024, 1089, 1172, 1226, 1296, 1373, 1444, 1522, 1601, 1697, 1764, 1849, 1936, 2026, 2116, 2209, 2304, 2401, 2504, 2602, 2708
Offset: 2

Views

Author

Hugo Pfoertner, Apr 16 2022

Keywords

Crossrefs

First column of A353386.

Programs

  • PARI
    a353387(nmax)={my(v=vectorsmall(2*nmax^2)); for(n=1,nmax,my(dfirst=0);
    for(k=0,n,my(s=n^2+k^2); if(!v[s],if(!dfirst,print1(s,", ");dfirst=1); v[s]++)))};
    a353387(52)

A132438 Number of different values of i^2+j^2+k^2+l^2+m^2+n^2 for i,j,k,l,m,n in [0,n].

Original entry on oeis.org

1, 7, 22, 47, 82, 124, 183, 250, 326, 414, 513, 621, 749, 874, 1018, 1176, 1338, 1515, 1706, 1899, 2110, 2331, 2568, 2806, 3066, 3324, 3612, 3903, 4201, 4513, 4841, 5173, 5523, 5882, 6248, 6626, 7026, 7433, 7842, 8271, 8715
Offset: 0

Views

Author

Jonathan Vos Post, Nov 13 2007, Nov 14 2007

Keywords

Comments

Number of distinct sums of 6 squares of integers from 0 through n.

Examples

			a(1) = 7 because the 7 distinct sums of squares from 0 through 1 are permutations of 1^2 + 1^1 + 1^2 + 1^2 + 1^2 + 1^2 = 6; 1^1 + 1^2 + 1^2 + 1^2 + 1^2 + 0^2 = 5; 1^1 + 1^2 + 1^2 + 1^2 + 0^2 + 0^2 = 4; 1^1 + 1^2 + 1^2 + 0^2 + 0^2 + 0^2 = 3; 1^1 + 1^2 + 0^2 + 0^2 + 0^2 + 0^2 = 2; 1^1 + 0^2 + 0^2 + 0^2 + 0^2 + 0^2 = 1; 0^2 + 0^1 + 0^2 + 0^2 + 0^2 + 0^2 = 0.
		

Crossrefs

Programs

  • Mathematica
    Table[Length@ Union@Flatten@ Table[i^2 + j^2 + k^2 + l^2 + m^2 + n^2, {i, 0, p}, {j, i, p}, {k, j, p}, {l, k, p}, {m, l, p}, {n, m, p}], {p, 0, 40}]

Extensions

Offset corrected by Giovanni Resta, Jun 19 2016

A385754 Positive numbers not occurring in A384797.

Original entry on oeis.org

1, 6, 16, 20, 25, 30, 33, 41, 48, 53, 57, 59, 62, 67, 74, 75, 78, 86, 90, 93, 98, 100, 107, 110, 113, 114, 123, 128, 130, 135, 138, 142, 145, 151, 153, 157, 159, 162, 165, 168, 178, 183, 191, 202, 204, 211, 212, 220, 223, 229, 232, 245, 254, 255, 283, 286, 291, 301
Offset: 1

Views

Author

Hugo Pfoertner, Jul 08 2025

Keywords

Comments

This sequence is to A384797 what A363762 is to A077773.

Crossrefs

Previous Showing 11-16 of 16 results.