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.
%I A065859 #14 Jun 17 2018 01:59:36 %S A065859 2,3,5,7,1,1,3,4,7,11,11,16,19,19,22,1,5,5,7,7,7,11,13,17,21,23,23,23, %T A065859 21,23,35,35,39,39,47,47,49,53,55,2,5,1,5,4,5,4,13,19,20,19,17,17,16, %U A065859 23,26,29,29,28,31,29,28,35,46,47,43,44,55,58,65,64,65,65,70,73,73,71 %N A065859 Remainder when the n-th prime is divided by the n-th composite number. %H A065859 Harry J. Smith, <a href="/A065859/b065859.txt">Table of n, a(n) for n = 1..1000</a> %e A065859 n=100, p(100)=541, c(100)=133, a(100)=9 because 541 = 4*133 + 9. %t A065859 a[n]=Mod[p(n), c(n)]=Mod[A000040(n), A002808(n)] %t A065859 With[{nn=80},Module[{prs=Prime[Range[nn]],comps},comps=Take[Complement[ Range[2,Prime[nn]+1],prs],Length[prs]];Mod[#[[1]],#[[2]]]&/@ Thread[ {prs,comps}]]] (* _Harvey P. Dale_, Apr 18 2012 *) %o A065859 (PARI) Composite(n) = { local(k); k=n + primepi(n) + 1; while (k != n + primepi(k) + 1, k = n + primepi(k) + 1); return(k) } { for (n = 1, 1000, a=prime(n)%Composite(n); write("b065859.txt", n, " ", a) ) } \\ _Harry J. Smith_, Nov 01 2009 %Y A065859 Cf. A000040, A002808, A004648, A065133, A065134, A065855-A065864, A065134. %K A065859 nonn %O A065859 1,1 %A A065859 _Labos Elemer_, Nov 26 2001