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-5 of 5 results.

A011185 A B_2 sequence: a(n) = least value such that sequence increases and pairwise sums of distinct elements are all distinct.

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 21, 30, 39, 53, 74, 95, 128, 152, 182, 212, 258, 316, 374, 413, 476, 531, 546, 608, 717, 798, 862, 965, 1060, 1161, 1307, 1386, 1435, 1556, 1722, 1834, 1934, 2058, 2261, 2497, 2699, 2874, 3061, 3197, 3332, 3629, 3712, 3868, 4140, 4447, 4640
Offset: 1

Views

Author

Keywords

Comments

a(n) = least positive integer > a(n-1) and not equal to a(i)+a(j)-a(k) for distinct i and j with 1 <= i,j,k <= n-1. [Comment corrected by Jean-Paul Delahaye, Oct 02 2020.]

Crossrefs

Programs

  • Python
    from itertools import islice
    def agen(): # generator of terms
        aset, sset, k = set(), set(), 0
        while True:
            k += 1
            while any(k+an in sset for an in aset): k += 1
            yield k; sset.update(k+an for an in aset); aset.add(k)
    print(list(islice(agen(), 51))) # Michael S. Branicky, Feb 05 2023

Formula

a(n) = A010672(n-1)+1.

A051912 a(n) is the smallest integer such that the sum of any three ordered terms a(k), k <= n, is unique.

Original entry on oeis.org

0, 1, 4, 13, 32, 71, 124, 218, 375, 572, 744, 1208, 1556, 2441, 3097, 4047, 5297, 6703, 7838, 10986, 12331, 15464, 19143, 24545, 28973, 34405, 37768, 45863, 50876, 61371, 68302, 77917, 88544, 101916, 122031, 131624, 148574, 171236, 197814
Offset: 0

Views

Author

Wouter Meeussen, Dec 17 1999

Keywords

Examples

			Three terms chosen from {0,1,4} can be 0+0+0; 0+0+1; 0+1+1; 1+1+1; 0+0+4; 0+1+4; 1+1+4; 0+4+4; 1+4+4; 4+4+4 are all distinct (3*4*5/6 = 10 terms), so a(2) = 4 is the next integer of the sequence after 0 and 1.
		

Crossrefs

Row 3 of A365515.

Programs

  • Maple
    A[0]:= 0: S:= {0}: S2:= {0}: S3:= {0}:
    for i from 1 to 40 do
      for x from A[i-1] do
        if (map(t -> t+x,S2) intersect S3 = {}) and (map(t -> t+2*x, S) intersect S3 = {}) then
         A[i]:= x;
         S3:= S3 union map(t -> t+x,S2) union map(t -> t+2*x, S) union {3*x};
         S2:= S2 union map(t -> t+x, S) union {2*x};
         S:= S union {x};
         break
        fi
      od
    od:
    seq(A[i],i=0..40); # Robert Israel, Jul 01 2019
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = For[A0 = Array[a, n, 0]; an = a[n-1] + 1, True, an++, A1 = Append[A0, an]; A2 = Flatten[Table[A1[[{i, j, k}]], {i, 1, n+1}, {j, i, n+1}, {k, j, n+1}], 2]; A3 = Sort[Total /@ A2]; If[Length[A3] == Length[Union[A3]], Return[an]]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 38}] (* Jean-François Alcover, Nov 24 2016 *)
  • Python
    from itertools import count, islice
    def A051912_gen(): # generator of terms
        aset1, aset2, aset3, alist = set(), set(), set(), []
        for k in count(0):
            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
    A051912_list = list(islice(A051912_gen(),20)) # Chai Wah Wu, Sep 01 2023

Extensions

More terms from Naohiro Nomoto, Jul 22 2001

A062065 a(1) = 1; for n >= 1, a(n+1) is smallest number such that the sums of any one, two or three of a(1), ..., a(n) are distinct (repetitions not allowed).

Original entry on oeis.org

1, 2, 4, 8, 15, 28, 52, 96, 165, 278, 460, 663, 980, 1332, 1864, 2609, 3375, 4769, 5600, 6776, 9141, 11505, 14453, 17404, 21904, 25023, 31159, 35006, 42780, 51792, 55799, 68834, 75036, 87163, 96746, 116231, 128924, 144085, 172606, 193507, 207826
Offset: 1

Views

Author

Olivier Gérard, Jun 26 2001

Keywords

Examples

			1,2,1+2 are different so a(2) = 2; 1,2,3,1+2,1+3,2+3,1+2+3 are not all different (3 = 1+2) so a(3) is not 3; 1,2,4,1+2,1+4,2+4,1+2+4 are all different so a(3) = 4.
		

Crossrefs

Programs

  • PARI
    {unique(v)=local(b); b=1; for(j=2,length(v),if(v[j-1]==v[j],b=0)); b}
    {news(v,q)=local(s); s=[]; for(i=1,length(v),s=concat(s,v[i]+q)); s}
    {m=210000; print1(p=1,","); w1=[p]; w2=[]; w3=[]; q=p+1; while(qKlaus Brockhaus, May 17 2003
    
  • Python
    from itertools import count, islice
    def A062065_gen(): # generator of terms
        aset2, aset3, alist = set(), set(), [1]
        yield 1
        for k in count(2):
            bset2, bset3 = set(), set()
            if not (k in aset2 or k in aset3):
                for a in alist:
                    if (b2:=a+k) in aset2 or b2 in aset3:
                        break
                    bset2.add(b2)
                else:
                    for a2 in aset2:
                        if (b3:=a2+k) in aset2 or b3 in aset3:
                            break
                        bset3.add(b3)
                    else:
                        yield k
                        alist.append(k)
                        aset2.update(bset2)
                        aset3.update(bset3)
    A062065_list = list(islice(A062065_gen(),20)) # Chai Wah Wu, Sep 10 2023

Extensions

More terms from Naohiro Nomoto, Oct 07 2001
Terms a(27) to a(41) from Klaus Brockhaus, May 17 2003

A349777 Lexicographically first sequence of positive integers such that all disjoint equivalent sets of K terms have distinct sums for 1 <= K <= 4.

Original entry on oeis.org

1, 2, 3, 5, 8, 14, 25, 45, 85, 162, 310, 595, 1107, 2052, 3515, 5925, 9798, 16169, 23295, 34303, 53259, 72215, 112624, 153552, 198523, 283570, 370114, 497383, 700022, 840817, 1145415, 1398434, 1717972, 2279969, 2819186, 3436864, 4299205, 5239007, 6335442, 7650495, 9219214
Offset: 1

Views

Author

Santanu Banerjee, Nov 29 2021

Keywords

Crossrefs

Cf. A011185 (k=1..2), A036241 (k=1..3).
A005318 and A276661 are similar sequences.

Programs

  • Mathematica
    a={};k=1;Do[While[(t=1;While[t<=4&&DuplicateFreeQ[Total/@Subsets[Join[a,{k}],{t}]],t++];t)<=4,k++];AppendTo[a,k];Print@k,30] (* Giorgos Kalogeropoulos, Dec 02 2021 *)
  • Python
    # See links.

Extensions

a(13)-a(26) from Alois P. Heinz, Dec 01 2021
a(27)-a(41) from Gleb Ivanov, Dec 02 2021

A079854 a(1) = 1, a(k) divides a(k+r) for all k and r and the ratios a(k+r)/a(k) are all different.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 840, 6720, 60480, 604800, 6652800, 86486400, 1210809600, 18162144000, 308756448000, 4940103168000, 88921857024000, 1689515283456000, 35479820952576000, 780556060956672000, 17952789402003456000
Offset: 1

Views

Author

Amarnath Murthy, Feb 19 2003

Keywords

Examples

			a(7) != 120*1, 120*2, ..., 120*6 as the ratios 1,2,3,...,6 appeared as 1/1, 2/1, 6/2, 24/6, 120/24, 6/1. So a(7) = 7*120 = 840.
		

Crossrefs

Programs

  • Mathematica
    f[l_List] := Block[{n = Length[l], w, k = 1, r = l[[ -1]]/l},w = Flatten[Table[Take[l, i - n]/l[[i]], {i, n}]];While[Intersection[w, k*r] != {}, k++ ];Append[l, k*l[[ -1]]]];Nest[f, {1}, 21] (* Ray Chandler, Feb 08 2007 *)

Extensions

Corrected and extended by Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Sep 30 2006
Edited and further extended by Ray Chandler, Feb 08 2007
Showing 1-5 of 5 results.