OFFSET
1,1
COMMENTS
Note that (m-1)^2+S^2=(m+1)^2+D^2.
If k is the number of distinct prime factors of m, then the maximum number of (S, D) values both primes is 2^(k-1)-1. 18, 60 and 1932 are the only terms of the sequence with all (S, D) values both primes. If we consider 1 to be prime (and pi(1)=0), then the first 3 terms are 6, 30, 462
EXAMPLE
m=18,(m-1,m+1)=(17,19),{(S,D)}={(11,7)}
m=60,(m-1,m+1)=(59,61),{(S,D)}={(23,17),(19,11),(17,7)}
m=1932 7 (S,D) prime values
m=43890 15 (S,D) prime values....
CROSSREFS
KEYWORD
hard,more,nonn
AUTHOR
Robin Garcia, Jan 21 2004
STATUS
approved