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!)
A240753 Number of values of k such that n + k + 1 and n + n/k + 1 are both prime. 1

%I #19 Apr 18 2014 02:49:03

%S 1,0,2,1,2,0,0,2,3,0,2,0,0,0,2,0,0,0,0,2,2,0,0,2,1,0,2,2,2,0,0,2,0,0,

%T 4,1,0,0,4,2,2,0,0,2,0,0,0,2,0,0,2,0,0,0,2,2,0,0,0,2,0,0,2,3,4,0,0,2,

%U 2,0,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2

%N Number of values of k such that n + k + 1 and n + n/k + 1 are both prime.

%C a(n) is not 0 for n = 1, 3, 4, 5, 8, 9, 11, 15, 20, 21, 24, 25, 27, 28, 29, ... - _Michel Marcus_, Apr 16 2014

%e a(9) = 3 because

%e 1) 9 + 1 + 1 = 11 and 9 + 9/1 + 1 = 19 are both prime for value of k = 1,

%e 2) 9 + 3 + 1 = 13 and 9 + 9/3 + 1 = 13 are both prime for value of k = 3,

%e 3) 9 + 9 + 1 = 19 and 9 + 9/9 + 1 = 11 are both prime for value of k = 9.

%p with(numtheory): A240753 := proc (n) local ct, k: ct := 0: for k in divisors(n) do if isprime(n+k+1) and isprime(n+n/k+1) then ct := ct+1: end if end do: return ct: end proc: seq(A240753(n), n = 1 .. 100); # _Nathaniel Johnston_, Apr 15 2014

%o (PARI) for(n=1, 100, m=0; fordiv(n, k, if(isprime(n+k+1) && isprime(n+n/k+1), m++)); print1(m, ", ")) \\ _Colin Barker_, Apr 12 2014

%K nonn

%O 1,3

%A _Ilya Lopatin_ and _Juri-Stepan Gerasimov_, Apr 12 2014

%E Several terms and the example corrected by _Colin Barker_, Apr 13 2014

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 April 16 11:08 EDT 2024. Contains 371711 sequences. (Running on oeis4.)