OFFSET
1,3
COMMENTS
Cumulative product of the residuals of a repeated shift-right operation on the base-2 representation of prime(n).
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
EXAMPLE
For n=6, p=13, the intermediate factors are floor(13/2)=6, floor(6/2)=3, floor(3/2)=1, which yield a(6)=6*3*1=18.
For n=7, p=17, floor(17/2)=8, floor(8/2)=4, floor(4/2)=2, floor(2/2)=1, which yield a(7)=8*4*2*1=64.
MATHEMATICA
lst={}; Do[p=Prime[n]; s=1; While[p>1, p=IntegerPart[p/2]; s*=p; ]; AppendTo[lst, s], {n, 5!}]; lst
Table[Times@@Rest[NestWhileList[Floor[#/2]&, Prime[n], #>1&]], {n, 40}] (* Harvey P. Dale, Jul 05 2019 *)
PROG
(PARI) a(n) = my(p=prime(n), k=1); while(p!=1, k *= p\2; p = p\2); k; \\ Michel Marcus, Jul 26 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Jul 28 2009
EXTENSIONS
More divisions and primes mentioned in the definition by R. J. Mathar, Aug 02 2009
STATUS
approved