cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A064631 a(n) = ceiling(log_2(A064630(n))).

Original entry on oeis.org

2, 3, 3, 5, 5, 4, 7, 7, 8, 10, 11, 12, 13, 14, 15, 16, 16, 16, 18, 18, 20, 22, 21, 23, 25, 25, 24, 28, 27, 29, 31, 32, 33, 34, 35, 36, 37, 37, 39, 40, 39, 42, 42, 44, 44, 46, 46, 46, 49, 50, 51, 51, 51, 54, 55, 55, 57, 57, 59, 60, 60, 61, 63, 64, 64, 66, 60, 62, 67, 70, 69, 72
Offset: 1

Views

Author

Labos Elemer, Oct 01 2001

Keywords

Comments

In A064630, using a greedy algorithm we write 4^n = x*3^n+y*2^n+z*1^n and A064630(n) = x+y+z. This sequence is a measure of the "length" or complexity of those solutions.

Crossrefs

Formula

a(n) = A029837(A064630(n)) = ceiling(log_2(A064630(n))).

Extensions

Initial terms corrected and entry revised by Sean A. Irvine, Jul 18 2023

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.

Original entry on oeis.org

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
Offset: 1

Views

Author

Labos Elemer, Apr 20 2001

Keywords

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.)

Examples

			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.
		

Crossrefs

Programs

  • Haskell
    a060692 n = uncurry (+) $ divMod (3 ^ n) (2 ^ n)
    -- Reinhard Zumkeller, Jul 11 2014
  • 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 *)
  • PARI
    a(n) = { my(d=divrem(3^n,2^n)); d[1]+d[2] }
    
  • PARI
    a(n) = { (3^n\2^n) + (3^n%2^n) } \\ Harry J. Smith, Jul 09 2009
    

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

Extensions

Edited by Klaus Brockhaus, May 24 2003

A064536 a(n) = (4^n mod 3^n) mod 2^n.

Original entry on oeis.org

1, 3, 2, 13, 20, 3, 51, 87, 121, 711, 1139, 3537, 8034, 15752, 27922, 49629, 33201, 35975, 143900, 136341, 545364, 2181456, 1060135, 4240540, 16962160, 28647197, 13597858, 205877827, 100616667, 381266393, 1397863922, 3825576990, 8216376565, 14181633879, 22366797148
Offset: 1

Views

Author

Labos Elemer, Oct 08 2001

Keywords

Comments

A generalization of A002380. It arises also as a coefficient (=c1) of 1^n=1 in a special (greedy) decomposition of 4^n into like powers as follows: 4^n = c3*3^n + c2*2^n + c1*1^n.

Crossrefs

Programs

  • Mathematica
    Table[Mod[PowerMod[4,n,3^n],2^n],{n,40}] (* Harvey P. Dale, Apr 09 2013 *)
  • PARI
    a(n) = { (4^n % 3^n) % 2^n } \\ Harry J. Smith, Sep 17 2009

Formula

n = 7: 4^7 = 16384 = 7*2187 + 8*128 + 51*1 where a(7)=51, the last coefficient; A064630(7) = 7 + 8 + a(7) = 66.

A064464 Binary order (cf. A029837) of the 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 (cf. A060692).

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 18, 19, 19, 21, 22, 23, 21, 23, 26, 25, 28, 25, 26, 31, 32, 33, 34, 35, 35, 37, 38, 39, 39, 40, 42, 43, 44, 44, 46, 47, 47, 47, 48, 50, 51, 51, 54, 54, 56, 56, 58, 59, 60, 60, 59, 63, 63, 63, 66, 65, 67, 69, 69, 70, 69
Offset: 1

Views

Author

Labos Elemer, Oct 03 2001; revised Mar 10 2002

Keywords

Comments

These binary orders are nearly equal to n.
For several values of n, a(n) = n holds, e.g., for n = 1, 2, 3, 5, 6, 8, 9, 10, 11,12.

Examples

			For n=12, 3^12 = 531441 = 129*2^12 + 3057*1^12; the binary order of 129 + 3057 = 3186 is ceiling(log_2(3186)) = 12, the exponent.
		

Crossrefs

Programs

  • PARI
    {for(n=1,72,d=divrem(3^n,2^n); print1(ceil(log(d[1]+d[2])/log(2)),","))}

Formula

a(n) = A029837(A060692(n)) = ceiling(log_2(A060692(n))).

Extensions

Edited by Klaus Brockhaus, May 24 2003
Showing 1-4 of 4 results.