cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A175933 Number of ways of writing n=p+k with p a prime number and k a primorial number.

Original entry on oeis.org

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
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 24 2010

Keywords

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

Examples

			a(4)=2 because 4(natural) = 2(prime)+2(primorial) = 3(prime)+1(primorial).
		

Crossrefs

Programs

  • 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:
    seq(A175933(n),n=1..120) ; # R. J. Mathar, Oct 25 2010
  • 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 *)
  • 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

Extensions

a(85), a(89), etc. corrected by R. J. Mathar, Oct 25 2010