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.

A355643 Numbers k having a divisor d such that d+k/d is prime.

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 16, 18, 22, 24, 28, 30, 34, 36, 40, 42, 46, 48, 52, 54, 58, 60, 66, 70, 72, 76, 78, 82, 84, 88, 90, 96, 100, 102, 106, 108, 112, 114, 118, 120, 126, 130, 132, 136, 138, 142, 148, 150, 154, 156, 160, 162, 166, 168, 172, 174, 178, 180, 184, 186, 190, 192, 196, 198, 202, 204, 208
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jul 11 2022

Keywords

Comments

All terms > 2 are congruent to 0 or 4 (mod 6).

Examples

			a(10) = 24 is a term because 24 = 3*8 with 3+8 = 11 prime.
		

Crossrefs

Contains A006093.
Cf. A355644.

Programs

  • Maple
    filter:= proc(n) local F,t;
      F:= select(t -> t^2 <=n, numtheory:-divisors(n));
      ormap(isprime, map(t -> t+n/t, F))
    end proc:
    select(filter, [$1..300]);
  • Mathematica
    q[n_] := AnyTrue[Divisors[n], PrimeQ[# + n/#] &]; Select[Range[200], q] (* Amiram Eldar, Jul 11 2022 *)
  • PARI
    isok(k) = fordiv(k, d, if (isprime(d+k/d), return(1))); \\ Michel Marcus, Jul 11 2022
    
  • Python
    from sympy import divisors, isprime
    def ok(n): return any(isprime(d+n//d) for d in divisors(n, generator=True))
    print([k for k in range(1, 210) if ok(k)]) # Michael S. Branicky, Jul 11 2022