login

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”).

A247339
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.
1
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, 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, 4, 1, 66, 1, 2, 1, 5, 1, 2, 1, 74, 1, 23, 1, 2, 1, 6, 1, 2
OFFSET
1,2
COMMENTS
a(n)=n if n^2+1 is prime and a(n)=1 if n is odd.
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
LINKS
EXAMPLE
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.
MAPLE
with(numtheory):nn:=2000:T:=array(1..nn):U:=array(1..nn):
for i from 1 to nn do:
x:=factorset(i^2+1):T[i]:=x[1]:U[i]:=i:
od:
for n from 1 to 100 do:
ii:=0:
for k from 1 to 50000 while(ii=0) do:
y:=factorset(k^2+1):n0:=nops(y):q:=y[n0]:
if q=T[n]
then
ii:=1: printf(`%d, `, k):
else
fi:
od:
od:
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Sep 14 2014
STATUS
approved