login
Half of the difference between the n-th Ludic number and the n-th noncomposite: a(n) = (A003309(n) - A008578(n))/2.
2

%I #9 Jan 08 2022 06:31:57

%S 0,0,0,0,0,0,0,0,2,1,0,3,2,1,2,3,4,4,5,5,6,8,6,7,9,9,9,9,10,11,15,11,

%T 13,12,17,13,14,12,15,21,19,21,21,18,20,19,20,18,17,19,24,25,24,30,28,

%U 28,33,31,33,32,36,38,34,35,36,38,40,38,39,36,36,39,37,35,36,42,42,43,42,46,44,42,44,43,47,48,49,52

%N Half of the difference between the n-th Ludic number and the n-th noncomposite: a(n) = (A003309(n) - A008578(n))/2.

%H Antti Karttunen, <a href="/A255325/b255325.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A255324(n)/2 = (A003309(n) - A008578(n))/2.

%t t = Range[2, 1000];

%t A003309 = {1};

%t While[Length[t] > 0, k = First[t];

%t AppendTo[A003309, k]; t = Drop[t, {1, -1, k}]];

%t a[n_] := If[n == 1, 0, A003309[[n]] - Prime[n - 1]]/2;

%t Array[a, Length[A003309]] (* _Jean-François Alcover_, Jan 08 2022, after _Ray Chandler_ in A003309 *)

%o (Scheme) (define (A255325 n) (/ (A255324 n) 2))

%Y Cf. A003309, A008578.

%Y Cf. A255324 (the same terms multipled by 2).

%K nonn

%O 1,9

%A _Antti Karttunen_, Feb 23 2015