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.

A082519 Number of times that k^2 + (n-k)^2 is prime for 1 <= k <= n-1.

This page as a plain text file.
%I A082519 #12 Jan 22 2020 20:08:57
%S A082519 1,2,0,4,0,4,0,4,0,6,0,6,0,8,0,8,0,8,0,6,0,8,0,16,0,8,0,12,0,10,0,8,0,
%T A082519 18,0,16,0,12,0,18,0,14,0,14,0,14,0,10,0,14,0,18,0,28,0,16,0,18,0,22,
%U A082519 0,14,0,34,0,22,0,20,0,18,0,22,0,18,0,16,0,26,0,18,0,30,0,40,0,22,0,28,0
%N A082519 Number of times that k^2 + (n-k)^2 is prime for 1 <= k <= n-1.
%H A082519 Antti Karttunen, <a href="/A082519/b082519.txt">Table of n, a(n) for n = 2..16384</a>
%F A082519 a(2) = 1, a(2n) = 0 for n>1 and a(2n+1) = 2*A036468(n) for n>0 - _T. D. Noe_, Oct 15 2004
%e A082519 a(5) = 4 because 1+16, 4+9, 9+4 and 16+1 are primes.
%t A082519 Table[cnt=0; Do[If[PrimeQ[k^2+(n-k)^2], cnt++ ], {k, 1, n-1}]; cnt, {n, 2, 150}]
%o A082519 (PARI) A082519(n) = sum(k=1,n-1,isprime((k^2)+((n-k)^2))); \\ _Antti Karttunen_, Jan 22 2020
%Y A082519 Cf. A036468 (number of ways to represent 2n+1 as a+b with a^2+b^2 prime).
%K A082519 nonn
%O A082519 2,2
%A A082519 CHAUVIN thierry (thierry.chaun2(AT)wanadoo.fr), Apr 30 2003
%E A082519 Edited and extended by _T. D. Noe_, Oct 15 2004