login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

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

Cf. A000040, A270651.

Sequence in context: A134186 A024688 A024477 * A049008 A280023 A170816

Adjacent sequences:  A270646 A270647 A270648 * A270650 A270651 A270652

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 29 17:41 EDT 2021. Contains 346346 sequences. (Running on oeis4.)