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.

A050200 Let p = prime(n). Then a(n) = p + (next prime >= p+1) + (next prime >= p+3).

This page as a plain text file.
%I A050200 #14 Mar 20 2015 18:47:57
%S A050200 10,15,23,29,41,47,59,65,81,97,105,119,131,137,153,171,187,195,209,
%T A050200 223,231,245,261,283,299,311,317,329,335,367,389,405,425,437,457,465,
%U A050200 483,497,513,531,551,563,581,587,607,621,657,677,689,695,711,731,743,765
%N A050200 Let p = prime(n). Then a(n) = p + (next prime >= p+1) + (next prime >= p+3).
%C A050200 The occurrence of multiples of 3 in the sequence appears to converge to about 0.44.
%t A050200 nextprim[n_] := Block[{k = n}, While[ ! PrimeQ[k], k++ ]; k]; f[n_] := (x = Prime[n]; nextprim[x] + nextprim[x + 1] + nextprim[x + 3]); Table[ f[n], {n, 54}] (* _Robert G. Wilson v_, Feb 12 2005 *)
%t A050200 np[n_]:=Module[{pr=Prime[n]},pr+NextPrime[pr+1]+NextPrime[pr+3]]; Join[ {10}, Array[ np,60,2]] (* _Harvey P. Dale_, Mar 04 2015 *)
%o A050200 (PARI) sumprime3(n) = { c1=0; c2=0; forprime(x=2,n, s = nextprime(x)+nextprime(x+1)+nextprime(x+3); c1++; if(s%3==0,c2++); print1(s" "); ); print(); print(c2/c1+.0) }
%Y A050200 Cf. A034962.
%K A050200 easy,nonn
%O A050200 0,1
%A A050200 _Cino Hilliard_, May 08 2003
%E A050200 Definition corrected by _Zak Seidov_, _Robert G. Wilson v_ and _Ralf Stephan_, Feb 10 2005