login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A270649 Greatest m such that 2^m divides p^2 - q^2, where p = prime(n) and q is a prime < p. 2
0, 4, 3, 5, 5, 4, 6, 5, 6, 5, 6, 7, 6, 7, 7, 7, 7, 8, 7, 6, 6, 7, 6, 8, 7, 7, 7, 8, 7, 6, 8, 7, 8, 9, 8, 8, 7, 9, 9, 7, 8, 7, 8, 9, 8, 8, 7, 9, 8, 9, 9, 8, 9, 8, 9, 9, 10, 8, 8, 10, 9, 8, 8, 10, 9, 10, 8, 8, 10, 9, 9, 8, 10, 8, 9, 9, 8, 9, 10, 9, 9, 9, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,2
LINKS
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
Sequence in context: A024688 A024477 A368595 * A049008 A280023 A170816
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 26 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 03:03 EDT 2024. Contains 371917 sequences. (Running on oeis4.)