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.

Showing 1-3 of 3 results.

A125256 Smallest odd prime divisor of n^2 + 1.

Original entry on oeis.org

5, 5, 17, 13, 37, 5, 5, 41, 101, 61, 5, 5, 197, 113, 257, 5, 5, 181, 401, 13, 5, 5, 577, 313, 677, 5, 5, 421, 17, 13, 5, 5, 13, 613, 1297, 5, 5, 761, 1601, 29, 5, 5, 13, 1013, 29, 5, 5, 1201, 41, 1301, 5, 5, 2917, 17, 3137, 5, 5, 1741, 13, 1861, 5, 5, 17, 2113, 4357, 5, 5
Offset: 2

Views

Author

Nick Hobson, Nov 26 2006

Keywords

Comments

Any odd prime divisor of n^2+1 is congruent to 1 modulo 4.
n^2+1 is never a power of 2 for n > 1; hence a prime divisor congruent to 1 modulo 4 always exists.
a(n) = 5 if and only if n is congruent to 2 or -2 modulo 5.
If the map "x -> smallest odd prime divisor of n^2+1" is iterated, does it always terminate in the 2-cycle (5 <-> 13)? - Zoran Sunic, Oct 25 2017

Examples

			The prime divisors of 8^2 + 1 = 65 are 5 and 13, so a(7) = 5.
		

References

  • D. M. Burton, Elementary Number Theory, McGraw-Hill, Sixth Edition (2007), p. 191.

Crossrefs

Programs

  • Maple
    with(numtheory, factorset);
    A125256 := proc(n) local t1,t2;
    if n <= 1 then return(-1); fi;
    if (n mod 5) = 2 or (n mod 5) = 3 then return(5); fi;
    t1 := numtheory[factorset](n^2+1);
    t2:=sort(convert(t1,list));
    if (n mod 2) = 1 then return(t2[2]); fi;
    t2[1];
    end;
    [seq(A125256(n),n=1..40)]; # N. J. A. Sloane, Nov 04 2017
  • Mathematica
    Table[Select[First/@FactorInteger[n^2+1],OddQ][[1]],{n,2,68}] (* James C. McMahon, Dec 16 2024 *)
  • PARI
    vector(68, n, if(n<2, "-", factor(n^2+1)[1+(n%2),1]))
    
  • PARI
    A125256(n)=factor(n^2+1)[1+bittest(n,0),1] \\ M. F. Hasler, Nov 06 2017

A217759 Primes of the form 4k+3 generated recursively: a(1)=3, a(n)= Min{p; p is prime; Mod[p,4]=3; p|4Q^2-1}, where Q is the product of all previous terms in the sequence.

Original entry on oeis.org

3, 7, 43, 19, 6863, 883, 23, 191, 2927, 205677423255820459, 11, 163, 227, 9127, 59, 31, 71, 131627, 2101324929412613521964366263134760336303, 127, 1302443, 4065403, 107, 2591, 21487, 223, 12823, 167, 53720906651, 5452254637117019, 39827899, 11719, 131
Offset: 1

Views

Author

Daran Gill, Mar 23 2013

Keywords

Comments

Contrast A057207, where all the factors are congruent to 1 (mod 4), here only one is guaranteed to be congruent to 3 (mod 4).

Examples

			a(10) is 205677423255820459 because it is the only prime factor congruent to 3 (mod 4) of 4*(3*7*43*19*6863*883*23*191*2927)^2-1 = 5*13*2088217*256085119729*205677423255820459. The four smaller factors are all congruent to 1 (mod 4).
		

References

  • Dirichlet,P.G.L (1871): Vorlesungen uber Zahlentheorie. Braunschweig, Viewig, Supplement VI, 24 pages.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 13.

Crossrefs

A124986 Primes of the form 12*k + 5 generated recursively. Initial prime is 5. General term is a(n) = Min_{p is prime; p divides 1 + 4*Q^2; p == 5 (mod 12)}, where Q is the product of previous terms in the sequence.

Original entry on oeis.org

5, 101, 1020101, 53, 29, 2507707213238852620996901, 449, 433361, 401, 925177698346131180901394980203075088053316845914981, 44876921, 17, 173
Offset: 1

Views

Author

Nick Hobson, Nov 18 2006 and Nov 23 2006

Keywords

Comments

All prime divisors of 1+4Q^2 are congruent to 1 modulo 4.
At least one prime divisor of 1+4Q^2 is congruent to 2 modulo 3 and hence to 5 modulo 12.
The first seven terms are the same as those of A057207.
The next term is known but is too large to include.

Examples

			a(8) = 433361 is the smallest prime divisor congruent to 5 mod 12 of 1+4Q^2 = 3179238942812523869898723304484664524974766291591037769022962819805514576256901 = 13 * 433361 * 42408853 * 2272998442375593325550634821 * 5854291291251561948836681114631909089, where Q = 5 * 101 * 1020101 * 53 * 29 * 2507707213238852620996901 * 449.
		

Crossrefs

Programs

  • Mathematica
    a={5}; q=1;
    For[n=2,n<=5,n++,
        q=q*Last[a];
        AppendTo[a,Min[Select[FactorInteger[4*q^2+1][[All,1]],Mod[#,12]==5 &]]];
        ];
    a (* Robert Price, Jul 16 2015 *)
Showing 1-3 of 3 results.