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.

A129189 n-th prime + n-th composite - n.

This page as a plain text file.
%I A129189 #12 Oct 05 2016 11:37:57
%S A129189 5,7,10,12,16,19,24,26,30,37,40,46,50,53,57,63,69,71,78,83,85,91,95,
%T A129189 101,110,114,116,121,124,128,142,147,153,155,165,167,174,180,184,190,
%U A129189 196,199,210,212,216,218,230,243,247,249,254,261,263,273,279,285,292,294
%N A129189 n-th prime + n-th composite - n.
%H A129189 Harvey P. Dale, <a href="/A129189/b129189.txt">Table of n, a(n) for n = 1..1000</a>
%F A129189 a(n) = A064799(n) - n. - _Michel Marcus_, Mar 14 2014
%e A129189 n(1)=2+4-1, n(2)=3+6-2, n(3)=5+8-3, n(4)=7+9-4, n(5)=11+10-5.
%p A129189 c:=proc(n) if isprime(n)=false then n else fi end: C:=[seq(c(n),n=2..100)]: a:=n->ithprime(n)+C[n]-n: seq(a(n),n=1..74); # _Emeric Deutsch_, Apr 16 2007
%t A129189 Module[{nn=80,prs,cmps,len},prs=Prime[Range[nn]];cmps=Complement[ Range[ 2,2nn],prs];len=Min[nn,Length[cmps]];#[[1]]+#[[2]]-#[[3]]&/@ Thread[ {Take[ prs,len],Take[cmps,len],Range[len]}]] (* _Harvey P. Dale_, Oct 05 2016 *)
%K A129189 nonn
%O A129189 1,1
%A A129189 _Edwin F. Sampang_, Apr 01 2007
%E A129189 More terms from _Emeric Deutsch_, Apr 16 2007