login
First differences of A079848.
1

%I #7 Sep 11 2023 17:39:03

%S 1,2,6,12,14,10,50,4,48,62,22,120,30,104,154,116,40,122,178,66,218,28,

%T 72,296,220,290,130,552,80,322,158,400,302,528,520,170,268,236,576,

%U 454,600,470,766,224,1090,666,180,764,868,606,572,294,738,70,918,1122,1196

%N First differences of A079848.

%o (Python)

%o from itertools import islice

%o from sympy import nextprime

%o def A079849_gen(): # generator of terms

%o aset2, alist, k, m = set(), [2], 2, 2

%o while (k:=nextprime(k)):

%o bset2 = set()

%o for a in alist:

%o if (b:=k-a) in aset2:

%o break

%o bset2.add(b)

%o else:

%o yield k-m

%o alist.append(m:=k)

%o aset2.update(bset2)

%o A079849_list = list(islice(A079849_gen(),30)) # _Chai Wah Wu_, Sep 11 2023

%Y Cf. A079848.

%K nonn

%O 1,2

%A _Amarnath Murthy_, Feb 18 2003

%E Extended by _Ray Chandler_, Feb 11 2007