login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A062301 Number of ways writing n-th prime as a sum of two primes. 7

%I

%S 0,0,1,1,0,1,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,1,

%T 0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,0,1,0,0,0,0,1,0,0,1,0,0,0,1,0,0,0,

%U 0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1

%N Number of ways writing n-th prime as a sum of two primes.

%C a(n) = 1 if and only if n is in A006512. - _Robert Israel_, Apr 04 2018

%H Muniru A Asiru, <a href="/A062301/b062301.txt">Table of n, a(n) for n = 1..3000</a>

%p a:= n-> `if`(isprime(ithprime(n)-2), 1, 0):

%p seq(a(n), n=1..105); # _Alois P. Heinz_, Oct 02 2020

%t Table[Sum[(PrimePi[Prime[n] - i] - PrimePi[Prime[n] - i - 1]) (PrimePi[i] - PrimePi[i - 1]), {i, Floor[Prime[n]/2]}], {n, 100}] (* _Wesley Ivan Hurt_, Apr 04 2018 *)

%o (PARI) a(n) = isprime(prime(n) - 2) \\ _David A. Corneth_, Apr 04 2018

%o (GAP) P:=Filtered([1..1000],IsPrime);; a:=List(List(List(P, i -> Partitions(i,2)), k -> Filtered(k, i -> IsPrime(i[1]) and IsPrime(i[2]))),Length); # _Muniru A Asiru_, Apr 05 2018

%Y Equals A061358(A000040(n)).

%Y Cf. A006512, A014092, A025584.

%K nonn

%O 1,1

%A _Labos Elemer_, Jul 05 2001

%E Offset changed to 1 by _David A. Corneth_, Apr 04 2018

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 27 14:10 EST 2020. Contains 338683 sequences. (Running on oeis4.)