OFFSET
2,2
LINKS
Clark Kimberling, Table of n, a(n) for n = 2..10000
EXAMPLE
For n = 5, the numbers p^2 - q^2 are 121 - 9 = 16*7, 121 - 25 = 32*3, 121 - 49 = 8*7, so that a(5) = 5.
MATHEMATICA
a[n_] := Max[Table[IntegerExponent[Prime[n]^2 - Prime[m]^2, 2], {m, 1, n - 1}]];
u = Table[a[n], {n, 2, 230}]
PROG
(PARI) a(n, p=prime(n))=if(p<5, return(0)); my(p2=p^2); forstep(k=logint(p2-9, 2), 1, -1, my(m=2^k, t); forstep(q=p2-m, 9, -m, if(issquare(q, &t) && isprime(t), return(k)))) \\ Charles R Greathouse IV, Apr 29 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 26 2016
STATUS
approved