Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #16 Apr 19 2022 07:45:45
%S 1,2,2,4,1,4,6,1,3,6,10,3,1,5,7,12,7,1,3,6,8,16,9,5,1,4,7,10,18,13,7,
%T 3,2,5,9,12,22,15,11,5,2,3,7,11,13,28,19,13,9,4,1,5,9,12,14,30,25,17,
%U 11,8,3,1,7,10,13,16,36,27,23,15,10,7,1,3,8,11,15,18
%N Array read by ascending antidiagonals T(n,k) = abs(prime(n)-nonprime(k)).
%F T(n,1) = A006093(n).
%e First few rows of array:
%e 1 2 4 6 7 8 10
%e 2 1 3 5 6 7 9
%e 4 1 1 3 4 5 7
%e 6 3 1 1 2 3 5
%e 10 7 5 3 2 1 1
%e 12 9 7 5 4 3 1
%e 16 13 11 9 8 7 5
%o (PARI) nonprime(n) = my(a=1, b=n); while(a!=b, a=b; b=n+primepi(a)); b; \\ A018252
%o T(n,k) = abs(prime(n)-nonprime(k));
%Y Cf. A000040 (primes), A018252 (nonprimes), A006093.
%K nonn,tabl
%O 1,2
%A _Michel Marcus_, Apr 19 2022