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.

Previous Showing 21-23 of 23 results.

A252096 Largest prime divisor of n^2+1 - smallest prime divisor of n^2+1.

Original entry on oeis.org

0, 0, 3, 0, 11, 0, 3, 8, 39, 0, 59, 24, 15, 0, 111, 0, 27, 8, 179, 0, 15, 92, 51, 0, 311, 0, 71, 152, 419, 36, 35, 36, 107, 76, 611, 0, 135, 12, 759, 0, 27, 348, 35, 136, 1011, 44, 15, 456, 1199, 20, 1299, 536, 279, 0, 87, 0, 11, 668, 1739, 264, 1859, 764, 395
Offset: 1

Views

Author

Michel Lagneau, Dec 14 2014

Keywords

Examples

			a(5)= 11 because 5^2+1 = 2*13 and 13-2 = 11.
		

Crossrefs

Cf. A002522 (n^2+1), A005574 (n^2+1 is prime).
Cf. A014442 (largest prime factor of n2+1), A089120 (smallest prime factor).

Programs

  • Maple
    with(numtheory):
    a:= n-> (f-> max(f[])-min(f[]))(factorset(n^2+1)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jan 07 2015
  • Mathematica
    f[n_]:=Transpose[FactorInteger[n^2+1]][[1]]; Table[Last[f[n]-First[f[n]]], {n, 200}]
  • PARI
    a(n) = {my(f = factor(n^2+1)); f[#f~,1] - f[1,1];} \\ Michel Marcus, Dec 15 2014

Formula

a(n) = A014442(n) - A089120(n).
a(A005574(n)) = 0. - Michel Marcus, Dec 15 2014

A252890 Number of times the greatest prime factor of n^2 + 1 is a factor in all numbers <= n.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 4, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 6, 1, 1, 4, 1, 3, 1, 1, 2, 7, 1, 1, 2, 1, 1, 1, 1, 2, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 6, 1, 3, 4, 1, 2, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1
Offset: 1

Views

Author

Michel Lagneau, Dec 24 2014

Keywords

Comments

The greatest prime factor is counted with multiplicity (see the example).
a(n)=1 iff n^2 + 1 is prime.

Examples

			a(7)=4 because 7^2 + 1 = 50 and 5 is 4 times a factor:
2^2+1 = 5;
3^2+1 = 10 = 2*5;
7^2+1 = 50 = 2*5*5 (two times).
		

Crossrefs

Programs

  • Maple
    with(numtheory): with(padic,ordp):
    f:= proc(n) local p ,q, n0;
      q:=factorset(n^2+1);n0:=nops(q);p:= q[n0];
      add(ordp(k^2+1, p), k=1..n);
    end proc:
    seq(f(n), n=1.. 100);
    # Using code from Robert Israel adapted for this sequence. See A078897.

A348594 Numbers m such that m^2 + 1 = p*q with p, q primes and m = (p + q)/2 - 1.

Original entry on oeis.org

8, 50, 1250, 1800, 2450, 9800, 14450, 20000, 24200, 101250, 105800, 135200, 162450, 168200, 204800, 304200, 336200, 451250, 480200, 490050, 530450, 696200, 924800, 966050, 1008200, 1125000, 1155200, 1428050, 1805000, 2332800, 2420000, 2576450, 2761250, 2832200
Offset: 1

Views

Author

Michel Lagneau, Jan 26 2022

Keywords

Comments

Subsequence of A085722.
The corresponding pairs (p, q) of the sequence are (5, 13), (41, 61), (1201, 1301), (1741, 1861), (2381, 2521), (9661, 9941), (14281, 14621), (19801, 20201), (23981, 24421), (100801, 101701), ...
Property:
a(n) = 2* A109306(n)^2 and a(n) == 0 (mod 50) for n > 1. Proof:
From the relations:
(1) m^2 + 1 = p*q
(2) (p + q)/2 = m + 1
We obtain:
(3) p = m + 1 - sqrt(8*m)/2
(4) q = m + 1 + sqrt(8*m)/2
with m = 2*k^2 we obtain:
(5) p = k^2 + (k-1)^2
(6) q = k^2 + (k+1)^2
For n > 1, A109306(n) == 0 (mod 5) => 2*A109306(n)^2 == 0 (mod 50).

Examples

			50 = 2*5^2 is in the sequence because 50^2 + 1 = 41*61 with 50 = (41 + 61)/2 - 1.
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=250:printf(`%d, `,8):
    for k from 0 to nn do:
    n:=50*k^2:d:=factorset(n^2+1):
      if bigomega(n^2+1)=2 and (d[1]+d[2])/2 - 1 = n
       then
        printf(`%d, `,n):
        else
      fi:
    od:
  • Mathematica
    q[n_] := Module[{f = FactorInteger[n^2 + 1]}, f[[;; , 2]] == {1, 1} && f[[1, 1]] + f[[2, 1]] == 2*n + 2]; Select[Range[3*10^5], q] (* Amiram Eldar, Jan 26 2022 *)
  • PARI
    isok(m) = my(x); if (bigomega(x=m^2+1)==2, my(f=factor(x)); (f[1,1]+f[2,1] == 2*(m+1))); \\ Michel Marcus, Jan 26 2022
Previous Showing 21-23 of 23 results.