OFFSET
1,1
COMMENTS
Frankel et al. call "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, n and n+d are prime. The only prime solution with odd d is n = 2, d = 5. All other SanD primes must have d = 14 (mod 18). This here is the list of SanD-14 primes.
Sequence A307479 lists the union of all SanD primes: this is the main entry for this family of sequences.
Sequence A307480 lists the smallest SanD prime for any possible d = 14 + 18k, k = -1/2, 0, 1, 2, 3, ...
Terms (not necessarily the next terms) include 10^16+10^15+3, 10^22+10^21+3, 2*10^24+3, 10^28+10^24+3, 10^35+10^2+3, 10^43+10^14+3, 10^45+10^16+3, 10^46+10^26+3, 10^57+10^32+3, 10^90+10^45+3, 10^139+10^53+3. - Robert Israel, Apr 10 2019
LINKS
Freeman J. Dyson, Norman E. Frankel, Anthony J. Guttmann: SanD primes and numbers, arxiv:1904.03573 [math.CA], April 7, 2019
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..2*10^6, 6)], 14); # Robert Israel, Apr 10 2019
MATHEMATICA
sd14Q[p_]:=PrimeQ[p+14]&&Total[IntegerDigits[p(p+14)]]==14; Select[Prime[Range[ 80000]], sd14Q] (* Harvey P. Dale, Jun 18 2023 *)
PROG
(PARI) print_A307471(N, d=14)=forprime(p=2, , isprime(p+d)&&sumdigits(p*(p+d))==d&&!print1(p, ", ")&&!N--&&break)
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
M. F. Hasler, Apr 09 2019
STATUS
approved