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.

A303600 a(1)=2 and a(2)=3, then a(n+1) is the smallest integer larger than a(n) that can be written as the sum of two (not necessarily distinct) earlier terms in exactly one way.

Original entry on oeis.org

2, 3, 4, 5, 9, 10, 11, 16, 22, 24, 28, 29, 30, 37, 42, 50, 55, 56, 70, 73, 76, 82, 89, 95, 101, 102, 115, 128, 133, 135, 136, 141, 142, 153, 160, 161, 168, 174, 181, 195, 199, 200, 214, 221, 227, 233, 247, 252, 265, 266, 267, 273, 280, 285, 286, 325, 331, 332, 338
Offset: 1

Views

Author

Michel Marcus, Apr 26 2018

Keywords

Crossrefs

Cf. A004280 (with first terms 1 and 2).

Programs

  • Mathematica
    Nest[Append[#, Function[{m, s}, First@ SelectFirst[Tally[s], And[First@ # > m, Last@ # < 3] &]] @@ {Max@ #, Sort[Total /@ Tuples[#, {2}]]}] &, {2, 3}, 57] (* Michael De Vlieger, Apr 27 2018 *)
  • PARI
    \\ See PARI link \\ David A. Corneth, Apr 27 2018
    
  • Python
    terms = [2,3]
    while len(terms) < 100:
        options = []
        for x in range(len(terms)):
            for y in range(x,len(terms)):
                options.append(terms[x]+terms[y])
        for y in sorted(options):
            if options.count(y) == 1 and y > max(terms):
                terms.append(y)
                break
    print(terms)
    # David Consiglio, Jr., Apr 18 2018
    
  • Python
    from collections import Counter
    def A303600_list(num_terms):
        terms = [2, 3]
        sum_counts = Counter([4, 5, 6])
        next_term = 3
        for n in range(2, num_terms):
            next_term += 1
            while sum_counts[next_term] != 1: next_term += 1
            terms.append(next_term)
            for term in terms: sum_counts[term + next_term] += 1
        return terms
    print(A303600_list(59))
    # David Radcliffe, Jun 19 2025

Extensions

More terms from David Consiglio, Jr., Apr 26 2018