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

A235538 Earliest infinite sequence of natural numbers such that the members of this sequence as well as the absolute values of the members of the k-th differences of this sequence, for all k>0, are all distinct.

Original entry on oeis.org

1, 3, 9, 26, 5, 13, 31, 15, 27, 81, 22, 45, 92, 20, 50, 145, 46, 89, 32, 71, 151, 40, 75, 163, 73, 124, 60, 126, 244, 97, 219, 63, 132, 306, 68, 144, 297, 79, 166, 354, 83, 187, 394, 94, 203, 419, 108, 220, 460, 127, 260, 110, 247, 513, 161, 340, 117, 252
Offset: 1

Views

Author

Paul Tek, Jan 12 2014

Keywords

Examples

			For n=1:
- 1 is admissible; hence a(1)=1.
For n=2:
- 1 is not admissible (as it already appears in the sequence),
- 2 is not admissible (as a(1) would appear in the first differences),
- 3 is admissible; hence a(2)=3.
For n=3:
- 1 is not admissible (as it already appears in the sequence),
- 2 is not admissible (as it already appears in the first differences),
- 3 is not admissible (as it already appears in the sequence),
- 4 is not admissible (as a(1) would appear in the first differences),
- 5 is not admissible (as 2 would appear twice in the first differences),
- 6 is not admissible (as a(2) would appear in the first differences),
- 7 is not admissible (as 2 would appear in the first and second differences),
- 8 is not admissible (as a(2) would appear in the second differences),
- 9 is admissible; hence a(3)=9.
		

Crossrefs

Programs

  • Mathematica
    a[1] = 1; diffs0 = {1} (* flattened array of successive differences *);
    a[n_] := a[n] = Module[{}, aa = Array[a, n-1]; m0 = 1; While[ MemberQ[ diffs0, m0], m0++]; For[m = m0, True, m++, am = Append[aa, m]; td = Table[Differences[am, k], {k, 0, n-1}]; diffs = Abs[Flatten[td]]; If[ Length[diffs] == Length[Union[diffs]], diffs0 = diffs//Sort; Return[m]]] ];
    Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 100}] (* Jean-François Alcover, Jan 31 2018 *)
  • Perl
    See Link section.

Extensions

Added "infinite" to definition. - N. J. A. Sloane, Oct 05 2019

A062292 A B_2 sequence: a(n) is the smallest cube such that the pairwise sums of {a(1)...a(n)} are all distinct.

Original entry on oeis.org

1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 1331, 2197, 2744, 3375, 4913, 5832, 6859, 8000, 9261, 10648, 12167, 15625, 17576, 19683, 21952, 24389, 27000, 29791, 35937, 42875, 50653, 54872, 59319, 64000, 68921, 74088, 79507, 85184, 91125, 97336
Offset: 1

Views

Author

Labos Elemer, Jul 02 2001

Keywords

Comments

A Mian-Chowla sequence consisting only of cubes.

Examples

			During recursive construction of this set, for n=1-50, the cubes of 12,18,24,32,34,36,48 are left out to keep all sums of distinct cubes distinct from each other.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def A062292_gen(): # generator of terms
        aset1, aset2, alist = set(), set(), []
        for k in (n**3 for n in count(1)):
            bset2 = {k<<1}
            if (k<<1) not in aset2:
                for d in aset1:
                    if (m:=d+k) in aset2:
                        break
                    bset2.add(m)
                else:
                    yield k
                    alist.append(k)
                    aset1.add(k)
                    aset2.update(bset2)
    A062292_list = list(islice(A062292_gen(),30)) # Chai Wah Wu, Sep 05 2023

A080932 Non-occurring pairwise differences between the elements of the Mian-Chowla sequence variant A058335.

Original entry on oeis.org

26, 33, 50, 55, 68, 93, 94, 98, 107, 108, 109, 115, 122, 138, 144, 150, 155, 163, 178, 181, 182, 183, 185, 186, 193, 196, 200, 202, 204, 208, 210, 212, 223, 227, 232, 235, 239, 242, 245, 250, 253, 257, 263, 264, 268
Offset: 1

Views

Author

Hugo Pfoertner, Feb 24 2003

Keywords

References

Crossrefs

A096772 A B3-sequence: a(1) = 1; for n>1, a(n) = smallest number > a(n-1) such that the sums of any three terms are all distinct.

Original entry on oeis.org

1, 2, 5, 14, 33, 72, 125, 219, 376, 573, 745, 1209, 1557, 2442, 3098, 4048, 5298, 6704, 7839, 10987, 12332, 15465, 19144, 24546, 28974, 34406, 37769, 45864, 50877, 61372, 68303, 77918, 88545, 101917, 122032, 131625, 148575, 171237, 197815, 201454
Offset: 1

Views

Author

Rick L. Shepherd, Aug 15 2004

Keywords

Comments

This is the B3-sequence analog of the Mian-Chowla B2-sequence (A005282): Let a(1)=1; then use the greedy algorithm to choose the smallest a(n) > a(n-1) such that all sums a(i) + a(j) + a(k) are distinct for 1 <= i <= j <= k <= n. The reciprocal sum of the sequence for the first forty terms is 1.837412....

Crossrefs

Row 3 of A347570.
Cf. A005282 (Mian-Chowla B2-sequence). A051912.

Programs

  • Python
    from itertools import count, islice
    def A096772_gen(): # generator of terms
        aset1, aset2, aset3, alist = set(), set(), set(), []
        for k in count(1):
            bset2, bset3 = {k<<1}, {3*k}
            if 3*k not in aset3:
                for d in aset1:
                    if (m:=d+(k<<1)) in aset3:
                        break
                    bset2.add(d+k)
                    bset3.add(m)
                else:
                    for d in aset2:
                        if (m:=d+k) in aset3:
                            break
                        bset3.add(m)
                    else:
                        yield k
                        alist.append(k)
                        aset1.add(k)
                        aset2 |= bset2
                        aset3 |= bset3
    A096772_list = list(islice(A096772_gen(),30)) # Chai Wah Wu, Sep 05 2023

Formula

a(n) = A051912(n-1) + 1. - Peter Kagey, Oct 20 2021

A133605 Elements of A011185 that are also the sum of a pair of distinct elements of A011185.

Original entry on oeis.org

3, 5, 8, 13, 21, 74, 95, 182, 212, 413, 862, 1060, 1435, 1934, 4447, 5323, 7588, 19934, 23725, 24970, 29558, 43344, 45425, 48622, 55240, 63835, 91336, 98178, 177387, 180356, 206088, 333837, 400924, 418503, 429115, 598604, 776150, 990510, 993089
Offset: 1

Views

Author

Klaus Brockhaus, Sep 18 2007

Keywords

Comments

A011185 is the sequence of smallest numbers such that the pairwise sums of distinct elements are all distinct.

Examples

			A011185(1) = 1, A011185(2) = 2. 1 + 2 = 3 = A011185(3), hence 3 is in the sequence.
A011185(16) = 212, A011185(35) = 1722. 212 + 1722 = 1934 = A011185(37), hence 1934 is in the sequence.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def A133605_gen(): # generator of terms
        aset2, alist = set(), []
        for k in count(1):
            bset2 = set()
            for a in alist:
                if (b:=a+k) in aset2:
                    break
                bset2.add(b)
            else:
                if k in aset2:
                    yield k
                alist.append(k)
                aset2.update(bset2)
    A133605_list = list(islice(A133605_gen(),30)) # Chai Wah Wu, Sep 11 2023

A247556 Exact differential base (a B_2 sequence) constructed as follows: Start with a(0)=0. For n>=1, let S be the set of all differences a(j)-a(i) for 0 <= i < j <= n-1, and let d be the smallest positive integer not in S. If, for every i in 1..n-1, a(n-1) + d - a(i) is not in S, then a(n) = a(n-1) + d. Otherwise, let r be the smallest positive integer such that, for every i in 1..n-1, neither a(n-1) + r - a(i) nor a(n-1) + r + d - a(i) is in S; then a(n) = a(n-1) + r and a(n+1) = a(n) + d.

Original entry on oeis.org

0, 1, 3, 7, 12, 20, 30, 44, 65, 80, 96, 143, 165, 199, 224, 306, 332, 415, 443, 591, 624, 678, 716, 934, 973, 1134, 1174, 1449, 1491, 1674, 1720, 2113, 2161, 2468, 2517, 2855, 2906, 2961, 3245, 3302, 3711, 3772, 4081, 4148, 4603, 4673, 5557, 5628, 5917, 5989
Offset: 0

Views

Author

Thomas Ordowski, Sep 19 2014

Keywords

Comments

Every positive integer is uniquely represented as a difference of two distinct elements of the base set. This is a B_2 sequence.
By the definition of this sequence, with d as the smallest unused difference among terms a(0)..a(n-1), we assign a(n) = a(n-1) + d, provided that this would not cause any difference to be repeated; otherwise, we assign a(n) = a(n-1) + r and a(n+1) = a(n) + d, where r is the smallest integer that allows this assignment of a(n) and a(n+1) without causing any difference to be repeated. Thus, at each step, the smallest unused difference d is either used immediately (as a(n) - a(n-1)) or delayed by one step (and used as a(n+1) - a(n)). In this way, the sequence includes every positive integer as a difference (unlike the Mian-Chowla sequence A005282, which omits differences 33, 88, 98, 99, ...; see A080200).
The set is an optimization of Browkin's base, where r = a(n-1) + 1.
The series Sum_{n>=0} 1/(a(n+1) - a(n)) is divergent.
Conjecture: lim inf_{n->oo} (a(n+1) - a(n))/n = 1/2.

Examples

			Given a(0)=0, a(1)=1, a(2)=3, a(3)=7, the differences used are 1,2,3,4,6,7, so d=5, and we can use a(4) = a(3)+d = 7+5 = 12 because appending a(4)=12 to the sequence will result in the differences 12-0=12, 12-1=11, 12-3=9, 12-7=5, none of which had already been used.
Similarly, given a(0)..a(4) = 0,1,3,7,12, the differences used are 1..7,9,11,12, so d=8, and we can use a(5) = a(4)+d = 12+8 = 20 because the resulting differences will be 20, 19, 17, 13, 8, none of which had already been used.
Proceeding as above, we get a(6)=30 and a(7)=44.
Given a(0)..a(7) = 0,1,3,7,12,20,30,44, the differences used are 1..14,17..20,23..24,27,29..30,32,37,41,43..44, so d=15, but we cannot use a(8) = a(7)+d = 44+15 = 59 because the difference 29 would be repeated: 59-30 = 30-1. Thus, we must find the smallest r such that using both a(8) = a(7)+r and a(9) = a(8)+d will not repeat any differences. The smallest such r is 21, so a(8) = a(7)+r = 44+21 = 65 and a(9) = a(8)+d = 65+15 = 80.
		

References

  • Jerzy Browkin, Rozwiązanie pewnego zagadnienia A. Schinzla (Polish) [The solution of a certain problem of A. Schinzel], Roczniki Polskiego Towarzystwa Matematycznego [Annals Polish Mathematical Society], Seria I, Prace Matematyczne III (1959).

Crossrefs

Cf. A001856, where a(1)=1, a(2)=2, a(2n+1)=2*a(2n), a(2n+2) = a(2n+1) + d.
Cf. A005282 (Mian-Chowla sequence), A025582.
Cf. A080200.

Formula

a(n) >= A025582(n+1) and for n <= 10 is here equality.
Conjecture: a(n) ~ log(log(n))*A025582(n+1), where A025582(m)+1 = A005282(m) is the Mian-Chowla sequence.

Extensions

More terms from Jon E. Schoenfield, Jan 18 2015
Edited by Jon E. Schoenfield, Jan 22 2015

A284916 Lexicographically earliest sequence of positive integers such that the same (Euclidean) distance does not occur twice between any two distinct pairs of points ((n, a(n)), (k, a(k))).

Original entry on oeis.org

1, 1, 2, 5, 9, 14, 7, 19, 25, 2, 33, 43, 54, 67, 27, 47, 64, 78, 94, 118, 17, 129, 144, 103, 156, 174, 199, 37, 114, 199, 78, 183, 220, 168, 239, 70, 272, 302, 258, 292, 311, 350, 376, 409, 431, 458, 479, 324, 504, 550, 281, 424, 563, 527, 489, 591, 129, 636
Offset: 1

Views

Author

Peter Kagey, Apr 05 2017

Keywords

Examples

			Let p_n = (n, a(n)).
For n = 4, a(4) = 5 because
d(p_3, p_4) = sqrt(2) = d(p_2, p_3) if a(4) = 1,
d(p_3, p_4) = 1       = d(p_1, p_2) if a(4) = 2,
d(p_3, p_4) = sqrt(2) = d(p_2, p_3) if a(4) = 3,
d(p_3, p_4) = sqrt(5) = d(p_1, p_3) if a(4) = 4, therefore
a(4) = 5, the least value that does not create a contradiction.
		

Crossrefs

Cf. A005282 (Chebyshev distance), A284917 (Taxicab distance).

Programs

  • Mathematica
    dq[p_, q_] := Total[(p - q)^2]; good[w_] := Catch[ Do[ If[ MemberQ[di, dq[w, P[[i]]]], Throw@False], {i, Length@ P}]; True];P = di = {}; n = 0; While[n < 58, n++; k = 1; While[! good[{n, k}], k++]; di = Join[di, dq[{n, k}, #] & /@ P]; AppendTo[P, {n, k}]]; Last /@ P (* Giovanni Resta, Apr 06 2017 *)

A284917 Lexicographically earliest infinite sequence of positive integers such that the Taxicab distance is unique to each pair of distinct points ((n, a(n)), (k, a(k))).

Original entry on oeis.org

1, 1, 2, 5, 9, 16, 25, 38, 58, 72, 87, 112, 136, 169, 190, 237, 274, 344, 383, 456, 545, 572, 640, 752, 798, 891, 944, 989, 1131, 1283, 1365, 1492, 1540, 1788, 1862, 1994, 2218, 2342, 2472, 2741, 2885, 3114, 3312, 3548, 3753, 3953, 4251, 4386, 4731, 4802, 5073
Offset: 1

Views

Author

Peter Kagey, Apr 05 2017

Keywords

Comments

Conjecture: This sequence is strictly increasing for n > 1.

Examples

			Let p_n = (n, a(n)).
For n = 4, a(4) = 5 because
d(p_1, p_4) = 3 = d(p_1, p_3) if a(4) = 1,
d(p_3, p_4) = 1 = d(p_1, p_2) if a(4) = 2,
d(p_3, p_4) = 2 = d(p_2, p_3) if a(4) = 3,
d(p_3, p_4) = 3 = d(p_1, p_3) if a(4) = 4, therefore
a(4) = 5, the least value that does not create a contradiction.
		

Crossrefs

Cf. A005282 (Chebyshev distance), A284916 (Euclidean distance).

Programs

  • Mathematica
    dq[p_, q_] := Total@Abs[p - q]; good[w_] := Catch[Do[If[ MemberQ[di, dq[w, P[[i]]]], Throw@False], {i, Length@P}]; True]; di = P = {}; n = 0; While[n < 51, n++; k = 1; While[! good[{n, k}], k++]; di = Join[di, dq[{n, k}, #] & /@ P]; AppendTo[P, {n, k}]]; Last /@ P (* Giovanni Resta, Apr 06 2017 *)

A293542 a(1)=1; for n>1, a(n) = least integer greater than a(n-1) such that the sums of the divisors of the pairwise sums of a(1),...,a(n) are all distinct.

Original entry on oeis.org

1, 2, 4, 8, 19, 28, 56, 72, 101, 144, 202, 240, 261, 448, 511, 602, 772, 806, 1152, 1296, 1541, 1602, 2016, 2256, 2900, 3322, 3362, 3978, 4376, 5887, 6416, 7702, 8228, 8578, 11341, 11382, 13376, 13692, 16083, 16380, 16544, 17382, 22726, 24944, 26302, 27508, 30580, 33184, 34020, 37474
Offset: 1

Views

Author

Logan J. Kleinwaks, Oct 11 2017

Keywords

Examples

			Let s(n) be the sum of the divisors of n. a(3)!=3 because s(1+3)=s(2+2)=7. a(3)=4 because s(1+1)=3, s(1+2)=4, s(1+4)=6, s(2+2)=7, s(2+4)=12, and s(4,4)=15 are all distinct.
		

Crossrefs

A333866 Lexicographically earliest sequence of distinct positive integers, which when mapped onto a square spiral, gives a set without four distinct points forming a square.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 17, 18, 20, 21, 26, 27, 30, 31, 37, 38, 41, 43, 44, 46, 50, 52, 55, 57, 58, 65, 66, 70, 73, 79, 82, 83, 88, 91, 92, 101, 102, 104, 110, 111, 116, 122, 124, 127, 132, 133, 141, 143, 145, 146, 152, 156, 157, 167, 170, 171, 180
Offset: 1

Views

Author

Rémy Sigrist, Apr 08 2020

Keywords

Comments

This sequence has similarities with A005282.

Examples

			The first terms, mapped onto a square spiral, are:
        65---*---*---*---*---*---*--58--57
         |                               |
        66  37---*---*---*---*---*--31   *
         |   |                       |   |
         *  38  17---*---*--14--13  30  55
         |   |   |               |   |   |
         *   *  18   5---*---3   *   *   * <-- As the sequence contains 2, 13
         |   |   |   |       |   |   |   |     and 27, it cannot contain 54.
         *   *   *   6   1---2  11   *   *
         |   |   |   |           |   |   |
        70  41  20   7---*---*--10  27  52
         |   |   |                   |   |
         *   *  21---*---*---*---*--26   *
         |   |                           |
         *  43--44---*--46---*---*---*--50
         |
        73---*---*---*---*---*--79---*---*
		

Crossrefs

See A333825 for a similar sequences.
Previous Showing 41-50 of 60 results. Next