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.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Sep 14 2014

Keywords

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

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
  • 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