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!)
A280717 Given a prime number p, let b = -p and c = p^2. Assuming that the polynomial P(x) := x^2+b*x+c takes at least one prime value for some positive integer x<p, we define the next term of the sequence to be the maximal element in the set S := {P(x) : x is an integer, 0 < x < p, and P(x) is a prime number}. The first term of the present sequence is p=3. 1

%I #35 Feb 22 2023 06:05:35

%S 3,7,43,1693,2864557,8205572225569,67331415548799635795058613,

%T 4533519519805137360312930667312809111343819483374997,

%U 20552799236454203238557860425684304712780972342513397945121797314302926172950212696842909492430773376197

%N Given a prime number p, let b = -p and c = p^2. Assuming that the polynomial P(x) := x^2+b*x+c takes at least one prime value for some positive integer x<p, we define the next term of the sequence to be the maximal element in the set S := {P(x) : x is an integer, 0 < x < p, and P(x) is a prime number}. The first term of the present sequence is p=3.

%C The next term is only defined if the set S above is not empty.

%C Conjecture: the sequence is well defined.

%C a(13) has 1654 digits. If S is not empty, then its maximal element is P(x) where x is the least positive integer x <= p/2 such that P(x) is prime. - _Chai Wah Wu_, Jan 09 2017

%H Chai Wah Wu, <a href="/A280717/b280717.txt">Table of n, a(n) for n = 1..12</a>

%e a(2) = 7, since 7 = max S_3, where S_3 = {x^2-3x+9 : x is an integer with 0<x<2, and x^2-3x+9 is a prime number}. Clearly, S_3={7}, thus a(2)=7. Now we explain why a(3)=43. We have 43 = max S_7. S_7 := {x^2-7x+49 : x is an integer, 0 <x<7, and x^2-7x+49 is a prime number}. By computations S_7 = {37,43}. Thus a(3) = max S_7 = 43. We explain also why a(4) = 1693. One has 1693 = max S_43, where S_43 = {x^2-43x+43^2 : x is an integer, 0 <x < 43, and x^2-43x+43^2 is a prime number}. By computations S_43 = {1399,1429,1459,1543,1597,1627,1693}. Thus a(3) = max S_43 = 1693.

%p with(numtheory):

%p xa := proc(aa) local P,x,a,a2,mi,mm; a:= aa; a2 := a^2; mi := 0; for x from 1 to a-1 do P := x^2-a*x+a2; if isprime(P) then mi := max(P,mi); fi; od;; mi; end;

%p F := proc(n) option remember if n=1 then return(3); fi; if n=2 then xa(3); else xa(F(n-1)); fi; end;

%t P[p_, x_] := x^2 - p x + p^2;

%t A280717[1] = 3;

%t A280717[n_] := A280717[n] = P[A280717[n - 1], NestWhile[# - 1 &, A280717[n - 1] - 1, # > A280717[n - 1]/2 && ! PrimeQ@P[A280717[n - 1], #] &]];

%t A280717 /@ Range[5] (* _Davin Park_, Feb 06 2017 *)

%o (Python)

%o from __future__ import division

%o from sympy import isprime

%o A280717_list, n = [3], 3

%o for _ in range(10):

%o for i in range(1,n//2+1):

%o j = i**2+n*(n-i)

%o if isprime(j):

%o n = j

%o A280717_list.append(n)

%o break # _Chai Wah Wu_, Jan 09 2017

%K nonn,hard

%O 1,1

%A _Luis H. Gallardo_, Jan 07 2017

%E a(5) corrected and a(6)-a(9) added by _Chai Wah Wu_, Jan 09 2017

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 19 03:30 EDT 2024. Contains 371782 sequences. (Running on oeis4.)