A209914 Number of ways n can be written as a multiple of its reversal A004086(n) +/- a prime p < n.
0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 2, 3, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2
Offset: 0
Examples
a(10)=8 because R(10)=01=1 and 10 = 3*1 + 7 = 5*1 + 5 = 7*1 + 3 = 8*1 + 2 = 12*1 - 2 = 13*1 - 3 = 15*1 - 5 = 17*1 - 7.
Crossrefs
Cf. A209063.
Programs
-
PARI
a(n)={my(r=A004086(n)); sum(k=1, (2*n-1)\(r+!r), isprime(abs(n-k*r)))}
Comments