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.

A353077 Triangle read by rows, where the n-th row consists of the lexicographically earliest solution for n integers in 0..p-1 whose n*(n-1) differences are congruent to 1..p-1 (mod p), where p=n*(n-1)+1. If no solution exists, the n-th row consists of n -1's.

Original entry on oeis.org

0, 0, 1, 0, 1, 3, 0, 1, 3, 9, 0, 1, 4, 14, 16, 0, 1, 3, 8, 12, 18, -1, -1, -1, -1, -1, -1, -1, 0, 1, 3, 13, 32, 36, 43, 52, 0, 1, 3, 7, 15, 31, 36, 54, 63, 0, 1, 3, 9, 27, 49, 56, 61, 77, 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 3, 12, 20, 34, 38, 81, 88, 94, 104, 109
Offset: 1

Views

Author

Michel Marcus, Apr 22 2022

Keywords

Comments

Comment from Martin Becker, May 18 2025: (Start)
Rows k with k-1 not a prime power are precisely the rows with -1 values for k <= 2*10^10. Cf. the Gordon (2020) link.
In the b-file, values a(n) > 3 from row 17 onwards depend on the conjecture that all perfect difference sets are Singer type, and were obtained through computer enumeration of Singer type sets.
(End)

Examples

			   n   row
   1 [0];
   2 [0,1];
   3 [0,1,3];
   4 [0,1,3,9];
   5 [0,1,4,14,16];
   6 [0,1,3,8,12,18];
   7 no solution exists;
   8 [0,1,3,13,32,36,43,52];
   9 [0,1,3,7,15,31,36,54,63];
  10 [0,1,3,9,27,49,56,61,77,81];
  11 no solution exists;
  12 [0,1,3,12,20,34,38,81,88,94,104,109];
  13 no solution exists;
  14 [0,1,3,16,23,28,42,76,82,86,119,137,154,175];
  15 no solution exists;
  16 no solution exists.
		

Crossrefs

Programs

  • PARI
    isok(n, v) = my(p=n*(n-1)+1); setbinop((x,y)->lift(Mod(x-y, p)), v, v) == [0..p-1];
    row(n) = forsubset([n^2-n+1, n], s, my(ds = apply(x->x-1, Vec(s))); if (isok(n, ds), return(ds)););

Extensions

Name and data corrected for "lexicographically earliest solution" by Michel Marcus, May 09 2022
Adjusted to a regular triangle, and rows 1, 2, 7, and 10-12 inserted by Pontus von Brömssen, May 09 2022

A102508 Suppose there are equally spaced chairs around a round table. Then a(n) is the maximal number of chairs for which there exists a seating arrangement of n people around the table such that if a waiter puts two glasses (randomly) on the table in front of two (different) chairs, it is always possible to turn the table so that the two glasses end up in front of two seated persons.

Original entry on oeis.org

1, 3, 7, 13, 21, 31, 39, 57, 73, 91, 95, 133
Offset: 1

Views

Author

Ard Van Moer (ard.van.moer(AT)vub.ac.be), Mar 15 2005

Keywords

Comments

a(n) <= n(n-1)+1. Moreover, a(n)=n(n-1)+1 iff A058241(n)>0, i.e., when a perfect difference set modulo n(n-1)+1 exists. In particular, a(12) = 133, a(14)=183, a(17)=273, etc.
This problem is a circular analog of an optimal ruler problem; see A004137. - David Wasserman, Apr 15 2008
Solutions do not always exist for table sizes less than a(n). For example, for n = 5 there is no solution for a table of size 20. - David Wasserman, Apr 15 2008
Equivalently, largest value of S such that in some cyclic array of positive integers of length n, every positive integer <= S is the sum of consecutive terms. For example, the numbers 1..21 can be written as the sum of consecutive terms in the cyclic array [10,3,1,5,2]. So a(5) = 21. - Phil Scovis, Jan 29 2016
If there exists a ruler of length L and n marks, then it can be trivially transformed to a ruler of length L and n+1 marks, by simply dividing one of the segments into two. In other words, a(n+1) >= a(n). - Dmitry Kamenetsky, Aug 02 2025
a(14)=183, a(17)=273, a(18)=307, a(20)=381, a(24)=553 and so on. See Dan Gordon's site in links. - Dmitry Kamenetsky, Aug 02 2025
a(16) >= 195, since every length from 1 to 195 can be generated with the cyclic ruler [3,14,2,5,29,1,4,66,6,9,11,1,1,10,8,25]. - Dmitry Kamenetsky, Aug 02 2025

Examples

			a(5)=21 because if we have 21 chairs, 5 persons can sit down on chairs 1, 4, 5, 10 and 12. 1 == 5-4 (mod 21). 2 == 12-10 (mod 21). 3 == 4-1 (mod 21). 4 == 5-1 (mod 21). 5 == 10-5 (mod 21). 6 == 10-4 (mod 21). 7 == 12-5 (mod 21). 8 == 12-4 (mod 21). 9 == 10-1 (mod 21). 10 == 1-12 (mod 21). It is impossible to do the same with 22 or more chairs.
		

Crossrefs

Extensions

3 more terms from David Wasserman, Apr 15 2008
Edited by Max Alekseyev, Apr 29 2010, Mar 01 2015
a(11) = 95 from Don Reble, Feb 25 2015. - N. J. A. Sloane, Mar 01 2015
a(12) from Max Alekseyev, Mar 01 2015

A351690 a(n) is the number of n-subsets of [0..p-1] whose n*(n-1) differences are congruent to 1..p-1 (mod p), where p=n*(n-1)+1.

Original entry on oeis.org

1, 3, 14, 52, 42, 310, 0, 684, 584, 1092, 0, 4788, 0, 7320, 0, 0, 3276, 31314, 0, 32004, 0, 0, 0
Offset: 1

Views

Author

Michel Marcus, May 05 2022

Keywords

Crossrefs

Programs

  • PARI
    isok(n, v) = my(p=n*(n-1)+1); setbinop((x, y)->lift(Mod(x-y, p)), v, v) == [0..p-1];
    a(n) = my(nb=0); forsubset([n^2-n+1, n], s, my(ds = apply(x->x-1, Vec(s))); if (isok(n, ds), nb++)); nb;

Formula

a(n) = 2*(n*(n-1)+1)*A058241(n) for n >= 3. - Pontus von Brömssen, May 09 2022

Extensions

Name edited by Pontus von Brömssen, May 07 2022
a(1)-a(2) and a(8)-a(23) (based on data for A058241) from Pontus von Brömssen, May 09 2022

A353108 a(n) is the number of cycles of n numbers arranged so that every integer in 1..n*(n-1)+1 occurs as the sum of up to n adjacent numbers. Both a solution and its reverse are counted unless they are identical.

Original entry on oeis.org

1, 1, 2, 4, 2, 10, 0, 12, 8, 12, 0, 36, 0, 40, 0, 0, 12, 102, 0, 84, 0, 0, 0
Offset: 1

Views

Author

Paul K. Davies, Jun 18 2022

Keywords

Comments

For n = 1 and n = 2, there is only one solution, and it is counted once because the numbers encountered in moving around the circle, starting at 1, are the same regardless of direction; see Example section.

Examples

			For n = 1, the only solution consists of the single number { 1 }, and a "cycle" consisting of { 1 } is the same whether read forward or backward, so a(1) = 1.
For n = 2, the only solution (starting at 1) consists of the two numbers { 1, 2 }; arranging these around a circle as
        1
      /   \
      \   /
        2
gives the same cycle, i.e., { 1, 2 } whether read clockwise or counterclockwise from 1, so a(2) = 1.
For n = 3, the two cycles (starting at 1) are { 1, 2, 4 } and { 1, 4, 2 }, so a(3) = 2.
For n = 8, the twelve solutions are
  { 1,  2, 10, 19,  4,  7,  9,  5 },
  { 1,  3,  5, 11,  2, 12, 17,  6 },
  { 1,  3,  8,  2, 16,  7, 15,  5 },
  { 1,  4,  2, 10, 18,  3, 11,  8 },
  { 1,  4, 22,  7,  3,  6,  2, 12 },
  { 1,  6, 12,  4, 21,  3,  2,  8 },
and the same six cycles read in the opposite direction from 1 (e.g.,
  { 1,  2, 10, 19,  4,  7,  9,  5 }
read in reverse order starting at 1 is
  { 1,  5,  9,  7,  4, 19, 10,  2 }
each of which counts as a separate solution), so a(8) = 12.
		

Crossrefs

Cf. A058241.

Formula

a(n) = 2 * A058241(n) for n > 2.

Extensions

a(12)-a(23) computed from A058241 by Max Alekseyev, Jun 10 2023
Showing 1-4 of 4 results.