cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A247339 #17 Sep 27 2015 17:50:44
%S A247339 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 A247339 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 A247339 4,1,66,1,2,1,5,1,2,1,74,1,23,1,2,1,6,1,2
%N 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.
%C A247339 a(n)=n if n^2+1 is prime and a(n)=1 if n is odd.
%C A247339 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 A247339 Michel Lagneau, <a href="/A247339/b247339.txt">Table of n, a(n) for n = 1..10000</a>
%e A247339 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 A247339 with(numtheory):nn:=2000:T:=array(1..nn):U:=array(1..nn):
%p A247339   for i from 1 to nn do:
%p A247339     x:=factorset(i^2+1):T[i]:=x[1]:U[i]:=i:
%p A247339   od:
%p A247339     for n from 1 to 100 do:
%p A247339      ii:=0:
%p A247339       for k from 1 to 50000 while(ii=0) do:
%p A247339        y:=factorset(k^2+1):n0:=nops(y):q:=y[n0]:
%p A247339         if q=T[n]
%p A247339          then
%p A247339          ii:=1: printf(`%d, `,k):
%p A247339          else
%p A247339         fi:
%p A247339      od:
%p A247339    od:
%t A247339 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 A247339 (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 A247339 Cf. A002522, A089120, A014442.
%K A247339 nonn
%O A247339 1,2
%A A247339 _Michel Lagneau_, Sep 14 2014