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.

A253596 Numbers k such that A002313(m) is the greatest prime divisor of k^2 + 1 and A002313(m+1) is the greatest prime divisor of (k+1)^2 + 1 for some m.

Original entry on oeis.org

1, 7, 31, 293, 1936, 2244, 4158, 5744, 11573, 25242, 285202, 339354
Offset: 1

Views

Author

Michel Lagneau, Jan 05 2015

Keywords

Comments

A002313 contains the primes congruent to 1 or 2 (mod 4).
The corresponding indices m in A002313 are 1, 2, 6, 13, 69, 65, 322, 199, 130, 46, 1471, 866, ...
The corresponding primes A002313(m) are 2, 5, 37, 101, 809, 761, 4877, 2777, 1709, 509, 26821, 14957, ...

Examples

			31 is in the sequence because 31^2 + 1 = 2*13*37 and 32^2 + 1 = 5*5*41 with the property that 37 = A002313(6) and 41 = A002313(7).
		

Crossrefs

Programs

  • Maple
    with(numtheory): nn:=500000:print(1):
    for n from 1 to nn do:
       p:=n^2+1:x:=factorset(p):n0:=nops(x):p1:=x[n0]:
       q:=(n+1)^2+1:y:=factorset(q):n1:=nops(y):p2:=y[n1]:ii:=0:
         for j from 2 by 2 to 1000 while(ii=0) do:
          pp:=p1+j:
          if type(pp,prime)=true and irem(pp,4)=1
          then
          p3:=pp:ii:=1:
          else
          fi:
        od:
        if p3=p2
        then
        print(n):
         else
         fi:
        od:
  • Mathematica
    lst={};Do[If[Mod[Prime[i],4]==1||Mod[Prime[i],4]==2,AppendTo[lst,Prime[i]]],{i,1,1000}];Do[Do[If[FactorInteger[n^2+1][[-1]][[1]]==Part[lst,j]&&FactorInteger[(n+1)^2+1][[-1]][[1]]==Part[lst,j+1],Print[n]],{n,1,20000}],{j,1,999}]