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!)
A155913 Primes p such that (sum of digits of p) - (last digit of p) is prime. 1
23, 29, 31, 37, 53, 59, 71, 73, 79, 113, 127, 149, 163, 167, 211, 233, 239, 251, 257, 293, 307, 347, 349, 383, 389, 419, 431, 433, 439, 479, 491, 499, 503, 509, 521, 523, 563, 569, 587, 613, 617, 619, 653, 659, 673, 677, 701, 709, 743, 761, 769, 839, 853, 857 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
Presumably a(n) ~ n log n log log n. - Charles R Greathouse IV, Jan 02 2013
EXAMPLE
113 is in the sequence because it is prime and its sum of digits (1+1+3 = 5) - final digit(3) is prime (5-3 = 2).
MAPLE
A007953 := proc(n) add(d, d=convert(n, base, 10)) ; end: A010879 := proc(n) n mod 10 ; end: for i from 1 to 300 do p := ithprime(i) ; if isprime(A007953(p)-A010879(p)) then printf("%d, ", p) ; fi; od: # R. J. Mathar, Jan 31 2009
MATHEMATICA
Select[Prime[Range[200]], PrimeQ[Total[IntegerDigits[#]] - Last[IntegerDigits[#]]] &] (* Vladimir Joseph Stephan Orlovsky, Feb 15 2012 *)
PROG
(PARI) is(n)=isprime(sumdigits(n) - n%10) && isprime(n) \\ Charles R Greathouse IV, Jan 02 2013
CROSSREFS
Cf. A000040.
Sequence in context: A049483 A112681 A078500 * A227919 A240898 A244077
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Corrected by R. J. Mathar, Jan 31 2009
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 August 1 19:22 EDT 2024. Contains 374817 sequences. (Running on oeis4.)