login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A093808 Palindromic primes with property that sum of digits is prime and number of prime digits is prime. 0
313, 353, 373, 757, 797, 12721, 13331, 13931, 15551, 30103, 30703, 31513, 32323, 33533, 34543, 35353, 35753, 36563, 38183, 38783, 70507, 71317, 74747, 75557, 76367, 77377, 78787, 79997, 93739, 95959, 97579 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
There are just 31 such numbers below 10^5.
LINKS
EXAMPLE
a(1)=313, 313 is palindromic prime, sum of digits 7 is prime, number of prime digits {3,3} 2 is prime,
a(8)13931, 13931 is palindromic prime, sum of digits 17 is prime, number of prime digits {3,3} 2 is prime,
a(11)=30703, 30703 is palindromic prime, sum of digits 17 is prime, number of prime digits {3,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; ans1:=[ op(ans1), op(i, ans) ]: fi od; RETURN(stpf) end: # Return 0, if palindrome, otherwise return 1 ts_numpal:=proc(n) local ad; ad:=convert(n, base, 10): if (ListTools[Reverse](ad)=ad) then return 0; else return 1; fi end: # Return sum of digits ts_vsota_stevk:=proc(n) local i, stpf, ans; ans:=stev_sez(n): stpf:=0: for i from 1 to nops(ans) do stpf:=stpf+op(i, ans); od; RETURN(stpf) end: ts_pras_vsota_pra_stevk_palind_pras:=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' and isprime(i)='true' and ts_numpal(i)=0) then ans:=[ op(ans), i ]: fi od; RETURN(ans) end: ts_pras_vsota_pra_stevk_palind_pras(1000000);
CROSSREFS
Sequence in context: A082584 A088282 A068687 * A257527 A142745 A328056
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 04:31 EDT 2024. Contains 371767 sequences. (Running on oeis4.)