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.

Previous Showing 11-20 of 34 results. Next

A304023 a(n) is the smallest integer with n digits in base 3/2 expressed in base 3/2.

Original entry on oeis.org

0, 20, 210, 2100, 21010, 210110, 2101100, 21011000, 210110000, 2101100010, 21011000110, 210110001100, 2101100011010, 21011000110100, 210110001101000, 2101100011010010, 21011000110100110, 210110001101001100, 2101100011010011010, 21011000110100110100, 210110001101001101010
Offset: 1

Views

Author

Tanya Khovanova and PRIMES STEP Senior group, May 04 2018

Keywords

Comments

Excluding 0, every term starts with 2 and has exactly one 2.
The last digit is always zero.
Removing the last digit produces the sequence A303500 of the smallest even integers in base 3/2.
The value of this sequence in base 10 is A070885.
When subtracting 1 from the value of this sequence we get A304025.
The largest integer with a given number of digits in base 3/2 can be produced directly from this sequence by replacing 21 at the beginning and 0 at the end with 2, and by shifting the rest up by 1, see sequence A304024.

Examples

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

Crossrefs

Programs

  • Maple
    b:= proc(n) b(n):= `if`(n=1, 1, 3*ceil(b(n-1)/2)) end:
    g:= proc(n) g(n):= `if`(n<2, 0, irem(n, 3, 'q')+g(2*q)*10) end:
    a:= n-> g(b(n)):
    seq(a(n), n=1..30);  # Alois P. Heinz, Feb 13 2021
  • PARI
    f(n) = if( n<1, 0, f(n\3 * 2) * 10 + n%3);
    a(n) = {my(k=0); while(#Str(f(k)) != n, k++); f(k);} \\ Michel Marcus, Jun 19 2018
  • Python
    def f(n): return 0 if n < 1 else f(n//3*2)*10 + n%3
    def a(n):
      k = 0
      while len(str(f(k))) != n: k += 1
      return f(k)
    print([a(n) for n in range(1, 22)]) # Michael S. Branicky, Feb 12 2021 after Michel Marcus
    

Formula

a(n) = A024629(A070885(n)). - Michel Marcus, Jun 19 2018

Extensions

More terms from Michel Marcus, Jun 19 2018

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

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.

A245399 Number of nonnegative integers with property that their base 6/5 expansion (see A024638) has n digits.

Original entry on oeis.org

6, 6, 6, 6, 6, 6, 12, 12, 12, 18, 18, 24, 30, 36, 42, 48, 60, 72, 84, 102, 126, 150, 180, 216, 258, 312, 372, 444, 534, 642, 768, 924, 1110, 1332, 1596, 1914, 2298, 2760, 3312, 3972, 4770, 5724, 6864, 8238, 9888, 11862, 14238, 17082, 20502, 24600, 29520, 35424
Offset: 1

Views

Author

Hailey R. Olafson, Jul 21 2014

Keywords

Examples

			a(3) = 6 because 540, 541, 542, 543, 544 and 545 are the base 6/5 expansions for the integers 12, 13, 14, 15, 16 and 17 respectively and these are the only integers with 3 digits.
		

Crossrefs

Programs

  • Mathematica
    A120170[n_]:= A120170[n] = If[n==1, 1, Ceiling[Sum[A120170[j], {j, n-1}]/5]]; Table[6*A120170[n], {n, 60}] (* G. C. Greubel, Aug 19 2019 *)
  • Sage
    A=[1]
    for i in [1..60]:
        A.append(ceil(((6-5)/5)*sum(A)))
    [6*x for x in A]

Formula

a(n) = 6*A120170(n).

A245357 Number of numbers whose base 5/4 expansion (see A024634) has n digits.

Original entry on oeis.org

5, 5, 5, 5, 5, 10, 10, 15, 15, 20, 25, 30, 40, 50, 60, 75, 95, 120, 150, 185, 235, 290, 365, 455, 570, 710, 890, 1110, 1390, 1735, 2170, 2715, 3390, 4240, 5300, 6625, 8280, 10350, 12940, 16175, 20215, 25270, 31590, 39485, 49355, 61695, 77120, 96400, 120500
Offset: 1

Views

Author

James Van Alstine, Jul 18 2014

Keywords

Examples

			The numbers 10..14 are represented by 430, 431, 432, 433, 434 respectively in base 5/4. These are the only numbers with three digits, and so a(3)=5.
		

Crossrefs

Programs

  • Sage
    A=[1]
    for i in [1..60]:
        A.append(ceil((5-4)/4*sum(A)))
    [5*x for x in A]

Formula

a(n) = 5*A120160(n).

A104740 a(1) = 1; for n > 1: if n is even, a(n) = least k > 0 such that sum(i=1,n/2,a(2*i-1))/sum(j=1,n,a(j))>=1/4, or 1 if there is no such k; if n is odd, a(n) = largest k > 0 such that sum(i=1,(n+1)/2,a(2*i-1))/sum(j=1,n,a(j))<=1/3, or 1 if there is no such k.

Original entry on oeis.org

1, 3, 1, 3, 1, 3, 1, 3, 2, 6, 3, 9, 4, 12, 6, 18, 9, 27, 14, 42, 21, 63, 31, 93, 47, 141, 70, 210, 105, 315, 158, 474, 237, 711, 355, 1065, 533, 1599, 799, 2397, 1199, 3597, 1798, 5394, 2697, 8091, 4046, 12138, 6069, 18207, 9103, 27309, 13655, 40965, 20482, 61446
Offset: 1

Views

Author

Klaus Brockhaus, Mar 21 2005

Keywords

Comments

If this sequence is interpreted as describing a 0-1-sequence: a(1) 1's followed by a(2) 0's followed by a(3) 1's ... (alternatingly), then the portion of 1's in that 0-1-sequence oscillates between 1/4 and 1/3, except for a slight disturbance at the beginning. Quite analogously, sequences can be constructed that describe 0-1-sequences where the portion of 1's oscillates between arbitrary bounds 0 < r < s < 1. However, depending on the choice of the bounds, the initial disturbance may extend rather far.
Interleaving of A073941 and A081848 from a(3) onward.

Examples

			Consider n = 10; for k = 5 we have (1+1+1+1+2)/(1+3+1+3+1+3+1+3+2+k) = 6/23 < 1/4, but for k = 6 we have
(1+1+1+1+2)/(1+3+1+3+1+3+1+3+2+k) = 6/24 >= 1/4, hence a(10) = 6. Consider n = 11; for k = 3 we have
(1+1+1+1+2+k)/(1+3+1+3+1+3+1+3+2+6+k) = 9/27 <= 1/3, but for k = 4 we have (1+1+1+1+2+k)/(1+3+1+3+1+3+1+3+2+6+k) = 10/28
> 1/3, hence a(11) = 3.
		

Crossrefs

Programs

  • PARI
    {print1(a=1,",");p=1;s=1;for(n=1,28,k=1;while(((p)/(s+k))>=(1/4),k++);print1(a=max(1,k-1),",");s=s+a;k=1;while(((p+k)/(s+k))<=(1/3),k++);print1(a=max(1,k-1),",");s=s+a;p=p+a)}

A245400 Number of nonnegative integers with property that their base 9/8 expansion (see A024656) has n digits.

Original entry on oeis.org

9, 9, 9, 9, 9, 9, 9, 9, 9, 18, 18, 18, 18, 27, 27, 27, 36, 36, 45, 45, 54, 63, 72, 81, 90, 99, 108, 126, 144, 162, 180, 198, 225, 252, 288, 324, 360, 405, 459, 513, 576, 648, 729, 819, 927, 1044, 1170, 1314, 1485, 1665, 1872, 2106, 2376, 2673, 3006, 3384, 3807
Offset: 1

Views

Author

Tom Edgar, Jul 21 2014

Keywords

Examples

			a(2) = 9 since 80, 81, 82, 83, 84, 85, 86, 87, 88 are the base 9/8 representations of 9-17 respectively and these are the only integers with 2 digits.
		

Crossrefs

Programs

  • Sage
    A=[1]
    for i in [1..100]:
        A.append(ceil(((9-8)/8)*sum(A)))
    [9*x for x in A]

Formula

a(n) = 9*A120194(n).

A245401 Number of nonnegative integers with property that their base 8/7 expansion (see A024649) has n digits.

Original entry on oeis.org

8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 24, 24, 32, 32, 40, 40, 48, 56, 64, 72, 80, 96, 112, 128, 144, 160, 184, 216, 240, 280, 320, 360, 416, 472, 544, 616, 704, 808, 920, 1056, 1208, 1376, 1576, 1800, 2056, 2352, 2688, 3072, 3512, 4008, 4584
Offset: 1

Views

Author

James Van Alstine, Jul 21 2014

Keywords

Comments

The numbers 8-15 are represented by 70, 71, 72, 73, 74, 75, 76, 77 respectively in base 8/7. These are the only integers with two digits, and so a(2)=8.

Crossrefs

Programs

  • Sage
    A=[1]
    for i in [1..60]:
        A.append(ceil((8-7)/7*sum(A)))
    [8*x for x in A]

Formula

a(n) = 8*A120186(n).

A245403 Number of nonnegative integers with property that their base 10/9 expansion (see A024664) has n digits.

Original entry on oeis.org

10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 30, 30, 30, 40, 40, 50, 50, 60, 60, 70, 80, 90, 100, 110, 120, 130, 150, 160, 180, 200, 220, 250, 280, 310, 340, 380, 420, 470, 520, 580, 640, 710, 790, 880, 980, 1090, 1210, 1340, 1490, 1660
Offset: 1

Views

Author

James Van Alstine, Jul 21 2014

Keywords

Examples

			The numbers 10-19 are represented by 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 respectively in base 10/9. These are the only integers with two digits, and so a(2)=10.
		

Crossrefs

Programs

  • Sage
    A=[1]
    for i in [1..60]:
        A.append(ceil((10-9)/9*sum(A)))
    [10*x for x in A]

Formula

a(n) = 10*A120202(n).
Previous Showing 11-20 of 34 results. Next