A231633 Number of ways to write n = x + y (x, y > 0) with x^2 * y - 1 prime.
0, 0, 1, 2, 3, 1, 3, 2, 5, 2, 4, 2, 7, 2, 5, 3, 5, 3, 10, 4, 5, 3, 8, 3, 14, 6, 5, 4, 11, 5, 11, 3, 11, 9, 4, 5, 10, 5, 11, 9, 12, 3, 19, 7, 11, 6, 12, 9, 11, 7, 17, 7, 13, 5, 22, 3, 3, 15, 16, 5, 25, 4, 9, 11, 13, 5, 19, 6, 22, 6, 11, 6, 39, 6, 24, 7, 7, 6, 25, 8, 21, 11, 24, 7, 31, 7, 19, 11, 33, 10, 14, 8, 15, 27, 18, 9, 21, 4, 27, 9
Offset: 1
Keywords
Examples
a(6) = 1 since 6 = 4 + 2 with 4^2*2 - 1 = 31 prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
a[n_]:=Sum[If[PrimeQ[x^2*(n-x)-1],1,0],{x,1,n-1}] Table[a[n],{n,1,100}]
Comments