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!)
A337921 a(n) is the sum of (3^n mod 2^k) for k such that 2^k < 3^n. 1
1, 3, 18, 38, 195, 585, 607, 3948, 11976, 42415, 127921, 56067, 666938, 2082798, 10769251, 22610393, 110616780, 315726436, 408228944, 2384863439, 7159829169, 23350950650, 74348867826, 49863537606, 401947783347, 1296027221145, 6159163094580, 13796041908620, 60717334308629, 181812784262527 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) == A056576(n) (mod 2).
LINKS
EXAMPLE
a(3) = (3^3 mod 2^1) + (3^3 mod 2^2) + (3^3 mod 2^3) + (3^3 mod 2^4) = 18.
MAPLE
f:= proc(n) local k; add(3 &^ n mod 2^k, k = 1 .. ilog2(3^n)) end proc:
map(f, [$1..100]);
MATHEMATICA
A337921[n_] := Sum[Mod[3^n, 2^k], {k, 1, Floor[n*Log[2, 3]]}]; Table[A337921[n], {n, 1, 30}] (* Robert P. P. McKone, Jan 31 2021 *)
PROG
(PARI) a(n) = sum(k=1, logint(3^n, 2), lift(Mod(3, 2^k)^n)); \\ Michel Marcus, Jan 30 2021
CROSSREFS
Cf. A056576.
Sequence in context: A097989 A039700 A069147 * A365442 A094159 A138976
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jan 29 2021
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 April 24 04:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)