login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A093805 Numbers n with property that sum of digits is prime and number of prime digits is prime. 2
23, 25, 32, 52, 122, 133, 137, 155, 157, 173, 175, 203, 205, 212, 221, 223, 227, 229, 230, 232, 236, 238, 245, 247, 250, 254, 256, 263, 265, 272, 274, 278, 283, 287, 292, 302, 313, 317, 320, 322, 326, 328, 331, 335, 337, 353, 355, 359, 362, 371, 373, 377 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Harvey P. Dale, Table of n, a(n) for n = 1..1000

EXAMPLE

a(1)=23, sum of digits 5 is prime, number of prime digits {2,3} 2 is prime,

a(5)=122, sum of digits 5 is prime, number of prime digits {2,2} 2 is prime,

a(10)=173, sum of digits 11 is prime, number of prime digits {3,7} is prime, ...

MAPLE

# Return list of digits stev_sez:=proc(n) local i, tren, st, ans, anstren; ans:=[ ]: anstren:=[ ]: tren:=n: for i while (tren>0) do st:=round( 10*frac(tren/10) ): ans:=[ op(ans), st ]: tren:=trunc(tren/10): end do; for i from nops(ans) to 1 by -1 do anstren:=[ op(anstren), op(i, ans) ]; od; RETURN(anstren); end: # Return number of prime digits ts_stpf:=proc(n) local i, stpf, ans, ans1; ans:=stev_sez(n): ans1:=[ ]: stpf:=0: for i from 1 to nops(ans) do if (isprime(op(i, ans))='true') then stpf:=stpf+1; # stevilo prastevilskih stevk ans1:=[ op(ans1), op(i, ans) ]: # prastevilske stevke fi od; RETURN(stpf) end: # Return sum of digits ts_vsota_stevk:=proc(n) local i, stpf, ans, ans1; ans:=stev_sez(n): ans1:=[ ]: stpf:=0: for i from 1 to nops(ans) do stpf:=stpf+op(i, ans); od; RETURN(stpf) end: ts_pras_vsota_pra_stevk:=proc(n) local i, ans; ans:=[ ]: for i from 1 to n do if ( isprime(ts_vsota_stevk(i)) = 'true' and isprime(ts_stpf(i))='true') then ans:=[ op(ans), i ]: fi od; RETURN(ans) end: ts_pras_vsota_pra_stevk(2000);

MATHEMATICA

sdpQ[n_]:=Module[{idn=IntegerDigits[n]}, And@@PrimeQ[{Total[idn], Count[ idn, _?PrimeQ]}]]; Select[Range[400], sdpQ] (* Harvey P. Dale, Oct 20 2013 *)

CROSSREFS

Sequence in context: A054865 A054795 A305469 * A033629 A090311 A172015

Adjacent sequences:  A093802 A093803 A093804 * A093806 A093807 A093808

KEYWORD

nonn,base

AUTHOR

Jani Melik, May 19 2004

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 24 13:13 EST 2021. Contains 341569 sequences. (Running on oeis4.)