OFFSET
1,1
COMMENTS
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.
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,...
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
EXAMPLE
MAPLE
sand:= (n, d) -> isprime(n) and isprime(n+d) and convert(convert(n*(n+d), base, 10), `+`)=d:
select(sand, [seq(i, i=5..10000, 6)], 32); # Robert Israel, Apr 10 2019
PROG
(PARI) print_A307472(N, d=32)=forprime(p=2, , isprime(p+d)&&sumdigits(p*(p+d))==d&&!print1(p, ", ")&&!N--&&break)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Apr 09 2019
STATUS
approved