cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A154275 Primes p=prime(k) such that abs(sum of digits of p - sum of digits of k) is prime.

Original entry on oeis.org

5, 7, 11, 13, 19, 31, 37, 43, 47, 61, 67, 73, 89, 103, 107, 113, 137, 151, 157, 167, 173, 193, 211, 223, 227, 233, 239, 269, 271, 277, 281, 311, 353, 373, 379, 401, 409, 419, 421, 431, 433, 439, 443, 449, 467, 487, 503, 509, 571, 599, 601, 631, 641, 647, 653
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 06 2009

Keywords

Examples

			Prime(36)=151 and abs(1+5+1-(3+6)) = abs(7-9) = 2 (a prime), so 151 is in the sequence.
Prime(37)=157 and abs(1+5+7-(3+7)) = abs(13-10) = 3 (a prime), so 157 is in the sequence.
		

Crossrefs

Cf. A000040.

Programs

  • Maple
    A007953 := proc(n) add(i,i=convert(n,base,10)) ; end: A007605 := proc(n) A007953(ithprime(n)) ; end: A090431 := proc(n) A007953(n)-A007605(n) ; end: for n from 1 to 200 do q := abs(A090431(n)) ; if isprime(q) then p := ithprime(n) ; printf("%a,",p) ; fi; od: # R. J. Mathar, Jan 07 2009
  • Mathematica
    Transpose[Select[Table[{n,Prime[n]},{n,200}],PrimeQ[Abs[Total[ IntegerDigits[ #[[2]]]] -Total[IntegerDigits[#[[1]]]]]]&]][[2]] (* Harvey P. Dale, Jan 27 2013 *)

Extensions

103, 113 etc. inserted by R. J. Mathar, Jan 07 2009
Name edited by Jon E. Schoenfield, Jan 06 2019