A303660 Number of ways to write 2*n+1 as p + 3^k + 5^m, where p is a prime, and k and m are nonnegative integers.
0, 1, 2, 3, 3, 4, 4, 4, 4, 5, 3, 4, 4, 3, 6, 7, 5, 6, 8, 5, 5, 9, 6, 5, 8, 3, 6, 8, 4, 4, 7, 6, 4, 8, 6, 5, 9, 4, 4, 8, 3, 6, 8, 7, 4, 9, 6, 4, 9, 5, 5, 9, 6, 6, 11, 7, 7, 9, 5, 3, 8, 5, 3, 9, 7, 7, 11, 8, 8, 12
Offset: 1
Keywords
Examples
a(2) = 1 since 2*2+1 = 3 + 3^0 + 5^0 with 3 prime. a(3) = 2 since 2*3+1 = 3 + 3^1 + 5^0 = 5 + 3^0 + 5^0 with 3 and 5 prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Mixed sums of primes and other terms, in: Additive Number Theory (edited by D. Chudnovsky and G. Chudnovsky), pp. 341-353, Springer, New York, 2010.
Crossrefs
Programs
-
Mathematica
tab={};Do[r=0;Do[If[PrimeQ[2n+1-5^x-3^y],r=r+1],{x,0,Log[5,2n]},{y,0,Log[3,2n+1-5^x]}];tab=Append[tab,r],{n,1,70}];Print[tab]
Comments