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.

A004135 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 distinct elements) of which add up to a different sum (in Z_k).

Original entry on oeis.org

1, 2, 3, 6, 11, 19, 28, 40, 56, 72, 96, 114, 147, 178, 183, 252, 255
Offset: 1

Views

Author

Keywords

Comments

From Fausto A. C. Cariboni, Oct 08 2017: (Start)
Lexicographically first basis that yields a(n) for n=16:
a(16) = 252 from {0,1,2,4,32,47,54,65,94,120,128,145,169,196,217,240}
(End)
From Fausto A. C. Cariboni, Mar 12 2018: (Start)
Lexicographically first basis that yields a(n) for n=17:
a(17) = 255 from {0,1,2,4,8,16,27,32,54,64,99,108,128,141,177,198,216}
(End)

Examples

			a(4)=6: the set {0,1,2,4} is such a subset of Z_6, since 0+1, 0+2, 0+4, 1+2, 1+4 and 2+4 are all distinct in Z_6; also, no such 4-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), Nov 01 2000
a(16) from Fausto A. C. Cariboni, Oct 08 2017
a(17) from Fausto A. C. Cariboni, Mar 12 2018

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

A232234 Additive bases: a(n) is the least integer such that there is an n-element set of nonnegative integers, the sums of pairs of which are distinct and at most a(n).

Original entry on oeis.org

0, 2, 6, 12, 22, 34, 50, 68, 88, 110, 144, 170, 212, 254, 302, 354, 398, 432, 492, 566, 666, 712, 744, 850, 960, 984, 1106
Offset: 1

Views

Author

N. J. A. Sloane, Nov 24 2013

Keywords

Comments

By definition, these terms are twice the terms of A003022, see comment there. - Bernd Mulansky, Jun 25 2021
Lexicographically first basis that yields a(16) = 354 is {0,1,4,11,26,32,56,68,76,115,117,134,150,163,168,177}. - Fausto A. C. Cariboni, Nov 01 2017
Lexicographically first basis that yields a(17) = 398 is {0,5,7,17,52,56,67,80,81,100,122,138,159,165,168,191,199}. - Fausto A. C. Cariboni, Nov 26 2017

Crossrefs

These terms are twice the terms of A003022.
See A004133 for another version.

Extensions

a(16) from Fausto A. C. Cariboni, Nov 01 2017
a(17) from Fausto A. C. Cariboni, Nov 26 2017
a(18)-a(27) added by Bernd Mulansky, Jun 25 2021

A345731 Additive bases: a(n) is the least integer such that there is an n-element set of integers between 0 and a(n), the sums of pairs (of distinct elements) of which are distinct.

Original entry on oeis.org

1, 2, 4, 7, 12, 18, 24, 34, 45, 57, 71, 86, 105, 126, 148
Offset: 2

Views

Author

Bernd Mulansky, Jun 25 2021

Keywords

Comments

Such sets are known as weak Sidon sets, weak B_2 sets, or well-spread sequences.
n - 1 <= a(n) <= A003022(n). - Michael S. Branicky, Jun 25 2021

Examples

			a(6)=12 because 0-1-2-4-7-12 (0-5-8-10-11-12) resp. 0-1-2-6-9-12 (0-3-6-10-11-12) are shortest weak Sidon sets of size 6.
a(16)=148: [0, 3, 5, 6, 32, 49, 59, 68, 93, 106, 118, 126, 130, 134, 141, 148]. - _Zhao Hui Du_, Jul 27 2025
		

References

  • Alison M. Marr and W. D. Wallis, Magic Graphs, Birkhäuser, 2nd ed., 2013. See Section 2.3.
  • Xiaodong Xu, Meilian Liang, and Zehui Shao, On weak Sidon sequences, The Journal of Combinatorial Mathematics and Combinatorial Computing (2014), 107--113

Crossrefs

See A003022, A004133, and A004135 for other versions.

Programs

  • Mathematica
    a[n_Integer?NonNegative] := Module[{k = n - 1}, While[SelectFirst[Subsets[Range[0, k - 1], {n - 1}], Length@Union[Plus @@@ Subsets[#~Join~{k}, {2}]] >= (n*(n - 1))/2 &] === Missing["NotFound"], k++]; k];
    Table[a[n], {n, 2, 8}] (* Robert P. P. McKone, Nov 05 2023 *)
  • Python
    from itertools import combinations, count
    def a(n):
        for k in count(n-1):
            for c in combinations(range(k), n-1):
                c = c + (k,)
                ss = set()
                for s in combinations(c, 2):
                    if sum(s) in ss: break
                    else: ss.add(sum(s))
                if len(ss) == n*(n-1)//2: return k # use (k, c) for sets
    print([a(n) for n in range(2, 9)]) # Michael S. Branicky, Jun 25 2021

Extensions

a(16) corrected and a(17) deleted by Zhao Hui Du, Jul 27 2025
Showing 1-4 of 4 results.