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.

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

This page as a plain text file.
%I A062301 #17 Oct 02 2020 18:37:43
%S A062301 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 A062301 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 A062301 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 A062301 Number of ways writing n-th prime as a sum of two primes.
%C A062301 a(n) = 1 if and only if n is in A006512. - _Robert Israel_, Apr 04 2018
%H A062301 Muniru A Asiru, <a href="/A062301/b062301.txt">Table of n, a(n) for n = 1..3000</a>
%p A062301 a:= n-> `if`(isprime(ithprime(n)-2), 1, 0):
%p A062301 seq(a(n), n=1..105);  # _Alois P. Heinz_, Oct 02 2020
%t A062301 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 A062301 (PARI) a(n) = isprime(prime(n) - 2) \\ _David A. Corneth_, Apr 04 2018
%o A062301 (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 A062301 Equals A061358(A000040(n)).
%Y A062301 Cf. A006512, A014092, A025584.
%K A062301 nonn
%O A062301 1,1
%A A062301 _Labos Elemer_, Jul 05 2001
%E A062301 Offset changed to 1 by _David A. Corneth_, Apr 04 2018