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!)
A157188 Number of ways to write prime(n) as p*q-(p+q) with primes p<=q. 3

%I #3 Jul 14 2012 11:32:24

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

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

%U 2,0,0,4,0,0,1,2,0,0,0,0,4,0,4,0,0,1,0,0,1,1,1,3,0,1,1,3,0,1,1,0,0,0,1,1,0

%N Number of ways to write prime(n) as p*q-(p+q) with primes p<=q.

%C Records in this sequence are given in A157189, the corresponding primes in A157190.

%H C. Rivera (Ed.), <a href="http://www.primepuzzles.net/puzzles/puzz_482.htm">Puzzle 482: Two Bergot questions</a>, March 2009.

%e a(1)=0 since prime(1) = 2 cannot be written as pq-(p+q) for primes p,q.

%e a(2)=2 since prime(2) = 3 = 2*5-(2+5) = 3*3-(3+3) are the two possibilities.

%o (PARI) A157188(n)={ local(c=0,L=sqrtint(n=prime(n)+1)); fordiv( n,d, d>L&break; isprime(d+1) | next; isprime(n/d+1) & c++);c}

%Y Cf. A157187-A157190

%K nonn

%O 1,2

%A _M. F. Hasler_, Mar 11 2009

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 24 19:39 EDT 2024. Contains 371963 sequences. (Running on oeis4.)