login
SanD-32 primes: p and p+d are both prime and digit sum A007953(p*(p+d)) = d, with d=32.
4

%I #16 Oct 15 2019 11:46:34

%S 149,179,239,281,389,431,491,509,569,659,1019,1031,1061,1259,1289,

%T 1427,1439,1901,2081,2111,2129,2207,2237,2309,2357,2441,2657,2687,

%U 2801,3137,3221,3359,3527,3581,3659,3701,3761,4127,4241,4391,4517,4691,4871,4877,4937,5147,5381,5387,5417,5591,5657,5717,5807,6011

%N SanD-32 primes: p and p+d are both prime and digit sum A007953(p*(p+d)) = d, with d=32.

%C N. E. Frankel named "S(um)anD(ifference) number" any n such that the sum of digits of n(n+d) equals d, for some d, and SanD primes if in addition, p and p+d are prime.

%C The only SanD prime with odd d is p = 2, d = 5. All other SanD primes must have d = 14 + 18k, k = 0, 1, 2, 3,...

%C This is the sequence for k = 1. See A307471 - A307478 for d = 14+18k, k=0..7, A307479 for the union (any d), and A307480 for the smallest SanD-d prime for given d = 14 + 18k, k = -1/2, 0, 1, 2, 3, ...

%H Robert Israel, <a href="/A307472/b307472.txt">Table of n, a(n) for n = 1..1000</a>

%e a(1) = 149 = A307479(10) = A307480(1) is the smallest SanD-32 prime: 149 and 149 + 32 = 181 both are prime, and the digit sum A007953(149*181) = 2+6+9+6+9 = 32.

%p sand:= (n,d) -> isprime(n) and isprime(n+d) and convert(convert(n*(n+d),base,10),`+`)=d:

%p select(sand, [seq(i,i=5..10000,6)], 32); # _Robert Israel_, Apr 10 2019

%o (PARI) print_A307472(N,d=32)=forprime(p=2,,isprime(p+d)&&sumdigits(p*(p+d))==d&&!print1(p,",")&&!N--&&break)

%Y Cf. A307471 - A307478 (d = 14+18k, k=0..7), A307479 (any d), A307480 (smallest prime for given d).

%Y Cf. A000040 (primes), A007953 (sum of digits).

%K nonn,base

%O 1,1

%A _M. F. Hasler_, Apr 09 2019