login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A249132 Smallest noncomposite k such that prime(n) is the largest prime factor of k^2+1, or 0 if no such k exists. 1
1, 0, 2, 0, 0, 5, 13, 0, 0, 17, 0, 31, 73, 0, 0, 23, 0, 11, 0, 0, 173, 0, 0, 233, 463, 293, 0, 0, 251, 919, 0, 0, 37, 0, 193, 0, 443, 0, 0, 599, 0, 19, 0, 467, 211, 0, 0, 0, 0, 107, 89, 0, 659, 0, 241, 0, 2503, 0, 337, 53, 0, 3671, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

a(A080148(m)) = 0. - Joerg Arndt, Oct 22 2014

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

EXAMPLE

a(1)=1 is in this sequence because 1 is in A008578 and the largest prime factor of 1^2+1 = 2 is prime(1).

MAPLE

A249132:= proc(n) local p, i, k, a, b;

   p:= ithprime(n);

   if p mod 4 = 3 then return 0 fi;

   a:= numtheory:-msqrt(-1, p);

   if a < p/2 then b:= p-a

   else b:= a; a:= p-a

   fi;

   for i from 0 do

    for k in [a+i*p, b+i*p] do

      if isprime(k) and p = max(numtheory:-factorset(k^2+1)) then

        return(k)

      fi

    od

   od

end proc:

1, seq(A249132(n), n=2..100); # Robert Israel, Nov 10 2014

MATHEMATICA

a249132[n_Integer] := Module[{t = Table[0, {n}], k, s, p}, Do[If[Mod[Prime[k], 4] == 3, t[[k]] = -1], {k, n}]; k = 0; While[Times @@ t == 0, k++; s = FactorInteger[k^2 + 1][[-1, 1]]; p = PrimePi[s]; If[p <= n && t[[p]] == 0 && ! CompositeQ[k], t[[p]] = k]]; t /. -1 -> 0]; a249132[120] (* Michael De Vlieger, Nov 11 2014, adapted from A223702 *)

CROSSREFS

Cf. A080148, A185389, A223702, A223705.

Sequence in context: A078112 A281190 A275619 * A128711 A132710 A106512

Adjacent sequences:  A249129 A249130 A249131 * A249133 A249134 A249135

KEYWORD

nonn

AUTHOR

Juri-Stepan Gerasimov, Oct 22 2014

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 October 16 17:06 EDT 2021. Contains 348042 sequences. (Running on oeis4.)