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.

This page as a plain text file.
%I A154275 #13 Jan 06 2019 04:25:59
%S A154275 5,7,11,13,19,31,37,43,47,61,67,73,89,103,107,113,137,151,157,167,173,
%T A154275 193,211,223,227,233,239,269,271,277,281,311,353,373,379,401,409,419,
%U A154275 421,431,433,439,443,449,467,487,503,509,571,599,601,631,641,647,653
%N A154275 Primes p=prime(k) such that abs(sum of digits of p - sum of digits of k) is prime.
%H A154275 Harvey P. Dale, <a href="/A154275/b154275.txt">Table of n, a(n) for n = 1..2000</a>
%e A154275 Prime(36)=151 and abs(1+5+1-(3+6)) = abs(7-9) = 2 (a prime), so 151 is in the sequence.
%e A154275 Prime(37)=157 and abs(1+5+7-(3+7)) = abs(13-10) = 3 (a prime), so 157 is in the sequence.
%p A154275 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
%t A154275 Transpose[Select[Table[{n,Prime[n]},{n,200}],PrimeQ[Abs[Total[ IntegerDigits[ #[[2]]]] -Total[IntegerDigits[#[[1]]]]]]&]][[2]] (* _Harvey P. Dale_, Jan 27 2013 *)
%Y A154275 Cf. A000040.
%K A154275 nonn,base,less
%O A154275 1,1
%A A154275 _Juri-Stepan Gerasimov_, Jan 06 2009
%E A154275 103, 113 etc. inserted by _R. J. Mathar_, Jan 07 2009
%E A154275 Name edited by _Jon E. Schoenfield_, Jan 06 2019