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!)
A064393 Numbers k such that the exponent of highest power of 2 dividing k! equals the largest prime <= k. 3

%I #20 Jul 10 2022 17:33:12

%S 4,8,9,22,26,27,32,33,50,51,56,57,70,76,77,82,94,95,100,112,118,119,

%T 128,129,134,135,176,177,186,187,196,266,267,274,275,280,296,297,342,

%U 343,352,358,364,365,372,386,387,392,393,400,406,407,426,427,454,455

%N Numbers k such that the exponent of highest power of 2 dividing k! equals the largest prime <= k.

%C [k/2]+[k/4]+[k/8]+[k/16]+... = prevprime(k+1).

%H Alois P. Heinz, <a href="/A064393/b064393.txt">Table of n, a(n) for n = 1..10000</a> (first 1001 terms from Harvey P. Dale)

%e 4! = 2^3*3, 8! = 2^7*3^2*5*7, 9! = 2^7*3^4*5*7, 22! = 2^19*3^9*5^4*7^3*11^2*13*17*19.

%p for n from 3 to 10^3 do if sum(floor(n/(2^i)), i=1..15) = prevprime(n+1) then printf(`%d,`,n) fi; od:

%p # second Maple program:

%p b:= proc(n) option remember;

%p `if`(n<1, 0, b(n-1)+padic[ordp](n, 2))

%p end:

%p a:= proc(n) option remember; local k; for k from 1+

%p `if`(n=1, 2, a(n-1)) while b(k)<>prevprime(k+1) do od; k

%p end:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Jul 10 2022

%t f[n_] := (t = 0; p = 2; While[s = Floor[n/p]; t = t + s; s > 0, p *= 2]; t); Do[ If[ f[n] == Prime[ PrimePi[n]], Print[n]], {n, 2, 500} ]

%t lp[n_]:=If[PrimeQ[n],n,NextPrime[n,-1]]; Select[Range[460], IntegerExponent[ #!,2] == lp[#]&] (* _Harvey P. Dale_, Mar 02 2014 *)

%Y Cf. A000040, A011371, A007917, A064394.

%K nonn

%O 1,1

%A _Vladeta Jovovic_, Sep 29 2001

%E More terms from _Robert G. Wilson v_ and _James A. Sellers_, Oct 01 2001

%E Offset changed to 1 by _Alois P. Heinz_, Jul 10 2022

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 19 09:23 EDT 2024. Contains 371782 sequences. (Running on oeis4.)