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.

A304274 The concatenation of the first n elements is the largest positive even number with n digits when written in base 3/2.

Original entry on oeis.org

2, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2
Offset: 1

Views

Author

Tanya Khovanova and PRIMES STEP Senior group, May 09 2018

Keywords

Comments

This sequence is possible due to the fact that the largest even integers are prefixes of each other.
A304272(n) is the largest even integer with n digits.

Examples

			Number 8 in base 3/2 is 212, and it is the largest even integer with 3 digits in base 3/2. Its prefix 21 is 4: the largest even integer with 2 digits in base 3/2.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=1, 2,
          (t-> t+irem(t, 2))(b(n-1)*3/2))
        end:
    a:= n-> b(n+1)-3/2*b(n)+1:
    seq(a(n), n=1..120);  # Alois P. Heinz, Jun 21 2018
  • 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;
    Array[a, 120] (* Jean-François Alcover, Dec 13 2018, after Alois P. Heinz *)

Formula

a(n) = A304273(n+1) + 1.
From Alois P. Heinz, Jun 21 2018: (Start)
a(n) = A305498(n+1) -3/2*A305498(n) + 1.
Sum_{i=0..n-1} (3/2)^i*a(n-i) = A305497(n). (End)

Extensions

More terms from Alois P. Heinz, Jun 21 2018