login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #14 Dec 21 2023 21:22:28

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

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

%U 44,45,51,56,53,54,55,58,60,61,57,59,62,63,64,67,69,68,71,65,66,70,72,77,74,75,76,73,78,79,81,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 prime.

%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 + 2 = 3 whose sopf is 3, a prime number;

%e a(2) + a(3) = 2 + 3 = 5 whose sopf is 5, a prime number;

%e a(7) + a(8) = 7 + 9 = 16 whose sopf is 2, a prime number;

%e a(8) + a(9) = 9 + 8 = 17 whose sopf is 17, a prime number;

%e a(9) + a(10) = 8 + 10 = 18 whose sopf is 2 + 3 = 5, a prime number; 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, A367936.

%K nonn

%O 1,2

%A _Eric Angelini_ and _Giorgos Kalogeropoulos_, Dec 05 2023