A308950 Number of ways to write n as (p-1)/6 + 2^a*3^b, where p is a prime, and a and b are nonnegative integers.
0, 1, 2, 3, 3, 3, 4, 4, 5, 4, 5, 4, 6, 7, 6, 4, 5, 6, 9, 6, 6, 6, 5, 6, 7, 6, 7, 7, 10, 7, 6, 5, 8, 10, 8, 7, 8, 8, 11, 5, 10, 8, 8, 7, 6, 6, 6, 9, 10, 8, 6, 5, 10, 9, 8, 7, 9, 7, 11, 7, 8, 8, 7, 13, 10, 7, 10, 5, 10, 10, 10, 8, 8, 13, 9, 8, 8, 10, 11, 9, 8, 11, 8, 10, 10, 8, 8, 10, 9, 8, 8, 8, 10, 10, 8, 5, 11, 8, 15, 7
Offset: 1
Keywords
Examples
a(2) = 1 since 2 = (7-1)/6 + 2^0*3^0 with 7 prime. a(3) = 2 since 3 = (13-1)/6 + 2^0*3^0 = (7-1)/6 + 2^1*3^0 with 13 and 7 prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
tab={};Do[r=0;Do[If[PrimeQ[6(n-2^a*3^b)+1],r=r+1],{a,0,Log[2,n]},{b,0,Log[3,n/2^a]}];tab=Append[tab,r],{n,1,100}];Print[tab]
Comments