login
Lexicographically earliest sequence of distinct positive integers such that the sum of the distinct prime factors of a(n) + a(n + 1) is a composite number.
1

%I #13 Dec 21 2023 21:22:40

%S 1,13,2,12,3,11,4,10,5,9,6,8,7,14,16,17,18,15,20,19,23,22,24,21,25,26,

%T 29,27,28,32,30,33,36,34,31,35,39,37,38,40,44,41,43,42,45,46,47,48,50,

%U 49,53,51,54,52,58,56,55,57,60,59,61,62,64,65,67,63,66,68,70,71,69,72,73,74,76,77,75,78,80,79,82

%N Lexicographically earliest sequence of distinct positive integers such that the sum of the distinct prime factors of a(n) + a(n + 1) is a composite number.

%C The sum of the distinct prime factors of n is sometimes called sopf(n).

%H Éric Angelini, <a href="https://cinquantesignes.blogspot.com/2023/12/palindromes-with-distinct-prime-factors.html">Sums of distinct prime factors</a>, Personal blog, December 2023.

%e a(1) + a(2) = 1 + 13 = 14 whose sopf is 2 + 7 = 9, a composite;

%e a(2) + a(3) = 13 + 2 = 15 whose sopf is 3 + 5 = 8, a composite;

%e a(3) + a(4) = 2 + 12 = 14 whose sopf is 2 + 7 = 9, a composite;

%e a(4) + a(5) = 12 + 3 = 15 whose sopf is 3 + 5 = 8, a composite;

%e a(13) + a(14) = 7 + 14 = 21 whose sopf is 3 + 7 = 10, a composite; etc.

%t a[1]=1;a[n_]:=a[n]=(k=1;While[MemberQ[Array[a,n-1],k]||PrimeQ@Total[First/@FactorInteger[k+a[n-1]]],k++];k);Array[a,81]

%Y Cf. A008472, A367935.

%K nonn

%O 1,2

%A _Eric Angelini_ and _Giorgos Kalogeropoulos_, Dec 05 2023