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 11-13 of 13 results.

A059844 a(n) = smallest nonzero square x^2 such that n+x^2 is prime.

Original entry on oeis.org

1, 1, 4, 1, 36, 1, 4, 9, 4, 1, 36, 1, 4, 9, 4, 1, 36, 1, 4, 9, 16, 1, 36, 49, 4, 81, 4, 1, 144, 1, 16, 9, 4, 9, 36, 1, 4, 9, 4, 1, 576, 1, 4, 9, 16, 1, 36, 25, 4, 9, 16, 1, 36, 25, 4, 81, 4, 1, 324, 1, 36, 9, 4, 9, 36, 1, 4, 81, 4, 1, 36, 1, 16, 9, 4, 25, 36, 1, 4, 9, 16, 1, 144, 25, 4, 81
Offset: 1

Views

Author

Labos Elemer, Feb 26 2001

Keywords

Comments

a(n) = 1 for n in A006093. - Robert Israel, Dec 31 2023

Examples

			a(24) = 49 because 49 + 24 = 73 is prime and 1 + 24 = 25, 4 + 24 = 28, 9 + 24 = 33, 16 + 24 = 40, 25 + 24 = 49, and 36 + 24 = 60 are composite.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local x;
     for x from 1 + (n mod 2) by 2  do
      if isprime(n+x^2) then return x^2 fi;
     od
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Dec 31 2023
  • Mathematica
    sqs[n_]:=Module[{q=1},While[!PrimeQ[n+q],q=(Sqrt[q]+1)^2];q]; Array[ sqs,90] (* Harvey P. Dale, Aug 11 2017 *)

Formula

a(n) + n is the smallest prime of the form x^2 + n.

A089124 Largest prime factor of n^2 + 3.

Original entry on oeis.org

2, 7, 3, 19, 7, 13, 13, 67, 7, 103, 31, 7, 43, 199, 19, 37, 73, 109, 13, 31, 37, 487, 19, 193, 157, 97, 61, 787, 211, 43, 241, 79, 13, 61, 307, 433, 7, 1447, 127, 229, 421, 31, 463, 277, 13, 163, 79, 769, 601, 2503, 31, 2707, 37, 139, 757, 73, 271, 37, 67, 1201, 19
Offset: 1

Views

Author

Cino Hilliard, Dec 05 2003

Keywords

References

  • H. Rademacher, Lectures on Elementary Number Theory, pp. 33-38.

Crossrefs

Programs

  • Mathematica
    FactorInteger[#][[-1,1]]&/@(Range[70]^2+3) (* Harvey P. Dale, Jun 17 2020 *)
  • PARI
    largeasqp3(m) = { for(a=1,m, y=a^2 + 3; f = factor(y); v = component(f,1); v1 = v[length(v)]; print1(v1",")) }

Formula

a(n) = A006530(A117950(n)). - Jason Yuen, Aug 25 2024

A309844 Primes of the form n^4 + n^2 + 3.

Original entry on oeis.org

3, 5, 23, 653, 10103, 83813, 160403, 234743, 280373, 1049603, 3420653, 6252503, 11319863, 52207853, 92246423, 146422103, 174913853, 221548343, 442071653, 479807123, 577224653, 607597853, 655385603, 937921253, 1222865933, 1249233683, 1387525253, 1506177293
Offset: 1

Views

Author

Christopher R. Madan, Aug 19 2019

Keywords

Comments

Digital root of all values > 3 is 5, compare A017221.

Crossrefs

Subset of A027753. Subset of A017221.

Programs

  • MATLAB
    a = [];
    for n = 0:1e3
        x = n.^4+n.^2+3;
        if isprime(x); a = [a,x]; end;
    end
    
  • Mathematica
    f[n_] := n^4 + n^2 + 3; Select[f /@ Range[0, 200], PrimeQ] (* Amiram Eldar, Aug 24 2019 *)
  • Python
    from sympy import isprime
    a = []
    for n in range(0,1000):
        x = n**4+n**2+3
        if isprime(x):
            a.append(x)
Previous Showing 11-13 of 13 results.