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
3, 23, 139, 293, 1129, 2477, 8467, 30593, 81463, 85933, 190409, 404597, 535399, 840353, 1100977, 2127163, 4640599, 6613631, 6958667, 10343761, 24120233, 49269581, 83751121, 101649649, 166726367, 273469741, 310845683, 568951459 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Conjecture: a(n) > 0 for all n.
LINKS
MAPLE
with(numtheory):
a:= proc(n) option remember; local k, p, q, r, pn;
pn:= ithprime(n);
for k from `if`(n=1, 1, pi(a(n-1))) do
p:= ithprime(k);
q:= ithprime(k+1);
r:= ithprime(k+2);
if denom((q-p)/(r-q)) = pn then break fi
od; q
end:
seq(a(n), n=1..10); # Alois P. Heinz, Jan 06 2011
MATHEMATICA
a[n_] := a[n] = Module[{k, p, q, r, pn},
pn = Prime[n];
For[k = If[n == 1, 1, PrimePi[a[n - 1]]], True, k++,
p = Prime[k];
q = Prime[k + 1];
r = Prime[k + 2];
If [Denominator[(q - p)/(r - q)] == pn, Break[]]]; q];
Table[a[n], {n, 1, 10}] (* Jean-François Alcover, Mar 18 2022, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A196881 A049164 A081413 * A255952 A089950 A198797
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Jan 06 2011
EXTENSIONS
More terms from Alois P. Heinz, Jan 06 2011
STATUS
approved

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 May 7 20:13 EDT 2024. Contains 372317 sequences. (Running on oeis4.)