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

%I #17 Jan 19 2019 22:18:15

%S 23,29,31,37,53,59,71,73,79,113,127,149,163,167,211,233,239,251,257,

%T 293,307,347,349,383,389,419,431,433,439,479,491,499,503,509,521,523,

%U 563,569,587,613,617,619,653,659,673,677,701,709,743,761,769,839,853,857

%N Primes p such that (sum of digits of p) - (last digit of p) is prime.

%H Charles R Greathouse IV, <a href="/A155913/b155913.txt">Table of n, a(n) for n = 1..10000</a>

%F Presumably a(n) ~ n log n log log n. - _Charles R Greathouse IV_, Jan 02 2013

%e 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).

%p 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

%t Select[Prime[Range[200]], PrimeQ[Total[IntegerDigits[#]] - Last[IntegerDigits[#]]] &] (* _Vladimir Joseph Stephan Orlovsky_, Feb 15 2012 *)

%o (PARI) is(n)=isprime(sumdigits(n) - n%10) && isprime(n) \\ _Charles R Greathouse IV_, Jan 02 2013

%Y Cf. A000040.

%K nonn,base

%O 1,1

%A _Juri-Stepan Gerasimov_, Jan 30 2009

%E Corrected by _R. J. Mathar_, Jan 31 2009

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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)