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
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, 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, 10, 9, 4, 14, 5, 10, 13, 5, 10, 9, 6, 14, 6, 8, 12, 11, 7, 13, 10, 14, 9, 15, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
EXAMPLE
a(4) = 2 because 4^4 + 1^4 = 257 and 4^4 + 3^4 = 337 are prime numbers.
MATHEMATICA
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]
PROG
(PARI) a(n) = if(n==1, 1, sum(k=1, n-1, isprime(n^4+k^4)));
(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
CROSSREFS
Sequence in context: A235061 A355244 A364730 * A111709 A348911 A039996
KEYWORD
nonn
AUTHOR
STATUS
approved

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 March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)