A228430 Number of ways to write n = x + y (x, y > 0) with x^4 + y*(y+1)/2 prime.
0, 1, 1, 2, 2, 0, 2, 3, 2, 3, 2, 3, 4, 1, 2, 1, 4, 3, 1, 1, 6, 4, 2, 4, 4, 4, 1, 5, 3, 5, 6, 4, 6, 3, 5, 5, 6, 3, 3, 5, 5, 5, 9, 3, 3, 11, 6, 7, 4, 8, 7, 12, 7, 5, 10, 4, 3, 8, 8, 3, 11, 6, 5, 10, 4, 6, 14, 6, 3, 9, 3, 12, 12, 9, 3, 11, 6, 10, 15, 7, 7, 8, 3, 6, 11, 8, 11, 10, 7, 3, 11, 10, 7, 11, 4, 6, 13, 11, 9, 8
Offset: 1
Keywords
Examples
a(14) = 1 since 14 = 4 + 10 with 4^4 + 10*11/2 = 311 prime. a(27) = 1 since 27 = 22 + 5 with 22^4 + 5*6/2 = 234271 prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
a[n_]:=Sum[If[PrimeQ[x^4+(n-x)(n-x+1)/2],1,0],{x,1,n-1}] Table[a[n],{n,1,100}]
Comments