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!)
A093807 Palindromic numbers with property that sum of digits is prime and number of prime digits is prime. 0
212, 232, 272, 292, 313, 353, 373, 515, 535, 575, 595, 737, 757, 797, 12121, 12521, 12721, 13331, 13531, 13931, 15151, 15551, 15751, 17171, 17371, 17771, 20102, 20302, 20702, 20902, 21112, 21512, 21712, 22322, 22522, 23332, 23732, 24142 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(1)=212, 212 is palindromic number, sum of digits 5 is prime, number of prime digits {2,2} 2 is prime, a(10)=575, 575 is palindromic number, sum of digits 17 is prime, number of prime digits {5,5,7} 3 is prime, a(15)=12121, 12121 is palindromic number, sum of digits 7 is prime, number of prime digits {2,2} 2 is prime, ...
LINKS
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:=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 ts_numpal(i)=0) then ans:=[ op(ans), i ]: fi od; RETURN(ans) end: ts_pras_vsota_pra_stevk_palind(100000);
CROSSREFS
Sequence in context: A099687 A358873 A133651 * A088642 A251126 A078211
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 16 17:00 EDT 2024. Contains 371749 sequences. (Running on oeis4.)