login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A179328 a(n) is the smallest prime q > a(n-1) such that, for the previous prime p and the following prime r, the fraction (q-p)/(r-q) has denominator prime(n) (or 0, if such a prime does not exist). 3

%I #18 Mar 18 2022 10:27:10

%S 3,23,139,293,1129,2477,8467,30593,81463,85933,190409,404597,535399,

%T 840353,1100977,2127163,4640599,6613631,6958667,10343761,24120233,

%U 49269581,83751121,101649649,166726367,273469741,310845683,568951459

%N a(n) is the smallest prime q > a(n-1) such that, for the previous prime p and the following prime r, the fraction (q-p)/(r-q) has denominator prime(n) (or 0, if such a prime does not exist).

%C Conjecture: a(n) > 0 for all n.

%p with(numtheory):

%p a:= proc(n) option remember; local k, p, q, r, pn;

%p pn:= ithprime(n);

%p for k from `if`(n=1, 1, pi(a(n-1))) do

%p p:= ithprime(k);

%p q:= ithprime(k+1);

%p r:= ithprime(k+2);

%p if denom((q-p)/(r-q)) = pn then break fi

%p od; q

%p end:

%p seq(a(n), n=1..10); # _Alois P. Heinz_, Jan 06 2011

%t a[n_] := a[n] = Module[{k, p, q, r, pn},

%t pn = Prime[n];

%t For[k = If[n == 1, 1, PrimePi[a[n - 1]]], True, k++,

%t p = Prime[k];

%t q = Prime[k + 1];

%t r = Prime[k + 2];

%t If [Denominator[(q - p)/(r - q)] == pn, Break[]]]; q];

%t Table[a[n], {n, 1, 10}] (* _Jean-François Alcover_, Mar 18 2022, after _Alois P. Heinz_ *)

%Y Cf. A168253, A179210, A179234, A179240, A179256, A001223

%K nonn

%O 1,1

%A _Vladimir Shevelev_, Jan 06 2011

%E More terms from _Alois P. Heinz_, Jan 06 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 02:14 EDT 2024. Contains 371906 sequences. (Running on oeis4.)