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.

A355644 Primes p such that p^2-1 does not have a divisor d with d + (p^2-1)/d prime.

Original entry on oeis.org

2, 3, 467, 487, 787, 887, 1279, 2063, 2557, 2657, 2903, 3323, 3413, 3547, 3583, 4273, 4373, 4517, 4567, 4801, 5233, 5393, 5443, 6047, 6823, 6911, 7507, 9133, 9137, 9721, 9973, 10103, 10313, 10937, 12227, 12763, 13183, 13627, 14407, 15073, 15083, 15187, 15359, 15787, 16903, 17047, 17911, 18013, 18587
Offset: 1

Views

Author

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

Keywords

Comments

Primes p such that p^2-1 is not in A355643.

Examples

			a(2) = 3 is a term because it is prime, the divisors of 3^2-1 = 8 are 1, 2, 4 and 8, and none of 1+8/1 = 9, 2+8/2 = 6, 4+8/4 = 6, 8+8/8 = 9 are prime.
		

Crossrefs

Cf. A355643.

Programs

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

A384488 Numbers k having a divisor d such that d - k/d is prime.

Original entry on oeis.org

3, 4, 6, 8, 10, 12, 14, 15, 18, 20, 24, 26, 28, 30, 32, 35, 36, 38, 40, 42, 44, 48, 50, 54, 60, 62, 63, 66, 68, 70, 72, 74, 78, 80, 84, 86, 88, 90, 92, 96, 98, 99, 102, 104, 108, 110, 114, 120, 122, 126, 128, 130, 132, 138, 140, 143, 144, 146, 150, 152, 154, 158, 162, 164, 168, 170, 174, 176, 180
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 30 2025

Keywords

Comments

Presumably, all odd terms are in A000466.

Examples

			a(6) = 12 is a term because 12 = 1*12 with 12 - 1 = 11 prime.
		

Crossrefs

Cf. A000466, A005408, A355643. Includes A005563 and 2 * A052147.

Programs

  • Magma
    [k: k in [1..180] | not #[d: d in Divisors (k) | IsPrime(d-(k div d))] eq 0];
    
  • Maple
    filter:= k -> ormap(d -> d^2 > k and isprime(d - k/d), numtheory:-divisors(k)):
    select(filter, [$1..200]); # Robert Israel, Jun 30 2025
  • Mathematica
    A384488Q[k_] := AnyTrue[Divisors[k], PrimeQ[# - k/#] &];
    Select[Range[200], A384488Q] (* Paolo Xausa, Jun 30 2025 *)
  • PARI
    isok(k) = fordiv(k, d, if (isprime(d - k/d), return(1))); \\ Michel Marcus, Jun 01 2025
Showing 1-2 of 2 results.