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-20 of 50 results. Next

A193838 Size k of smallest square of k X k lattice points from which n points with distinct mutual distances can be chosen.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 13, 15, 16, 18
Offset: 1

Views

Author

Hugo Pfoertner, Aug 06 2011

Keywords

Comments

Upper bounds for a(14) to a(26): 18, 21, 24, 26, 28, 29, 33, 36, 37, 40, 43, 46, 49. These have been obtained from the results of the Al Zimmermann competition. - Dmitry Kamenetsky, Apr 23 2021
Upper bounds for a(15) to a(18): 20, 22, 24, 27. - Fausto A. C. Cariboni, Jul 16 2022

Examples

			a(1) is the degenerate case of a single point, a(2)=2 is trivial.
a(3)=3: The points ((1,2),(3,1),(3,2)) have distinct mutual squared distances 1, 4, 5.
a(8)=9 is the first square for which k>n: ((1,1), (1,4), (2,2), (6,1), (7,6), (7,7), (9,2), (9,4)) have 7*8/2=28 mutual squared distances: 1, 2, 4, 5, 8, 9, 10, 13, 17, 18, 20, 25, 26, 29, 34, 37, 40, 41, 45, 49, 50, 53, 61, 64, 65, 68, 72, 73, and no configuration of 8 points fitting on an 8 X 8 square exists.
a(10)=11, only two subsets barring symmetry:
  {(0,0), (0,2), (0,3), (0,7), (1,10), (5,4), (6,0), (8,7), (9,8), (10, 10)},
  {(0,0), (0,6), (0,7), (1,2), (4,10), (7,8), (7,10), (9,2), (9,6), (10,5)}.
a(11)=13, one of the four subsets of the 12 X 13 grid, barring symmetry: {(0,0), (0,1), (0,9), (0,12), (2,0), (5,3), (6,12), (7,0), (8,4), (10,10), (11,11)}
a(12)=15 is satisfied by {(0,0), (1,0), (1,12), (3,0), (7,0), (7,14), (9,4), (12,11), (13,3), (13,8), (14,2), (14,13)}. - _Sean A. Irvine_, Jul 13 2020
a(13)=16 is satisfied by {(1,1), (2,2), (2,16), (4,14), (6,14), (7,16), (8,8), (11,2), (11,5), (13,15), (13,16), (16,1), (16,8)}. - _Bert Dobbelaere_, Sep 20 2020
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, Third Edition, Springer New York, 2004, F2, 367-368.
  • Keith F. Lynch, Posting to Math Fun Mailing List, Apr 02 2016.

Crossrefs

See A271490 for the inverse function.

Extensions

a(10)-a(11) corrected by Ehit Dinesh Agarwal, May 28 2020
a(12) from Sean A. Irvine, Jul 13 2020
a(13) from Bert Dobbelaere, Sep 20 2020
a(14) from Fausto A. C. Cariboni, Jul 16 2022

A234943 Array read by antidiagonals: T(i,j) = size of optimal difference triangle set M(i,j).

Original entry on oeis.org

1, 2, 3, 3, 7, 3, 4, 10, 13, 11, 5, 12, 19, 22, 17, 6, 15, 24, 32, 34, 25, 7, 19, 30, 41, 49, 51, 34, 8, 22, 36, 51, 64, 72, 70, 44, 9, 24, 42, 60, 79, 94, 100, 94, 55, 10, 27, 48, 71
Offset: 1

Views

Author

N. J. A. Sloane, Jan 08 2014

Keywords

Comments

An (n,k) difference triangle set is a set of n blocks of k integers such that the difference sets of the blocks are all disjoint. The "scope" of such a set is defined to be the maximal element, if all blocks are translated such that their least elements are all 0. T(n,k) lists the minimal scope for which an (n,k) difference triangle set exists. - Charlie Neder, Jun 14 2019

Examples

			Array begins:
j\i|   1   2   3  4  5  6  7  8  9  10  11  12  13  14  15
---+-----------------------------------------------------------------
1  |   1   2   3  4  5  6  7  8  9  10  11  12  13  14  15  (A000027)
2  |   3   7  10 12 15 19 22 24 27  31  34  36  39  43  46  (A013574)
3  |   6  13  19 24 30 36 42 48 54  60  66  72  78  84  90  (A013575)
4  |  11  22  32 41 51 60 71 80 91 100 111 120 131 140 151  (A013576)
5  |  17  34  49 64 79  (A013577)
6  |  25  51  72 94
7  |  34  70 100
8  |  44  94
9  |  55 121
10 |  72
11 |  85
12 | 106
13 | 127
14 | 151
15 | 177
  A003022 A010896 A010898
       A010895 A010897 A010899
		

References

  • CRC Handbook of Combinatorial Designs, 1996, p. 315. (But beware errors!)

Crossrefs

For the number of different optimal triangle difference sets see the corresponding array in A234947.

A054578 Number of subsequences of {1..n} such that all differences of pairs of terms are distinct (i.e., number of Golomb rulers on {1..n}).

Original entry on oeis.org

1, 3, 6, 12, 21, 35, 56, 90, 139, 215, 316, 462, 667, 961, 1358, 1918, 2665, 3693, 5034, 6844, 9187, 12365, 16416, 21786, 28707, 37721, 49082, 63920, 82639, 106721, 136674, 174894, 222557, 283107, 357726, 451574, 567535, 712855, 890404, 1112080, 1382415
Offset: 1

Views

Author

John W. Layman, Apr 11 2000

Keywords

Examples

			a(4) = 12: [1], [2], [3], [4], [1,2], [1,3], [1,4], [2,3], [2,4], [3,4], [1,2,4], [1,3,4]. - _Alois P. Heinz_, Jan 16 2013
		

Crossrefs

Partial sums of A308251.

Programs

  • Maple
    b:= proc(n, s) local sn, m;
          if n<1 then 1
        else sn:= [s[], n]; m:= nops(sn);
             `if` (m*(m-1)/2 = nops (({seq (seq (sn[i]-sn[j],
               j=i+1..m), i=1..m-1)})), b(n-1, sn), 0) +b(n-1, s)
          fi
        end:
    a:= proc(n) a(n):= b(n-1, [n]) +`if` (n=0, -1, a(n-1)) end:
    seq(a(n), n=1..30);  # Alois P. Heinz, Jan 16 2013
  • Mathematica
    b[n_, s_List] := b[n, s] = Module[{sn, m}, If[n < 1, 1, sn = Append[s, n]; m = Length[sn]; If[m(m - 1)/2 == Length @ Union @ Flatten @ Table[ Table[ sn[[i]] - sn[[j]], {j, i + 1, m}], {i, 1, m - 1}], b[n - 1, sn], 0] + b[n - 1, s]]];
    a[n_] := a[n] = b[n - 1, {n}] + If [n == 0, -1, a[n - 1]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 41}] (* Jean-François Alcover, Apr 28 2020, after Alois P. Heinz *)

Formula

a(n) = A143823(n) - 1. - Carl Najafi, Jan 16 2013

Extensions

More terms from Carl Najafi, Jan 15 2013

A079287 Marks on lexicographically earliest 7-mark optimal Golomb ruler.

Original entry on oeis.org

0, 1, 4, 10, 18, 23, 25
Offset: 1

Views

Author

Daniel Smith (dsmith(AT)globalnet.co.uk), Feb 16 2003

Keywords

Crossrefs

Cf. A003022.

A036501 Number of inequivalent Golomb rulers with n marks and shortest length.

Original entry on oeis.org

1, 1, 1, 2, 4, 5, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 2

Views

Author

Keywords

Comments

From Gus Wiseman, May 31 2019: (Start)
A Golomb ruler of length n is a subset of {0..n} containing 0 and n and such that every pair of distinct terms has a different difference. For example, the a(2) = 1 through a(8) = 1 Golomb rulers are:
2: {0,1}
3: {0,1,3}
4: {0,1,4,6}
5: {0,1,4,9,11}
5: {0,2,7,8,11}
6: {0,1,4,10,12,17}
6: {0,1,4,10,15,17}
6: {0,1,8,11,13,17}
6: {0,1,8,12,14,17}
7: {0,1,4,10,18,23,25}
7: {0,1,7,11,20,23,25}
7: {0,2,3,10,16,21,25}
7: {0,2,7,13,21,22,25}
7: {0,1,11,16,19,23,25}
8: {0,1,4,9,15,22,32,34}
Also half the number of length-(n - 1) compositions of A003022(n) such that every consecutive subsequence has a different sum. For example, the a(2) = 1 through a(8) = 1 compositions are (A = 10):
2: (1)
3: (1,2)
4: (1,3,2)
5: (1,3,5,2)
5: (2,5,1,3)
6: (1,3,6,2,5)
6: (1,3,6,5,2)
6: (1,7,3,2,4)
6: (1,7,4,2,3)
7: (1,3,6,8,5,2)
7: (1,6,4,9,3,2)
7: (2,1,7,6,5,4)
7: (2,5,6,8,1,3)
7: (1,A,5,3,4,2)
8: (1,3,5,6,7,A,2)
(End)

Crossrefs

A079283 Marks on lexicographically earliest 6-mark optimal Golomb ruler.

Original entry on oeis.org

0, 1, 4, 10, 12, 17
Offset: 1

Views

Author

Daniel Smith (dsmith(AT)globalnet.co.uk), Feb 16 2003

Keywords

Comments

For 4 and 5 marks the analogous sets of marks are 0,1,4,6 and 0,1,4,9,11.

Crossrefs

Cf. A003022.

A106683 Triangle read by rows: row n gives marks on lexicographically earliest n-mark optimal Golomb ruler.

Original entry on oeis.org

0, 0, 1, 0, 1, 3, 0, 1, 4, 6, 0, 1, 4, 9, 11, 0, 1, 4, 10, 12, 17, 0, 1, 4, 10, 18, 23, 25, 0, 1, 4, 9, 15, 22, 32, 34, 0, 1, 5, 12, 25, 27, 35, 41, 44, 0, 1, 6, 10, 23, 26, 34, 41, 53, 55, 0, 1, 4, 13, 28, 33, 47, 54, 64, 70, 72, 0, 2, 6, 24, 29, 40, 43, 55, 68, 75, 76, 85, 0, 2, 5, 25, 37, 43, 59, 70, 85, 89, 98, 99, 106
Offset: 1

Views

Author

N. J. A. Sloane, Jun 04 2006

Keywords

Comments

Golomb ruler: Finite set with property that no difference between any two numbers is repeated and largest number is minimized.
See A003022 for further information and additional references.

Examples

			Triangle begins:
  0;
  0, 1;
  0, 1, 3;
  0, 1, 4,  6;
  0, 1, 4,  9, 11;
  0, 1, 4, 10, 12, 17;             A079283
  0, 1, 4, 10, 18, 23, 25;         A079287
  0, 1, 4,  9, 15, 22, 32, 34;     A079423
  0, 1, 5, 12, 25, 27, 35, 41, 44; A079425
  ...
		

Crossrefs

Extensions

Corrected by Andrey Zabolotskiy, Aug 22 2017

A004136 Additive bases: a(n) is the least integer k such that in the cyclic group Z_k there is a subset of n elements all pairs (of not necessarily distinct elements) of which add up to a different sum (in Z_k).

Original entry on oeis.org

1, 3, 7, 13, 21, 31, 48, 57, 73, 91, 120, 133, 168, 183, 255, 255, 273, 307
Offset: 1

Views

Author

Keywords

Comments

a(n) >= n^2-n+1 by a volume bound. A difference set construction by Singer shows that equality holds when n-1 is a prime power. When n is a prime power, a difference set construction by Bose shows that a(n) <= n^2-1. By computation, equality holds in the latter bound at least for 7, 11, 13 and 16.
From Fausto A. C. Cariboni, Aug 13 2017: (Start)
Lexicographically first basis that yields a(n) for n=15..18:
a(15) = 255 from {0,1,3,7,15,26,31,53,63,98,107,127,140,176,197}
a(16) = 255 from {0,1,3,7,15,26,31,53,63,98,107,127,140,176,197,215}
a(17) = 273 from {0,1,3,7,15,31,63,90,116,127,136,181,194,204,233,238,255}
a(18) = 307 from {0,1,3,21,25,31,68,77,91,170,177,185,196,212,225,257,269,274}
(End)
Such sets are also known as modular Golomb rulers, or circular Golomb rulers. - Andrey Zabolotskiy, Sep 11 2017

Examples

			a(3)=7: the set {0,1,3} is such a subset of Z_7, since 0+0, 0+1, 0+3, 1+1, 1+3 and 3+3 are all distinct in Z_7; also, no such 3-element set exists in any smaller cyclic group.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Extensions

More terms and comments from Harri Haanpaa (Harri.Haanpaa(AT)hut.fi), Oct 30 2000
a(15)-a(18) from Fausto A. C. Cariboni, Aug 13 2017

A303331 a(n) is the minimum size of a square integer grid allowing all triples of n points to form triangles of different areas.

Original entry on oeis.org

0, 1, 1, 2, 4, 6, 9, 11, 15, 19
Offset: 1

Views

Author

Bert Dobbelaere, Apr 30 2018

Keywords

Comments

Place n points on integer coordinates of a square grid of dimension L x L, so that no 3 points are collinear and the areas of the triangles formed by the binomial(n,3) possible triples are all different. a(n) is the minimum L for which this can be achieved. (Note that there are (L+1)^2 lattice points.)
The fact that all triangle areas are multiples of 1/2 and the maximum area supported by the grid is L^2/2 provides us with a lower bound for a(n).
The problem can be considered a 2-dimensional extension of a Golomb ruler and scales to higher dimensions. In general, consider k points on integer coordinates of a D-dimensional hypercube, forming binomial(k,D+1) D-simplices of which the volumes are all different. For D = 1, we recognize the Golomb ruler; for D = 2, we have the problem defined above.
Just like for Costas arrays (another 2-D extension of Golomb rulers), no 2 displacement vectors can be identical, as the diagonal of a parallelogram cuts the shape in triangles of identical area.
a(11) <= 24, a(12) <= 29. - Hugo Pfoertner, Nov 05 2018

Examples

			For n = 5, a solution satisfying unequal triangle areas is {(0,4),(1,1),(3,0),(3,3),(4,3)}, which can be verified by considering the binomial(5,3) = 10 possible triangles by selecting vertices from this set. Each coordinate is contained in the range [0..4]. No smaller solution is possible without creating areas that are no longer unique, hence a(5) = 4.
From _Jon E. Schoenfield_, Apr 30 2018: (Start)
Illustration of the above solution:
                        vertices   area
  4   1  .  .  .  .     --------   ----
                          1 2 3     2.5
  3   .  .  .  4  5       1 2 4     4.0
                          1 2 5     5.5
  2   .  .  .  .  .       1 3 4     4.5
                          1 3 5     6.5
  1   .  2  .  .  .       1 4 5     0.5
                          2 3 4     3.0
  0   .  .  .  3  .       2 3 5     3.5
  y                       2 4 5     1.0
    x 0  1  2  3  4       3 4 5     1.5
(End)
		

Crossrefs

For optimal Golomb rulers, see A003022.

Programs

  • Python
    def addNewAreas(plist, used_areas):
        # Attempt to add last point in plist. 'used_areas' contains all (areas*2)
        # between preplaced points and is updated
        m=len(plist)
        for i in range(m-2):
            for j in range(i+1,m-1):
                k=m-1
                p,q,r=plist[i],plist[j],plist[k]
                # Area = s/2 - using s enables us to use integers
                s=(p[0]*q[1]-p[1]*q[0]) + (q[0]*r[1]-q[1]*r[0]) + (r[0]*p[1]-r[1]*p[0])
                if s<0:
                    s=-s
                if s in used_areas:
                    return False # Area not unique
                else:
                    used_areas[s]=True
        return True
    def solveRecursively(n, L, plist, used_areas):
        m=len(plist)
        if m==n:
            #print plist (uncomment to show solution)
            return True
        newlist=plist+[None]
        if m>0:
            startidx=(L+1)*plist[m-1][0] + plist[m-1][1] + 1
        else:
            startidx=0
        for idx in range(startidx, (L+1)**2):
                newlist[m]=( idx/(L+1) , idx%(L+1) )
                newareas=dict(used_areas)
                if addNewAreas(newlist, newareas):
                    if solveRecursively(n, L, newlist, newareas):
                        return True
        return False
    def A303331(n):
        L=0
        while not solveRecursively(n, L, [], {0:True}):
            L+=1
        return L
    def A303331_list(N):
        return [A303331(n) for n in range(1,N+1)]
    # Bert Dobbelaere, May 01 2018

Formula

a(n+1) >= a(n) (trivial).
a(n) >= sqrt(n*(n-1)*(n-2)/6) for n >= 2 (proven lower bound).

A381476 Triangle read by rows: T(n,k) is the number of subsets of {1..n} with k elements such that every pair of distinct elements has a different difference, 0 <= k <= A143824(n).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 4, 6, 2, 1, 5, 10, 6, 1, 6, 15, 14, 1, 7, 21, 26, 2, 1, 8, 28, 44, 10, 1, 9, 36, 68, 26, 1, 10, 45, 100, 60, 1, 11, 55, 140, 110, 1, 12, 66, 190, 190, 4, 1, 13, 78, 250, 304, 22, 1, 14, 91, 322, 466, 68, 1, 15, 105, 406, 676, 156
Offset: 0

Views

Author

Andrew Howroyd, Mar 27 2025

Keywords

Comments

Equivalently, a(n) is the number of Sidon sets of {1..n} of size k.

Examples

			Triangle begins:
   0 | 1;
   1 | 1,  1;
   2 | 1,  2,  1;
   3 | 1,  3,  3;
   4 | 1,  4,  6,   2;
   5 | 1,  5, 10,   6;
   6 | 1,  6, 15,  14;
   7 | 1,  7, 21,  26,   2;
   8 | 1,  8, 28,  44,  10;
   9 | 1,  9, 36,  68,  26;
  10 | 1, 10, 45, 100,  60;
  11 | 1, 11, 55, 140, 110;
  12 | 1, 12, 66, 190, 190, 4;
  ...
		

Crossrefs

Columns 0..5 are A000012, A001477, A161680, A212964(n-1), A241688, A241689, A241690.
Row sums are A143823.

Programs

  • PARI
    row(n)={
      local(L=List());
      my(recurse(k,r,b,w)=
          if(k > n, if(r>=#L,listput(L,0)); L[1+r]++,
             self()(k+1, r, b, w);
             b+=1<
    				

Formula

T(n,A143824(n)) = A382395(n).
Previous Showing 11-20 of 50 results. Next