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-3 of 3 results.

A304024 a(n) is the largest integer with n digits in base 3/2.

Original entry on oeis.org

2, 22, 212, 2122, 21222, 212212, 2122112, 21221112, 212211122, 2122111222, 21221112212, 212211122122, 2122111221212, 21221112212112, 212211122121122, 2122111221211222, 21221112212112212, 212211122121122122
Offset: 0

Views

Author

Tanya Khovanova and PRIMES STEP Senior group, May 04 2018

Keywords

Comments

Every number starts and ends with 2 and contains only twos and ones.
Removing the last digit produces sequence A304272 of the largest even integers in base 3/2.
The value of this sequence in base 10 is A304025.
When adding 1 to the value of this sequence we get A070885.
The largest integer with a given number of digits in base 3/2 can be produced directly from the smallest number, sequence A304023, by replacing 21 at the beginning and 0 at the end with 2, and by shifting the rest up by 1, see sequence A304023.

Examples

			The number 5 in base 3/2 is 22, and the number 6 is 210. Therefore, 22 is the largest two-digit integer.
		

Crossrefs

Programs

  • PARI
    first(n) = {my(res=vector(n), c = 2); res[1]=2; for(i=2, n, res[i] = 10 * res[i-1] + 2; if(c % 2 == 1, res[i] -= 10); c = 3 * c / 2 + if(c%2==0, 2, 1/2)); res} \\ David A. Corneth, May 11 2018

Formula

a(1) = 2, for n > 1, a(n) = 10 * a(n - 1) + 2 if A304025(n - 1) is even. Otherwise, a(n) = 10 * a(n - 1) - 8. - David A. Corneth, May 11 2018

A305497 The largest positive even integer that can be represented with n digits in base 3/2.

Original entry on oeis.org

2, 4, 8, 14, 22, 34, 52, 80, 122, 184, 278, 418, 628, 944, 1418, 2128, 3194, 4792, 7190, 10786, 16180, 24272, 36410, 54616, 81926, 122890, 184336, 276506, 414760, 622142, 933214, 1399822, 2099734, 3149602, 4724404, 7086608, 10629914, 15944872, 23917310
Offset: 1

Views

Author

Tanya Khovanova and PRIMES STEP Senior group, Jun 02 2018

Keywords

Crossrefs

Programs

  • Mathematica
    b[n_] := b[n] = If[n == 1, 2, Function[t, t + Mod[t, 2]][3/2 b[n - 1]]]; a[n_] := b[n + 1] - 3/2 b[n] + 1; A305497[n_] := Sum[(3/2)^i*a[n - i], {i, 0, n - 1}]; Table[A305497[n], {n, 1, 39}] (* Robert P. P. McKone, Feb 12 2021 *)
  • Python
    from itertools import islice
    def A305497_gen(): # generator of terms
        a = 2
        while True:
            a += a>>1
            yield (a<<1)-4
    A305497_list = list(islice(A305497_gen(),70)) # Chai Wah Wu, Sep 20 2022

Formula

a(n+1) = 2*floor(3*a(n)/4) + 2.
a(n) = 2*A061419(n+1) - 2.
a(n) = A305498(n+1) - 2.
a(n) = Sum_{i=0..n-1} (3/2)^i*A304274(n-i). - Alois P. Heinz, Jun 21 2018

A305498 The smallest positive even integer that can be represented with n digits in base 3/2.

Original entry on oeis.org

2, 4, 6, 10, 16, 24, 36, 54, 82, 124, 186, 280, 420, 630, 946, 1420, 2130, 3196, 4794, 7192, 10788, 16182, 24274, 36412, 54618, 81928, 122892, 184338, 276508, 414762, 622144, 933216, 1399824, 2099736, 3149604, 4724406, 7086610, 10629916, 15944874, 23917312
Offset: 1

Views

Author

Tanya Khovanova and PRIMES STEP Senior group, Jun 02 2018

Keywords

Crossrefs

Programs

  • Python
    from itertools import islice
    def A305498_gen(): # generator of terms
        a = 2
        while True:
            yield (a<<1)-2
            a += a>>1
    A305498_list = list(islice(A305498_gen(),70)) # Chai Wah Wu, Sep 20 2022

Formula

a(n+1) = 2*ceiling(3*a(n)/4).
a(n) = 2*A061419(n).
a(n) = A305497(n-1) + 2.
Showing 1-3 of 3 results.