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

A387048 Numbers k such that k^2 + sopfr(k)^2 is prime, where sopfr = A001414.

Original entry on oeis.org

6, 10, 12, 14, 21, 22, 39, 40, 44, 46, 51, 54, 57, 62, 65, 69, 74, 80, 82, 86, 90, 91, 95, 104, 108, 111, 115, 119, 129, 134, 141, 155, 161, 164, 166, 172, 176, 187, 189, 202, 210, 212, 217, 221, 226, 232, 244, 248, 252, 254, 265, 272, 274, 287, 292, 295, 297, 299, 300, 302, 305, 306, 328, 339
Offset: 1

Views

Author

Robert Israel, Aug 14 2025

Keywords

Comments

Includes 2*p where p is a prime such that 5 * p^2 + 4 * p + 4 is prime. The Generalized Bunyakowsky Conjecture implies there are infinitely many of these.

Examples

			a(3) = 12 is a term because 12^2 + sopfr(12)^2 = 144 + (2*2+3)^2 = 193 is prime.
		

Crossrefs

Programs

  • Maple
    sopfr:= proc(n) local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc:
    filter:= t -> isprime(t^2 + sopfr(t)^2):
    select(filter, [$1..10^3]);
  • Mathematica
    q[k_] := PrimeQ[k^2 + (Plus @@ Times @@@ FactorInteger[k])^2]; Select[Range[2, 340], q] (* Amiram Eldar, Aug 14 2025 *)

A385885 Nonprimes k such that k^2 - sopfr(k)^2 is a square, where sopfr = A001414.

Original entry on oeis.org

1, 4, 366, 1095, 51846, 258410, 982815, 10653351
Offset: 1

Views

Author

Robert Israel, Aug 13 2025

Keywords

Examples

			a(4) = 1095 is a term because 1095 = 3 * 5 * 73 and 1095^2 - (3+5+73)^2 = 1192464 = 1092^2.
		

Crossrefs

Programs

  • Maple
    sopfr:= proc(n) local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc:
    filter:= t -> not isprime(t) and issqr(t^2 - sopfr(t)^2):
    select(filter, [$1..10^8]);
  • Mathematica
    q[k_] := !PrimeQ[k] && IntegerQ[Sqrt[k^2 - (Plus @@ Times @@@ FactorInteger[k])^2]]; Select[Range[10^6], q] (* Amiram Eldar, Aug 14 2025 *)
  • PARI
    isok(k) = if (!ispseudoprime(k), my(f=factor(k)); issquare(k^2 - (f[, 1]~*f[, 2])^2)); \\ Michel Marcus, Aug 21 2025
  • Python
    from math import isqrt
    from sympy import factorint, isprime
    def is_square(n): return n >= 0 and isqrt(n)**2 == n
    def ok(n): return  not isprime(n) and is_square(n**2-sum(p*e for p,e in factorint(n).items())**2)
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Aug 14 2025
    

Extensions

Edited to insert 1 by Robert Israel, Aug 22 2025
Showing 1-2 of 2 results.