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.

A179234 a(n) is the smallest prime q such that, for the previous prime p and the following prime r, the fraction (r-q)/(q-p) has denominator n in lowest terms.

This page as a plain text file.
%I A179234 #26 Dec 11 2016 19:24:02
%S A179234 3,11,29,367,149,521,127,1847,1087,1657,1151,4201,2503,2999,5779,
%T A179234 10831,1361,9587,30631,19373,16183,36433,81509,28277,31957,25523,
%U A179234 40343,82129,44351,102761,34123,89753,282559,134581,173429,705389,404671,212777,371027,1060861,265703,461801,156007,544367,576881,927961,1101071,1904407,604171,396833
%N A179234 a(n) is the smallest prime q such that, for the previous prime p and the following prime r, the fraction (r-q)/(q-p) has denominator n in lowest terms.
%C A179234 The conjecture that a(n) exists for every n is a weaker conjecture than a related one in the comment to A179210.
%H A179234 Robert G. Wilson v, <a href="/A179234/b179234.txt">Table of n, a(n) for n = 1..123</a>
%e A179234 For q=3 we have (r-q)/(q-p)=2/1. Therefore, a(1)=3.
%e A179234 For q=5: (r-q)/(q-p) = 1/1; for q = 7: (r-q)/(q-p) = 2/1; for q = 11: (r-q)/(q-p) = 1/2. Therefore, a(2)=11.
%t A179234 f[n_] := Block[{p = 2, q = 3, r = 5}, While[ Denominator[(r - q)/(q - p)] != n, p = q; q = r; r = NextPrime@ r]; q]; Array[f, 50]
%t A179234 p = 2; q = 3; r = 5; t[_] = 0; While[q < 100000000, If[ t[ Denominator[(r - q)/(q - p)]] == 0, t[ Denominator[(r - q)/(q - p)]] = q]; p = q; q = r; r = NextPrime@ r]; t@# & /@ Range@100 (* _Robert G. Wilson v_, Dec 11 2016 *)
%o A179234 (PARI) a(n)=my(p=2,q=3);forprime(r=5,default(primelimit),if(denominator((r-q)/(q-p))==n,return(q));p=q;q=r)
%Y A179234 Cf. A001223, A168253, A179210, A279067.
%K A179234 nonn
%O A179234 1,1
%A A179234 _Vladimir Shevelev_, Jan 05 2011
%E A179234 Revised definition, new program, and terms past a(5) from _Charles R Greathouse IV_, Jan 12 2011