|
|
A175933
|
|
Number of ways of writing n=p+k with p a prime number and k a primorial number.
|
|
6
|
|
|
0, 0, 1, 2, 1, 1, 1, 2, 2, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 0, 0, 0, 1, 1, 1, 2, 2, 0, 2, 0, 2, 1, 1, 0, 1, 1, 3, 1, 1, 0, 2, 1, 3, 0, 0, 0, 2, 1, 1, 0, 0, 0, 2, 1, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 1, 3, 1, 1, 0, 2, 0, 1, 1, 1, 0, 1, 1, 2, 0, 0, 0, 2, 1, 2, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 3, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
Number of partitions of n into the sum of a prime number and a primorial number. Number of decompositions of n into an unordered sum of a prime number and a primorial number.
For n through small powers of 10, the range of partition values seen is about log_10(n)+2. - Bill McEachen, Jan 07 2016
|
|
LINKS
|
|
|
EXAMPLE
|
a(4)=2 because 4(natural) = 2(prime)+2(primorial) = 3(prime)+1(primorial).
|
|
MAPLE
|
A002110 := proc(n) option remember; if n = 0 then 1; else mul( ithprime(k), k=1..n) ; end if; end proc:
A175933 := proc(n) a := 0 ; for k from 0 do p := A002110(k) ; if p +2 > n then return a; elif isprime(n-p) then a := a+1 ; end if; end do: end proc:
|
|
MATHEMATICA
|
t = Table[Product[Prime@ k, {k, n}], {n, 0, 5}]; Table[Count[Map[First, Function[k, Transpose@ {k - #, #} &@ Prime@ Range@ PrimePi@ k]@ n], x_ /; MemberQ[t, x]], {n, 120}] (* Michael De Vlieger, Jan 09 2016 *)
|
|
PROG
|
(PARI) lyst(maxx)={n=1; while (n<=maxx, c=0; q=1; for(i5=0, n, if(i5>0, q=q*prime(i5)); if(q>n-2, break); z=truncate(q); if(isprime(n-z), c++)); print1(c, ", "); n+=1); } \\ Bill McEachen, Jan 07 2016
(PARI) A175933(n, p=1, k=1, c=0)={until(2>n-k*=p=nextprime(p+1), isprime(n-k)&&c++); c} \\ M. F. Hasler, Jan 21 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|