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-5 of 5 results.

A209874 Least m > 0 such that the prime p=A002313(n+1) divides m^2+1.

Original entry on oeis.org

1, 2, 8, 4, 12, 6, 32, 30, 50, 46, 34, 22, 10, 76, 98, 100, 44, 28, 80, 162, 112, 14, 122, 144, 64, 16, 82, 60, 228, 138, 288, 114, 148, 136, 42, 104, 274, 334, 20, 266, 392, 254, 382, 348, 48, 208, 286, 52, 118, 86, 24, 516, 476, 578, 194, 154, 504, 106, 58, 26, 566, 96, 380, 670, 722, 62, 456, 582, 318, 526, 246, 520, 650, 726, 494, 324
Offset: 0

Views

Author

M. F. Hasler, Mar 11 2012

Keywords

Comments

This yields the prime factors of numbers of the form N^2+1, cf. formula in A089120: For n=0,1,2,... check whether N = +/- a(n) [mod 2*A002313(n+1)], if so, then A002313(n+1) is a prime factor of N^2+1.
Obviously, p then divides (2kp +/- a(n))^2+1 for all k >=0 ; in particular it will be the least prime factor of such numbers if there is no earlier match.
Alternatively one could deal separately with the case of odd N, for which p=2 divides N^2+1, and even N, for which only Pythagorean primes A002144(n)=A002313(n+1) can be prime factors of N^2+1.

Crossrefs

Programs

  • PARI
    A209874(n)=if( n, 2*lift(sqrt(Mod(-1, A002144[n])/4)), 1)
    
  • PARI
    /* for illustrative purpose: a(n) is the smaller of the 2 possible remainders mod 2*p of numbers N such that N^2+1 has p as smallest prime factor */ forprime( p=1,199, p>2 & p%4 != 1 & next; my(c=[]); for(i=1,9e9, factor(i^2+1)[1,1]==p |next; c=vecsort(concat(c,i%(2*p)),,8); #c==1 || print1(","c[1]) || break))

Formula

For n>0, A209874(n) = 2*sqrt(-1/4 mod A002144(n)), where sqrt(a mod p) stands for the positive x < p/2 such that x^2=a in Z/pZ.
A209874(n) = A209877(n)*2 for n>0.

A223702 Irregular triangle of numbers k such that A002313(n), the n-th prime not congruent to 3 mod 4 is the largest prime factor of k^2 + 1.

Original entry on oeis.org

1, 2, 3, 7, 5, 8, 18, 57, 239, 4, 13, 21, 38, 47, 268, 12, 17, 41, 70, 99, 157, 307, 6, 31, 43, 68, 117, 191, 302, 327, 882, 18543, 9, 32, 73, 132, 278, 378, 829, 993, 2943, 23, 30, 83, 182, 242, 401, 447, 606, 931, 1143, 1772, 6118, 34208, 44179, 85353, 485298
Offset: 1

Views

Author

T. D. Noe, Apr 03 2013

Keywords

Comments

Note that primes of the form 4x+3 are not divisors.

Examples

			Irregular triangle:
   p | {k}
-----+---------------------------------
   2 | {1},
   5 | {2, 3, 7},
  13 | {5, 8, 18, 57, 239},
  17 | {4, 13, 21, 38, 47, 268},
  29 | {12, 17, 41, 70, 99, 157, 307},
  37 | {6, 31, 43, 68, 117, 191, 302, 327, 882, 18543},
  41 | {9, 32, 73, 132, 278, 378, 829, 993, 2943}
  ...
		

Crossrefs

Cf. A002313, A014442, A177979 (first terms), A185389 (last terms), A223705, A285283, A379346 (row lengths), A379347 (row sums).
Cf. A223701, A223703, A223704 (related tables).

Programs

  • Mathematica
    t = Table[FactorInteger[n^2 + 1][[-1,1]], {n, 10^5}]; Table[Flatten[Position[t, Prime[n]]], {n, 13}]

Extensions

Definition amended by Andrew Howroyd, Dec 22 2024

A379346 Number of integers of the form k^2 + 1 whose greatest prime factor is A002313(n), the n-th prime not congruent to 3 mod 4.

Original entry on oeis.org

1, 3, 5, 6, 7, 10, 9, 16, 17, 20, 26, 36, 36, 40, 46, 47, 56, 67, 73, 86, 97, 107
Offset: 1

Views

Author

Andrew Howroyd, Dec 22 2024

Keywords

Comments

See A223702 for additional information.

Crossrefs

Row lengths of A223702.
First differences of A285283.

A209877 a(n) = A209874(n)/2: Least m > 0 such that 4*m^2 = -1 modulo the Pythagorean prime A002144(n).

Original entry on oeis.org

1, 4, 2, 6, 3, 16, 15, 25, 23, 17, 11, 5, 38, 49, 50, 22, 14, 40, 81, 56, 7, 61, 72, 32, 8, 41, 30, 114, 69, 144, 57, 74, 68, 21, 52, 137, 167, 10, 133, 196, 127, 191, 174, 24, 104, 143, 26, 59, 43, 12, 258, 238, 289, 97, 77, 252, 53, 29, 13, 283, 48, 190, 335, 361, 31, 228, 291, 159, 263, 123, 260, 325, 363, 247, 162
Offset: 1

Views

Author

M. F. Hasler, Mar 14 2012

Keywords

Comments

Also: Square root of -1/4 in Z/pZ, for Pythagorean primes p=A002144(n).
Also: Least m>0 such that the Pythagorean prime p=A002144(n) divides 4(kp +/- m)^2+1 for all k>=0.
In practice these can also be determined by searching the least N^2+1 whose least prime factor is p=A002144(n): For given p, all of these N will have a(n) or p-a(n) as remainder mod 2p.

Examples

			a(1)=1 since A002144(1)=5 and 4*1^2+1 is divisible by 5; as a consequence 4*(5k+/-1)^2+1 = 100k^2 +/- 40k + 5 is divisible by 5 for all k.
a(2)=4 since A002144(2)=13 and 4*4^2+1 = 65 is divisible by 13, while 4*1^1+1=5, 4*2^2+1=17 and 4*3^2+1=37 are not. As a consequence, 4*(13k+/-4)^2+1 = 13(...)+4*4^1+1 is divisible by 13 for all k.
		

Crossrefs

Programs

  • Maple
    f:= proc(p) local m;
       if not isprime(p) then return NULL fi;
       m:= numtheory:-msqrt(-1/4, p);
       min(m,p-m);
    end proc:
    map(f, [seq(i,i=5..1000,4)]); # Robert Israel, Mar 13 2018
  • Mathematica
    f[p_] := Module[{r}, r /. Solve[4 r^2 == -1, r, Modulus -> p] // Min];
    f /@ Select[4 Range[300] + 1, PrimeQ] (* Jean-François Alcover, Jul 27 2020 *)
  • PARI
    apply(p->lift(sqrt(Mod(-1,p)/4)), A002144)

A223705 Least number k such that prime(n) is the largest divisor of k^2 + 1, or 0 if there is no such k.

Original entry on oeis.org

1, 0, 2, 0, 0, 5, 4, 0, 0, 12, 0, 6, 9, 0, 0, 23, 0, 11, 0, 0, 27, 0, 0, 34, 22, 10, 0, 0, 33, 15, 0, 0, 37, 0, 44, 0, 28, 0, 0, 80, 0, 19, 0, 81, 14, 0, 0, 0, 0, 107, 89, 0, 64, 0, 16, 0, 82, 0, 60, 53, 0, 138, 0, 0, 25, 114, 0, 148, 0, 136, 42, 0, 0, 104, 0, 0
Offset: 1

Views

Author

T. D. Noe, Apr 03 2013

Keywords

Comments

Note that a(n) = 0 for prime(n) = 3 (mod 4). If the zeros are removed, A002314 (with 1 prepended) and A177979 are produced.

Crossrefs

Cf. A223701-A223707 (related sequences).

Programs

  • Mathematica
    nn = 100; t = Table[0, {nn}]; Do[If[Mod[Prime[n], 4] == 3, t[[n]] = -1], {n, nn}]; n = 0; While[Times @@ t == 0, n++; s = FactorInteger[n^2 + 1][[-1, 1]]; p = PrimePi[s]; If[p <= nn && t[[p]] == 0, t[[p]] = n]]; Do[If[Mod[Prime[n], 4] == 3, t[[n]] = 0], {n, nn}]; t
Showing 1-5 of 5 results.