A112800 Number of ways of representing 2n-1 as sum of three integers with 1 distinct prime factor.
0, 0, 0, 1, 3, 4, 6, 8, 9, 10, 12, 14, 14, 16, 18, 18, 20, 23, 25, 26, 28, 30, 30, 32, 32, 34, 37, 36, 40, 43, 42, 44, 46, 46, 46, 50, 51, 53, 59, 57, 57, 61, 62, 62, 66, 68, 69, 71, 72, 71, 73, 76, 74, 81, 81, 78, 87, 90, 87, 91, 93, 90, 94, 97, 94, 100, 107, 103, 114, 115
Offset: 1
Keywords
Examples
a(4) = 1 because the only partition into nontrivial prime powers of (2*4)-1 = 7 is 7 = 2 + 2 + 3. a(5) = 3 because the 3 partitions into nontrivial prime powers of (2*5)-1 = 9 are 9 = 2 + 2 + 5 = 2 + 3 + 4 = 3 + 3 + 3. The middle one of those partitions has "4" which is not a prime, but is a power of a prime. a(6) = 4 because the 4 partitions into nontrivial prime powers of (2*6)-1 = 11 are 11 = 2 + 2 + 7 = 2 + 4 + 5 = 3 + 3 + 5. a(7) = 6 because the 6 partitions into nontrivial prime powers of (2*7)-1 = 13 are 13 = 2 + 2 + 9 = 2 + 3 + 8 = 2 + 4 + 7 = 3 + 3 + 7 = 3 + 5 + 5 = 4 + 4 + 5.
Links
- R. J. Mathar, Table of n, a(n) for n = 1..1655
- Xianmeng Meng, On sums of three integers with a fixed number of prime factors, Journal of Number Theory, Vol. 114 (2005), pp. 37-65.
Programs
-
Maple
isA000961 := proc(n) if n = 1 then return true; end if; numtheory[factorset](n) ; if nops(%) = 1 then true; else false; end if; end proc: A000961 := proc(n) option remember; local a; if n = 1 then 1; else for a from procname(n-1)+1 do if isA000961(a) then return a; end if; end do: end if; end proc: A112800 := proc(n) local a,i,j,p,q,r,n2; n2 := 2*n-1 ; a := 0 ; for i from 2 do p := A000961(i) ; if 3*p > n2 then return a; else for j from i do q := A000961(j) ; r := n2-p-q ; if r < q then break; end if; if isA000961(r) then a := a+1 ; end if; end do: end if ; end do: end proc: for n from 1 do printf("%d %d\n",n,A112800(n)); end do: # R. J. Mathar, Jun 09 2014
Comments