A112418 Primes which have a prime number of partitions into five distinct primes.
53, 59, 67, 83, 113, 151, 157, 211, 239, 601, 809, 821, 881, 971, 1237, 1297, 1427, 1669, 1759, 1973, 2069, 2129, 2243, 2333, 2659, 2677, 2719, 2789, 2803, 2999, 3329, 3613, 3623, 3769, 3797, 4001, 4451
Offset: 1
Keywords
Examples
53 is there because there are 2 partitions of 53 (3+7+11+13+19, 5+7+11+13+17) and 2 is prime.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..102
Programs
-
Maple
part5_prime:=proc(N) s:=1; for n from 2 to N do cont:=0; for i from 1 to n-5 do for j from i+1 to n-4 do for k from j+1 to n-3 do for l from k+1 to n-2 do for m from l+1 to n-1 do if(ithprime(n)= ithprime(i)+ithprime(j)+ithprime(k)+ithprime(l)+ithprime(m) then cont:=cont+1; fi; od; od; od; od; od; if (isprime(cont)=true) then a[s]:=ithprime(n); s:=s+1; fi; od; end:
-
PARI
has(n)=my(t,Q,R,S);forprime(p=n\5+1,n-26, Q=n-p; forprime(q=Q\4+1,min(p-1,Q-15), R=Q-q; forprime(r=R\3+1,min(q-1,R-8), S=R-r; forprime(s=S-r+1,(S-1)\2, isprime(S-s) && t++)))); isprime(t) select(has, primes(100)) \\ Charles R Greathouse IV, Apr 22 2015
-
PARI
list(lim)=my(v=vectorsmall(precprime(lim)),u=List(),Q,R,S); forprime(p=13,#v-26, Q=#v-p; forprime(q=11,min(p-1,Q-15), R=Q-q; forprime(r=7,min(q-1,R-8), S=R-r; forprime(s=5,min(S-2,r-1), forprime(t=3,min(S-s,s-1), v[p+q+r+s+t]++))))); forprime(p=2,lim, if(isprime(v[p]), listput(u,p))); Set(u) \\ Charles R Greathouse IV, Apr 22 2015
Extensions
Edited by Don Reble, Jan 26 2006
a(31)-a(37) from Charles R Greathouse IV, Apr 22 2015
Comments