The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 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

%I

%S 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,

%T 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,

%U 8,8,10,9,9,8,10,8,9,9,8,9,10,9,9,9,10

%N Greatest m such that 2^m divides p^2 - q^2, where p = prime(n) and q is a prime < p.

%H Clark Kimberling, <a href="/A270649/b270649.txt">Table of n, a(n) for n = 2..10000</a>

%e 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.

%t a[n_] := Max[Table[IntegerExponent[Prime[n]^2 - Prime[m]^2, 2], {m, 1, n - 1}]];

%t u = Table[a[n], {n, 2, 230}]

%o (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

%Y Cf. A000040, A270651.

%K nonn,easy

%O 2,2

%A _Clark Kimberling_, Apr 26 2016

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.

Last modified September 24 19:27 EDT 2021. Contains 347651 sequences. (Running on oeis4.)