login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A355643 Numbers k having a divisor d such that d+k/d is prime. 2

%I #16 Jul 13 2022 13:07:54

%S 1,2,4,6,10,12,16,18,22,24,28,30,34,36,40,42,46,48,52,54,58,60,66,70,

%T 72,76,78,82,84,88,90,96,100,102,106,108,112,114,118,120,126,130,132,

%U 136,138,142,148,150,154,156,160,162,166,168,172,174,178,180,184,186,190,192,196,198,202,204,208

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

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

%H Robert Israel, <a href="/A355643/b355643.txt">Table of n, a(n) for n = 1..10000</a>

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

%p filter:= proc(n) local F,t;

%p F:= select(t -> t^2 <=n, numtheory:-divisors(n));

%p ormap(isprime, map(t -> t+n/t, F))

%p end proc:

%p select(filter, [$1..300]);

%t q[n_] := AnyTrue[Divisors[n], PrimeQ[# + n/#] &]; Select[Range[200], q] (* _Amiram Eldar_, Jul 11 2022 *)

%o (PARI) isok(k) = fordiv(k, d, if (isprime(d+k/d), return(1))); \\ _Michel Marcus_, Jul 11 2022

%o (Python)

%o from sympy import divisors, isprime

%o def ok(n): return any(isprime(d+n//d) for d in divisors(n, generator=True))

%o print([k for k in range(1, 210) if ok(k)]) # _Michael S. Branicky_, Jul 11 2022

%Y Contains A006093.

%Y Cf. A355644.

%K nonn

%O 1,2

%A _J. M. Bergot_ and _Robert Israel_, Jul 11 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 14 05:06 EDT 2024. Contains 374291 sequences. (Running on oeis4.)