cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A163639 The count of odd numbers from prime(n) up to the n-th odd nonprime, A014076(n).

This page as a plain text file.
%I A163639 #7 Mar 08 2019 00:59:28
%S A163639 1,4,6,8,8,8,9,9,9,9,10,8,8,8,9,7,6,8,6,6,7,5,5,3,2,2,2,3,4,3,5,6,8,8,
%T A163639 11,10,12,12,13,15,17,15,19,18,19,18,22,27,27,27,26,28,28,32,32,32,34,
%U A163639 34,36,37,36,40,46,47,47,47,51,52,56,54,55,57,60,61,63,63,65,67,68,69
%N A163639 The count of odd numbers from prime(n) up to the n-th odd nonprime, A014076(n).
%C A163639 The count includes these two odd numbers themselves and is conducted in both directions with a positive result independent of which of the two limits is larger.
%F A163639 a(n) = 1 + (M-m)/2, n > 1, where M = max(A000040(n), A014076(n)) and m = min(A000040(n), A014076(n)).
%e A163639 a(2)=4 counts the 4 numbers 3, 5, 7, and 9;
%e A163639 a(3)=6 counts the 6 numbers 5, 7, 9, 11, 13, and 15.
%p A163639 A014076 := proc(n) if n = 1 then 1; else for a from procname(n-1)+2 by 2 do if not isprime(a) then RETURN(a) ; fi; od: fi; end:
%p A163639 A163639 := proc(n) if n = 1 then 1; else onpr := A014076(n) ; pr := ithprime(n) ; 1+(max(onpr,pr)-min(onpr,pr))/2 fi; end:
%p A163639 seq(A163639(n),n=1..100) ; # _R. J. Mathar_, Aug 06 2009
%Y A163639 Cf. A000040, A005408, A014076.
%K A163639 nonn
%O A163639 1,2
%A A163639 _Juri-Stepan Gerasimov_, Aug 02 2009
%E A163639 Edited and corrected _R. J. Mathar_, Aug 06 2009