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.

A062294 A B_2 sequence: a(n) is the smallest prime such that the pairwise sums of distinct elements are all distinct.

This page as a plain text file.
%I A062294 #15 Feb 16 2025 08:32:44
%S A062294 2,3,5,7,11,17,29,47,67,83,131,163,233,307,397,443,617,727,809,941,
%T A062294 1063,1217,1399,1487,1579,1931,2029,2137,2237,2659,2777,3187,3659,
%U A062294 3917,4549,4877,5197,5471,5981,6733,7207,7349,8039,8291,8543,9283,9689,10037
%N A062294 A B_2 sequence: a(n) is the smallest prime such that the pairwise sums of distinct elements are all distinct.
%H A062294 Klaus Brockhaus, <a href="/A062294/b062294.txt">Table of n, a(n) for n = 1..3600</a>
%H A062294 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/B2-Sequence.html">B2-Sequence</a>
%H A062294 <a href="/index/Br#B_2">Index entries for B_2 sequences</a>
%o A062294 (Python)
%o A062294 from itertools import islice
%o A062294 from sympy import nextprime
%o A062294 def A062294_gen(): # generator of terms
%o A062294     aset2, alist, k = set(), [], 0
%o A062294     while (k:=nextprime(k)):
%o A062294         bset2 = set()
%o A062294         for a in alist:
%o A062294             if (b:=a+k) in aset2:
%o A062294                 break
%o A062294             bset2.add(b)
%o A062294         else:
%o A062294             yield k
%o A062294             alist.append(k)
%o A062294             aset2.update(bset2)
%o A062294 A062294_list = list(islice(A062294_gen(),30)) # _Chai Wah Wu_, Sep 11 2023
%Y A062294 Cf. A011185, A010672, A025582, A005282, A061781, A061784, A062292, A079848, A133096.
%K A062294 nonn
%O A062294 1,1
%A A062294 _Labos Elemer_, Jul 02 2001
%E A062294 Edited, corrected and extended by _Klaus Brockhaus_, Sep 17 2007