A347570
Table read by antidiagonals upward: the n-th row gives the lexicographically earliest infinite B_n sequence.
Original entry on oeis.org
1, 1, 2, 1, 2, 3, 1, 2, 4, 4, 1, 2, 5, 8, 5, 1, 2, 6, 14, 13, 6, 1, 2, 7, 22, 33, 21, 7, 1, 2, 8, 32, 56, 72, 31, 8, 1, 2, 9, 44, 109, 154, 125, 45, 9, 1, 2, 10, 58, 155, 367, 369, 219, 66, 10, 1, 2, 11, 74, 257, 669, 927, 857, 376, 81, 11
Offset: 1
Table begins:
n\k | 1 2 3 4 5 6 7 8
----+------------------------------------------
1 | 1, 2, 3, 4, 5, 6, 7, 8, ...
2 | 1, 2, 4, 8, 13, 21, 31, 45, ...
3 | 1, 2, 5, 14, 33, 72, 125, 219, ...
4 | 1, 2, 6, 22, 56, 154, 369, 857, ...
5 | 1, 2, 7, 32, 109, 367, 927, 2287, ...
6 | 1, 2, 8, 44, 155, 669, 2215, 6877, ...
7 | 1, 2, 9, 58, 257, 1154, 4182, 14181, ...
8 | 1, 2, 10, 74, 334, 1823, 8044, 28297, ...
-
from itertools import count, islice, combinations_with_replacement
def A347570_gen(): # generator of terms
asets, alists, klist = [set()], [[]], [1]
while True:
for i in range(len(klist)-1,-1,-1):
kstart, alist, aset = klist[i], alists[i], asets[i]
for k in count(kstart):
bset = set()
for d in combinations_with_replacement(alist+[k],i):
if (m:=sum(d)+k) in aset:
break
bset.add(m)
else:
yield k
alists[i].append(k)
klist[i] = k+1
asets[i].update(bset)
break
klist.append(1)
asets.append(set())
alists.append([])
A347570_list = list(islice(A347570_gen(),30)) # Chai Wah Wu, Sep 06 2023
A079848
Smallest primes such that a(j) - a(k) are all different.
Original entry on oeis.org
2, 3, 5, 11, 23, 37, 47, 97, 101, 149, 211, 233, 353, 383, 487, 641, 757, 797, 919, 1097, 1163, 1381, 1409, 1481, 1777, 1997, 2287, 2417, 2969, 3049, 3371, 3529, 3929, 4231, 4759, 5279, 5449, 5717, 5953, 6529, 6983, 7583, 8053, 8819, 9043, 10133, 10799
Offset: 1
-
terms = 100; a = Table[0, {terms}]; s={}; k=0; A079848list = Reap[For[p=2, p < 10^5, p = NextPrime[p], j=1; While[j <= k && FreeQ[s, p-a[[j]]], j++]; If[j>k, For[j=1, j <= k, j++, s = Union[s, {p-a[[j]]}]]; k++; a[[k]] = p; Print[p]; Sow[p]; If[k == terms, Break[]]]]][[2, 1]]; (* Jean-François Alcover, Nov 02 2016, adapted from Max Alekseyev's PARI code *)
-
a=vector(100);s=Set();k=0;forprime(p=2,10^5,j=1;while(j<=k&&!setsearch(s,p-a[j]),j++);if(j>k, for(j=1,k,s=setunion(s,[p-a[j]]));k++;a[k]=p;print1(" ",p);if(k==100,break))) \\ Max Alekseyev, Feb 14 2005
-
from itertools import count, islice
from sympy import nextprime
def A079848_gen(): # generator of terms
aset2, alist, k = set(), [], 0
while (k:=nextprime(k)):
bset2 = set()
for a in alist:
if (b:=k-a) in aset2:
break
bset2.add(b)
else:
yield k
alist.append(k)
aset2.update(bset2)
A079848_list = list(islice(A079848_gen(),30)) # Chai Wah Wu, Sep 11 2023
A001856
A self-generating sequence: every positive integer occurs as a(i)-a(j) for a unique pair i,j.
Original entry on oeis.org
1, 2, 4, 8, 16, 21, 42, 51, 102, 112, 224, 235, 470, 486, 972, 990, 1980, 2002, 4004, 4027, 8054, 8078, 16156, 16181, 32362, 32389, 64778, 64806, 129612, 129641, 259282, 259313, 518626, 518658, 1037316, 1037349, 2074698, 2074734, 4149468
Offset: 1
- R. K. Guy, Unsolved Problems in Number Theory, E25.
- W. Sierpiński, Elementary Theory of Numbers. Państ. Wydaw. Nauk., Warsaw, 1964, p. 444.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- T. D. Noe, Table of n, a(n) for n = 1..1000
- R. L. Graham, Problem E1910, Amer. Math. Monthly, 73 (1966), 775.
- R. K. Guy, The Second Strong Law of Small Numbers, Math. Mag, 63 (1990), no. 1, 3-20.
- R. K. Guy, The Second Strong Law of Small Numbers, Math. Mag, 63 (1990), no. 1, 3-20. [Annotated scanned copy]
- R. K. Guy and N. J. A. Sloane, Correspondence, 1988.
- M. Hall, Cyclic projective planes, Duke Math. J., 4 (1947), 1079-1090.
- C. B. A. Peck, Remark on Problem E1910, Amer. Math. Monthly, 75 (1968), 80-81.
- W. Sierpiński, Elementary Theory of Numbers, Warszawa 1964.
- N. J. A. Sloane, Handwritten notes on Self-Generating Sequences, 1970 (note that A1148 has now become A005282)
-
a[1] = 1; a[2] = 2; a[n_?OddQ] := a[n] = 2*a[n-1]; a[n_?EvenQ] := a[n] = a[n-1] + r[(n-2)/2]; r[n_] := ( diff = Table[a[j] - a[i], {i, 1, 2*n+1}, {j, i+1, 2*n+1}] // Flatten // Union; max = diff // Last; notDiff = Complement[Range[max], diff]; If[notDiff == {}, max+1, notDiff // First]); Table[a[n], {n, 1, 39}] (* Jean-François Alcover, Dec 31 2012 *)
More terms from Larry Reeves (larryr(AT)acm.org), Sep 14 2000
A062295
A B_2 sequence: a(n) is the smallest square such that pairwise sums of not necessarily distinct elements are all distinct.
Original entry on oeis.org
1, 4, 9, 16, 25, 36, 64, 81, 100, 169, 256, 289, 441, 484, 576, 625, 841, 1089, 1296, 1444, 1936, 2025, 2401, 2601, 3136, 4225, 4356, 4624, 5329, 5476, 5776, 6084, 7569, 9025, 10201, 11449, 11664, 12321, 12996, 13456, 14400, 16129, 17956, 20164, 22201
Offset: 1
36 is in the sequence since the pairwise sums of {1, 4, 9, 16, 25, 36} are all distinct: 2, 5, 8, 10, 13, 17, 18, 20, 25, 26, 29, 32, 34, 37, 40, 41, 45, 50, 52, 61, 72.
49 is not in the sequence since 1 + 49 = 25 + 25.
-
from itertools import count, islice
def A062295_gen(): # generator of terms
aset1, aset2, alist = set(), set(), []
for k in (n**2 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 |= bset2
A062295_list = list(islice(A062295_gen(),30)) # Chai Wah Wu, Sep 05 2023
A080201
Numbers that do not occur as differences between terms of the Mian-Chowla variant A051788.
Original entry on oeis.org
49, 50, 71, 72, 76, 82, 90, 93, 95, 96, 119, 128, 139, 143, 152, 162, 172, 173, 180, 182, 185, 188
Offset: 1
A327762
a(n) = smallest positive number not already in the sequence such that all n(n+1)/2 numbers in the triangle of differences of the first n terms are distinct.
Original entry on oeis.org
1, 3, 9, 5, 12, 10, 23, 8, 22, 17, 42, 16, 43, 20, 38, 26, 45, 32, 65, 28, 64, 39, 76, 34, 81, 48, 98, 40, 92, 54, 109, 60, 116, 51, 114, 58, 117, 70, 136, 67, 135, 71, 145, 72, 147, 69, 146, 80, 164, 87, 166, 82, 170, 108, 198, 99
Offset: 1
Difference triangle of the first k=8 terms of the sequence:
1, 3, 9, 5, 12, 10, 23, 8, ...
2, 6, -4, 7, -2, 13, -15, ...
4, -10, 11, -9, 15, -28, ...
-14, 21, -20, 24, -43, ...
35, -41, 44, -67, ...
-76, 85, -111, ...
161, -196, ...
-357, ...
All 8*9/2 = 36 numbers are distinct.
For first differences see
A327458; for the leading column of the difference triangle see
A327459.
A034757
a(1)=1, a(n) = smallest odd number such that all sums of pairs of (not necessarily distinct) terms in the sequence are distinct.
Original entry on oeis.org
1, 3, 7, 15, 25, 41, 61, 89, 131, 161, 193, 245, 295, 363, 407, 503, 579, 721, 801, 949, 1129, 1185, 1323, 1549, 1643, 1831, 1939, 2031, 2317, 2623, 2789, 3045, 3143, 3641, 3791, 4057, 4507, 4757, 5019, 5559, 5849, 6309, 6707, 7181, 7593
Offset: 1
5 is not in the sequence since 5+1 is already obtainable from 3+3, 9 is excluded since 1, 3 and 7 are in the sequence and would collide with 1+9
-
a034757 = (subtract 1) . (* 2) . a005282 -- Reinhard Zumkeller, Dec 18 2012
-
seq2={1, 3}; Do[le=Length[seq2]; t=Last[seq2]+2; While[Length[Expand[(Plus @@ (x^seq2) + x^t)^2]] < Pochhammer[3, le]/le!, t=t+2]; AppendTo[seq2, t], {20}]; Print@seq2
-
from itertools import count, islice
def A034757_gen(): # generator of terms
aset1, aset2, alist = set(), set(), []
for k in count(1,2):
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)
A034757_list = list(islice(A034757_gen(),30)) # Chai Wah Wu, Sep 05 2023
An incorrect comment from
Amarnath Murthy, also dated Apr 07 2004, has been deleted.
A046185
A B2-sequence due to Rachel Lewis.
Original entry on oeis.org
1, 2, 4, 8, 13, 21, 31, 45, 66, 81, 97, 123, 148, 182, 204, 252, 291, 324, 352, 415, 486, 540, 651, 706, 781, 864, 963, 1003, 1148, 1217, 1371, 1409, 1523, 1673, 1974, 2105, 2191, 2317, 2496, 2652, 2726, 2858, 3219, 3268, 3500, 3605, 3864, 3962, 4237
Offset: 0
- Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 163-166, with section 2.20.2, Mian-Chowla and B2-Sequences
A058335
a(n) = least value such that sequence increases and pairwise differences are unique.
Original entry on oeis.org
1, 4, 5, 10, 12, 22, 35, 49, 64, 84, 100, 122, 141, 169, 225, 271, 295, 338, 399, 465, 547, 579, 670, 745, 816, 917, 993, 1033, 1172, 1258, 1401, 1533, 1644, 1789, 1878, 2106, 2257, 2419, 2571, 2724, 2942, 3006, 3148, 3308, 3475, 3719, 3991, 4272, 4428
Offset: 1
Gerald A. Mischke (Gerald.Mischke(AT)mutualofomaha.com), Dec 13 2000
A062294
A B_2 sequence: a(n) is the smallest prime such that the pairwise sums of distinct elements are all distinct.
Original entry on oeis.org
2, 3, 5, 7, 11, 17, 29, 47, 67, 83, 131, 163, 233, 307, 397, 443, 617, 727, 809, 941, 1063, 1217, 1399, 1487, 1579, 1931, 2029, 2137, 2237, 2659, 2777, 3187, 3659, 3917, 4549, 4877, 5197, 5471, 5981, 6733, 7207, 7349, 8039, 8291, 8543, 9283, 9689, 10037
Offset: 1
-
from itertools import islice
from sympy import nextprime
def A062294_gen(): # generator of terms
aset2, alist, k = set(), [], 0
while (k:=nextprime(k)):
bset2 = set()
for a in alist:
if (b:=a+k) in aset2:
break
bset2.add(b)
else:
yield k
alist.append(k)
aset2.update(bset2)
A062294_list = list(islice(A062294_gen(),30)) # Chai Wah Wu, Sep 11 2023
Comments