Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #17 Sep 27 2015 17:50:44
%S 1,2,1,4,1,6,1,2,1,10,1,2,1,14,1,16,1,2,1,20,1,2,1,24,1,26,1,2,1,4,1,
%T 2,1,5,1,36,1,2,1,40,1,2,1,5,1,12,1,2,1,9,1,2,1,54,1,56,1,2,1,5,1,2,1,
%U 4,1,66,1,2,1,5,1,2,1,74,1,23,1,2,1,6,1,2
%N a(n) is the least number k such that the greatest prime divisor of k^2+1 is the smallest prime divisor of n^2+1.
%C a(n)=n if n^2+1 is prime and a(n)=1 if n is odd.
%C Conjecture: for all integer n, there exists at least an integer m <= n such that the smallest prime factor of n^2+1 is also the greatest prime factor of m^2+1. - _Michel Lagneau_, Sep 27 2015
%H Michel Lagneau, <a href="/A247339/b247339.txt">Table of n, a(n) for n = 1..10000</a>
%e a(34)=5 because the greatest prime divisor of 5^2+1 = 2*13 is the smallest prime divisor of 34^2+1 =13*89.
%p with(numtheory):nn:=2000:T:=array(1..nn):U:=array(1..nn):
%p for i from 1 to nn do:
%p x:=factorset(i^2+1):T[i]:=x[1]:U[i]:=i:
%p od:
%p for n from 1 to 100 do:
%p ii:=0:
%p for k from 1 to 50000 while(ii=0) do:
%p y:=factorset(k^2+1):n0:=nops(y):q:=y[n0]:
%p if q=T[n]
%p then
%p ii:=1: printf(`%d, `,k):
%p else
%p fi:
%p od:
%p od:
%t Table[k = 1; While[FactorInteger[k^2 + 1][[-1, 1]] != FactorInteger[n^2 + 1][[1, 1]], k++]; k, {n, 82}] (* _Michael De Vlieger_, Sep 27 2015 *)
%o (PARI) a(n) = {f = factor(n^2+1)[1,1]; k = 1; while (! ((g=factor(k^2+1)) && (g[#g~,1] == f)), k++); k;} \\ _Michel Marcus_, Sep 14 2014
%Y Cf. A002522, A089120, A014442.
%K nonn
%O 1,2
%A _Michel Lagneau_, Sep 14 2014