login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A300854 a(n) is the smallest prime p = prime(k) such that A300845(k) = prime(n), or 0 if no such k exists. 0
3, 2, 79, 5, 19, 71, 211, 47, 307, 181, 479, 83, 1231, 293, 547, 1021, 499, 683, 251, 643, 863, 2243, 1009, 1447, 2213, 3361, 4691, 2137, 2657, 2131, 929, 4621, 5851, 1721, 7591, 1901, 11243, 3191, 19501, 3343, 2551, 2927, 997, 4703, 4177, 2789, 14537, 10331, 28723, 36899, 11311, 42433, 29429, 9631 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Is a(n) always positive?

LINKS

Table of n, a(n) for n=1..54.

EXAMPLE

a(3) = prime(22) = 79 since least k such that A300845(k) = prime(3) = 5 is 22.

MAPLE

f:= proc(p) local q;

  q:= 1;

  do

    q:= nextprime(q);

    if isprime(q^2+q*p+p^2) then return q fi;

  od

end proc:

V:= Vector(100):

p:= 1: count:= 0:

while count < 100 do

p:= nextprime(p);

v:= numtheory:-pi(f(p));

if v <= 100 and V[v] = 0 then V[v]:= p; count:= count+1; fi

od:

convert(V, list);

MATHEMATICA

With[{s = Table[Block[{q = 2}, While[! PrimeQ[q^2 + q p + p^2], q = NextPrime@ q]; q], {p, Prime@ Range[10^4]}]}, TakeWhile[#, # > 0 &] &@ Table[Prime@ First@ FirstPosition[s, p] /. k_ /; ! IntegerQ@ k -> -1, {p, Prime@ Range@ PrimePi@ Max@ s}] ] (* Michael De Vlieger, Mar 16 2018 *)

PROG

(PARI) a300845(n) = {my(p=prime(n)); forprime(q=2, , if(isprime(p^2+p*q+q^2), return(q)))}

a(n) = {my(k=1); while(a300845(k) != prime(n), k++); prime(k); }

CROSSREFS

Cf. A300845.

Sequence in context: A016461 A069576 A249678 * A323745 A109899 A002297

Adjacent sequences:  A300851 A300852 A300853 * A300855 A300856 A300857

KEYWORD

nonn

AUTHOR

Robert Israel and Altug Alkan, Mar 13 2018

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 10 04:15 EST 2019. Contains 329885 sequences. (Running on oeis4.)