The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A283004 Number of primes of the form n^4 + k^4 (A002645) with 1 <= k <= n. 1

%I #11 Feb 27 2017 01:05:57

%S 1,1,1,2,2,1,3,2,2,2,3,0,3,2,2,4,4,3,6,4,2,2,5,5,3,7,3,5,5,5,2,6,3,10,

%T 3,5,8,5,6,4,9,6,9,3,6,9,8,4,6,8,7,6,13,8,6,7,5,7,9,4,8,14,3,7,7,6,7,

%U 10,9,4,14,5,10,13,5,10,9,6,14,6,8,12,11,7,13,10,14,9,15,7

%N Number of primes of the form n^4 + k^4 (A002645) with 1 <= k <= n.

%H Altug Alkan, <a href="/A283004/b283004.txt">Table of n, a(n) for n = 1..10000</a>

%e a(4) = 2 because 4^4 + 1^4 = 257 and 4^4 + 3^4 = 337 are prime numbers.

%t f[n_] := Block[{b = Mod[n, 2] + 1, c = 0}, While[b < n, If[ Mod[n^4 + b^4, 16] == 1 && PrimeQ[n^4 + b^4], c++]; b++]; c]; f[1] = 1; Array[f, 90]

%o (PARI) a(n) = if(n==1, 1, sum(k=1, n-1, isprime(n^4+k^4)));

%o (PARI) first(n)=my(v=vector(n),n4); for(N=1,n, n4=N^4; forstep(k=N%2+1,N,2, if(isprime(n4+k^4), v[N]++))); v[1]++; v \\ _Charles R Greathouse IV_, Feb 27 2017

%Y Cf. A002645, A069004.

%K nonn

%O 1,4

%A _Robert G. Wilson v_ and _Altug Alkan_, Feb 26 2017

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 May 14 04:33 EDT 2024. Contains 372528 sequences. (Running on oeis4.)