login
Primes p such that (smallest digit of p) + (number of occurrences of smallest digit of p) is prime.
1

%I #13 Nov 26 2019 13:31:24

%S 2,11,13,17,19,23,29,31,41,47,61,67,71,113,127,131,137,139,149,151,

%T 157,163,167,173,179,181,191,193,197,199,211,233,239,241,251,257,263,

%U 269,271,277,281,283,293,311,313,317,331,337,353,373,383,419,421,431,433

%N Primes p such that (smallest digit of p) + (number of occurrences of smallest digit of p) is prime.

%H Harvey P. Dale, <a href="/A154539/b154539.txt">Table of n, a(n) for n = 1..1000</a>

%e 2 is the smallest digit of 2, and it appears once; 2 and 2+1 are prime, so a(1) = 2.

%e 1 is the smallest digit of 11 and it appears twice; 11 and 1+2 are prime, so a(2) = 11.

%e 1 is the smallest digit of 13 and it appears once; 13 and 1+1 are prime, so a(3) = 13.

%p frequdig := proc(n,dig) local f,d ; f := 0 ; for d in convert(n,base,10) do if d = dig then f :=f+1; end if; end do; f ; end proc:

%p A054054 := proc(n) min(op(convert(n,base,10)) ) ; end proc:

%p for n from 1 to 500 do p := ithprime(n) ; sdg := A054054(p) ; a := sdg +frequdig(p,sdg) ; if isprime(a) then printf("%d,",p ) ; end if; end do: # _R. J. Mathar_, May 05 2010

%t psdQ[n_]:=Module[{m=Min[IntegerDigits[n]]},PrimeQ[m+DigitCount[n,10,m]]]; Select[Prime[Range[100]],psdQ] (* _Harvey P. Dale_, Nov 26 2019 *)

%K nonn,base,less

%O 1,1

%A _Juri-Stepan Gerasimov_, Jan 11 2009

%E Entries checked by _R. J. Mathar_, May 05 2010