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!)
A216021 a(n) = modlg(n^n, 2^n), where modlg is the function defined in A215894: modlg(a,b) = floor(a / b^floor(logb(a))), logb is the logarithm base b. 1
1, 1, 3, 1, 3, 11, 50, 1, 2, 9, 33, 129, 550, 2526, 12445, 1, 2, 8, 26, 86, 302, 1103, 4216, 16834, 70064, 303520, 1366413, 6383595, 30907397, 154895272, 802588710, 1, 2, 7, 23, 69, 215, 685, 2242, 7523, 25881, 91237, 329377, 1217078, 4600595, 17781207, 70234475 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
a(2^k) = 1.
In base B representation of A, modlg(A,B) is the most significant digit:
A = C0 + C1*B + C2*B^2 + ... + Cn*B^n, Cn = modlg(A,B), C0 = A mod B.
LINKS
EXAMPLE
a(5) = modlg(5^5, 2^5) = floor(3125 / 32^floor(log32(3125))) = floor(3125/32^2) = 3.
a(7) = modlg(7^7, 2^7) = floor(823543 / 128^floor(log128(823543))) = floor(823543/128^2) = 50.
PROG
(Python)
import math
def modiv(a, b):
return a - b*int(a/b)
def modlg(a, b):
return a // b**int(math.log(a, b))
for n in range(1, 77):
print modlg(n**n, 2**n),
CROSSREFS
Cf. A215894.
Sequence in context: A204134 A233168 A001351 * A327149 A351372 A356411
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Aug 29 2012
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 March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)