A256852 Number of ways to write prime(n) = a^2 + b^4.
1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Keywords
Examples
First numbers n, such that a(n) > 0: . k | n | prime(n) | a(n) . ----+----+-------------------------------+----- . 1 | 1 | 2 = 1^2 + 1^4 | 1 . 2 | 3 | 5 = 2^2 + 1^4 | 1 . 3 | 7 | 17 = 1^2 + 2^4 = 4^2 + 1^4 | 2 . 4 | 12 | 37 = 6^2 + 1^4 | 1 . 5 | 13 | 41 = 5^2 + 2^4 | 1 . 6 | 25 | 97 = 4^2 + 3^4 = 9^2 + 2^4 | 2 . 7 | 33 | 101 = 10^2 + 1^4 | 1 . 8 | 42 | 181 = 10^2 + 3^4 | 1 . 9 | 45 | 197 = 14^2 + 1^4 | 1 . 10 | 53 | 241 = 15^2 + 2^4 | 1 . 11 | 55 | 257 = 1^2 + 4^4 = 16^2 + 1^4 | 2 . 12 | 59 | 277 = 14^2 + 3^4 | 1 . 13 | 60 | 281 = 5^2 + 4^4 | 1 . 14 | 68 | 337 = 9^2 + 4^4 = 16^2 + 3^4 | 2 . 15 | 79 | 401 = 20^2 + 1^4 | 1 . 16 | 88 | 457 = 21^2 + 2^4 | 1 .
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Art of Problem Solving, Fermat's Two Squares Theorem
- John Friedlander and Henryk Iwaniec, Using a parity-sensitive sieve to count prime values of a polynomial, PNAS, vol. 94 no. 4, pp. 1054-1058.
- Wikipedia, Friedlander-Iwaniec theorem
Programs
-
Haskell
a256852 n = a256852_list !! (n-1) a256852_list = f a000040_list [] $ tail a000583_list where f ps'@(p:ps) us vs'@(v:vs) | p > v = f ps' (v:us) vs | otherwise = (sum $ map (a010052 . (p -)) us) : f ps us vs'
Comments