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.

A188815 Least prime p such that prime(n) divides p + nextprime(p).

This page as a plain text file.
%I A188815 #12 Jul 05 2017 03:45:07
%S A188815 3,5,2,19,97,23,31,73,67,347,89,109,199,83,281,631,233,607,131,421,
%T A188815 727,1103,743,353,577,907,307,641,433,1237,251,389,271,829,593,449,
%U A188815 1879,487,331,3109,1609,3257,1907,383,2357,1987,3163,443,2719,683,1861,6211,719,2251,769,3943,5647,2437,4153,3371,563,877,3677,929,937
%N A188815 Least prime p such that prime(n) divides p + nextprime(p).
%H A188815 Michel Marcus, <a href="/A188815/b188815.txt">Table of n, a(n) for n = 1..1000</a>
%e A188815 a(5) = 97 because 97 + 101 = 198, and prime(5) = 11 is the largest prime divisor
%e A188815   of 198.
%p A188815 with(numtheory):for n from 1 to 100 do: nn:=ithprime(n):id:=0:for k from 1
%p A188815   to 2000 while(id=0) do:x:=ithprime(k+1)+ithprime(k): if irem(x,nn)=0 then id:=1:printf(`%d,
%p A188815   `, ithprime(k)):else fi:od:od:
%t A188815 Table[p = 2; q = 3; While[Mod[p + q, Prime[n]] > 0, p = q; q = NextPrime[q]]; p, {n, 65}]
%o A188815 (PARI) a(n) = {my(pn=prime(n)); my(p=2); forprime(q=3,, if ((p+q) % pn, p = q, break);); p;} \\ _Michel Marcus_, Jul 05 2017
%Y A188815 Cf. A000040.
%K A188815 nonn
%O A188815 1,1
%A A188815 _Michel Lagneau_, Apr 11 2011