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.

A129768 Number of odd nonprime numbers less than the n-th prime.

This page as a plain text file.
%I A129768 #13 Aug 18 2015 00:36:28
%S A129768 1,1,1,1,2,2,3,3,4,6,6,8,9,9,10,12,14,14,16,17,17,19,20,22,25,26,26,
%T A129768 27,27,28,34,35,37,37,41,41,43,45,46,48,50,50,54,54,55,55,60,65,66,66,
%U A129768 67,69,69,73,75,77,79,79,81,82,82,86,92,93,93,94,100,102,106,106,107,109
%N A129768 Number of odd nonprime numbers less than the n-th prime.
%C A129768 Also, a(n)=sum_{k=n-th even number..n-th odd prime together with 1}-k*(-1)^k. - _Juri-Stepan Gerasimov_, Jul 30 2009
%F A129768 a(n)=A008507(n-1)+1. - _R. J. Mathar_, Jul 06 2009
%F A129768 a(n)=sum_{k=A005843(n)..A006005(n)}-k*(-1)^k. - _Juri-Stepan Gerasimov_, Jul 30 2009
%p A129768 A129768 := proc(n) local res,p,i ; res := 0 ; p := ithprime(n) ; for i from 1 to p-1 by 2 do if not isprime(i) then res := res+1 ; fi ; od ; RETURN(res) ; end: for n from 1 to 80 do printf("%d, ",A129768(n)) ; od ; # _R. J. Mathar_, May 17 2007
%t A129768 f[n_] := Ceiling[ Prime@n / 2] - n + 1; Array[f, 72] (* _Robert G. Wilson v_ *)
%t A129768 nn=401;With[{np=Select[Range[1,nn,2],!PrimeQ[#]&]},Table[Count[np,_?(#<n&)],{n,Prime[Range[PrimePi[nn]]]}]] (* _Harvey P. Dale_, Mar 01 2015 *)
%K A129768 nonn
%O A129768 1,5
%A A129768 _Giovanni Teofilatto_, May 16 2007
%E A129768 Edited, corrected and extended by _Robert G. Wilson v_ and _R. J. Mathar_, May 16 2007