OFFSET
1,6
COMMENTS
a(n) counts permuted subsequences of digits of p(n) which denote primes.
We put all the digits of prime(n) into a bag and ask how many distinct primes can be formed using some or all of these digits.
EXAMPLE
a(35)=6 because from the digits of p(35)=149, six numbers can be formed, 19, 41, 149, 419, 491 & 941, which are primes.
MATHEMATICA
Needs["DiscreteMath`Combinatorica`"]; f[n_] := Length[ Union[ Select[ FromDigits /@ Flatten[ Permutations /@ Subsets[ IntegerDigits[ Prime[n]]], 1], PrimeQ]]]; Table[f[n], {n, 102}] (* Ray Chandler and Robert G. Wilson v, Feb 25 2005 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved