login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A060692 Number of parts if 3^n is partitioned into parts of size 2^n as far as possible and into parts of size 1^n. 12
2, 3, 6, 6, 26, 36, 28, 186, 265, 738, 1105, 3186, 5269, 15516, 29728, 55761, 35228, 235278, 441475, 272526, 1861166, 3478866, 6231073, 1899171, 5672262, 50533341, 17325482, 186108951, 21328109, 63792576, 1264831925, 3794064336, 7086578554 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Corresponds to the only solution of the Diophantine equation 3^n = x*2^n + y*1^n with constraint 0 <= y < 2^n. [Since 3^n is odd, of course y cannot be zero.)

LINKS

Iain Fox, Table of n, a(n) for n = 1..3322 (first 500 terms from Harry J. Smith)

FORMULA

a(n) = A002379(n) + A002380(n) = floor(3^n/2^n) + (3^n mod 2^n).

For n > 2, a(n) = 3^n mod (2^n-1). [Alex Ratushnyak, Jul 22 2012]

EXAMPLE

3^4 = 81 = 16 + 16 + 16 + 16 + 16 + 1, so a(4) = 5 + 1 = 6;

3^5 = 243 = 32 + 32 + 32 + 32 + 32 + 32 + 32 + 19*1, so a(5) = 7 + 19 = 26.

MATHEMATICA

Table[3^n - (-1 + 2^n) Floor[(3/2)^n], {n, 33}] (* Fred Daniel Kline, Nov 01 2017 *)

x[n_] := -(1/2) + (3/2)^n + ArcTan[Cot[(3/2)^n Pi]]/Pi;

y[n_] := 3^n - 2^n * x[n]; yplusx[n_] := y[n] + x[n];

Array[yplusx, 33] (* Fred Daniel Kline, Dec 21 2017 *)

f[n_] := Floor[3^n/2^n] + PowerMod[3, n, 2^n]; Array[f, 33] (* Robert G. Wilson v, Dec 27 2017 *)

PROG

(PARI) {for(n=1, 33, d=divrem(3^n, 2^n); print1(d[1]+d[2], ", "))}

(PARI) { for (n=1, 500, write("b060692.txt", n, " ", floor(3^n/2^n) + (3^n%2^n)); ) } \\ Harry J. Smith, Jul 09 2009

(Haskell)

a060692 n = uncurry (+) $ divMod (3 ^ n) (2 ^ n)

-- Reinhard Zumkeller, Jul 11 2014

CROSSREFS

Cf. A002379, A002380, A064464, A064630.

Cf. A000079, A000244.

Sequence in context: A089878 A057545 A015628 * A015698 A068587 A218954

Adjacent sequences:  A060689 A060690 A060691 * A060693 A060694 A060695

KEYWORD

nonn

AUTHOR

Labos Elemer, Apr 20 2001

EXTENSIONS

Edited by Klaus Brockhaus, May 24 2003

STATUS

approved

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 17 13:33 EST 2019. Contains 329230 sequences. (Running on oeis4.)