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

A031943 Numbers with no consecutive equal base-5 digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 26, 27, 28, 29, 35, 36, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 51, 52, 53, 54, 55, 57, 58, 59, 65, 66, 67, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 88
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000975 (base-2 analog), A031941 or A043089 (base-3 analog), A031942 or A043090 (base-4 analog), A043092, ..., A043096 (base-6 through base-10 analog).

Programs

  • Mathematica
    Select[Range[90],FreeQ[Differences[IntegerDigits[#,5]],0]&] (* Harvey P. Dale, Nov 30 2019 *)

Formula

A031943 = { n | A043279(n)=1 } = A043091 \ {0}. - M. F. Hasler, Jul 23 2013

A031942 Numbers with no consecutive equal base 4 digits.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, 19, 24, 25, 27, 28, 29, 30, 33, 34, 35, 36, 38, 39, 44, 45, 46, 49, 50, 51, 52, 54, 55, 56, 57, 59, 68, 70, 71, 72, 73, 75, 76, 77, 78, 97, 98, 99, 100, 102, 103, 108, 109, 110, 113, 114, 115
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000975 (base-2 analog), A031941 or A043089 (base-3 analog), A031943 or A043091 (base-5 analog), A043092, ..., A043096 (base-6 through base-10 analog).

Formula

A031942 = { n | A043278(n)=1 } = A043090 \ {0}. - M. F. Hasler, Jul 23 2013

Extensions

Edited by Charles R Greathouse IV, Aug 02 2010

A043089 Every string of 2 consecutive base-3 digits contains exactly 2 distinct numbers.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 10, 11, 15, 16, 19, 20, 21, 23, 30, 32, 33, 34, 46, 47, 48, 50, 57, 59, 60, 61, 64, 65, 69, 70, 91, 92, 96, 97, 100, 101, 102, 104, 138, 140, 141, 142, 145, 146, 150, 151, 172, 173, 177, 178, 181, 182, 183, 185, 192
Offset: 0

Views

Author

Keywords

Comments

Essentially the same as A031941. - R. J. Mathar, Oct 20 2008

Crossrefs

Cf. A031941.

Programs

  • Mathematica
    Select[Range[0,200],FreeQ[Differences[IntegerDigits[#,3]],0]&] (* Harvey P. Dale, Feb 25 2022 *)
  • PARI
    a(n, base=3) = { for (b=0, oo, if (n <= (base-1)*2^b, my (v=ceil(n/2^b), p=(n-1)%(2^b)); while (b>0, v=base*v+vecsort([(v-1)%base, (v+1)%base])[1+bittest(p,b--)];); return (v), n -= (base-1)*2^b);); } \\ Rémy Sigrist, Sep 15 2022

A043277 Maximal run length in base 3 representation of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 2, 2, 3, 3, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 3, 4, 3, 2, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 3, 3, 2, 2, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 3, 3, 2, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Keywords

Comments

Sequences A031941, A037973, A037974, A037975 list numbers for which a(n)=1, a(n)=2, a(n)=3, a(n)=4. - M. F. Hasler, Jul 23 2013
A003462 gives the positions of records. - R. J. Mathar, Jul 26 2015

Crossrefs

Cf. A043276-A043290 for base-2 to base-16 analogs.

Programs

  • Maple
    mRunLen := proc(L)
        if nops(L) = 0 then
            0;
        else
            a := 1 ;
            for i from 2 to nops(L) do
                if op(i,L) = op(i-1,L) then
                    a := a+1 ;
                else
                    a := max(a, procname([op(i..nops(L),L)])) ;
                    break;
                end if;
            end do:
            a ;
        end if ;
    end proc:
    A043277 := proc(n)
        convert(n,base,3) ;
        mRunLen(%) ;
    end proc:
    seq(A043277(n),n=1..100) ; # R. J. Mathar, Jul 26 2015
  • Mathematica
    Table[Max[Length/@Split[IntegerDigits[n,3]]],{n,90}] (* Harvey P. Dale, Aug 24 2019 *)
  • PARI
    A043277(n, b=3)={my(m,c=1); while(n>0, n%b==(n\=b)%b && c++ && next; m=max(m, c); c=1); m} \\ - M. F. Hasler, Jul 23 2013

A043092 Numbers in which every string of 2 consecutive base 6 digits contains exactly 2 distinct numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 37, 38, 39, 40, 41, 48, 49, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 73, 74, 75, 76, 77, 78, 80
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000975 (base-2 analog), A031941 or A043089 (base-3 analog), A031942 or A043090 (base-4 analog), A031943 or A043091 (base-5 analog), A043093, ..., A043096 (base-7 through base-10 analog).

Programs

  • Mathematica
    Select[Range[0,80],FreeQ[Differences[IntegerDigits[#,6]],0]&] (* Harvey P. Dale, Sep 09 2016 *)

A043095 Numbers with property that no two consecutive base 9 digits are equal.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 82
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000975 (base-2 analog), A031941 or A043089 (base-3 analog), A031942 or A043090 (base-4 analog), A031943 or A043091 (base-5 analog), A043092, ..., A043096 (base-6 through base-10 analog).
Cf. A023804 (subsequence).

Programs

  • Maple
    isA043095 := proc(n)
        dgs := convert(n,base,9) ;
        for i from 2 to nops(dgs) do
            if op(i,dgs) = op(i-1,dgs) then
                return false;
            end if;
        end do:
        true ;
    end proc:
    A043095 := proc(n)
        option remember;
        if n =1 then
            0;
        else
            for a from procname(n-1)+1 do
                if isA043095(a) then
                    return a;
                end if;
            end do;
        end if;
    end proc:
    seq(A043095(n),n=1..120) ; # R. J. Mathar, Dec 28 2023
  • Mathematica
    Select[Range[0,100],!MemberQ[Flatten[Differences/@Partition[ IntegerDigits[ #,9],2,1]],0]&] (* Harvey P. Dale, Apr 05 2014 *)
  • PARI
    isok(n) = {my(d = digits(n, 9)); for (i=2, #d, if (d[i] == d[i-1], return (0));); return (1);} \\ Michel Marcus, Oct 11 2017

A043093 Every string of 2 consecutive base 7 digits contains exactly 2 distinct numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 63, 64, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A000975 (base-2 analog), A031941 or A043089 (base-3 analog), A031942 or A043090 (base-4 analog), A031943 or A043091 (base-5 analog), A043092, ..., A043096 (base-6 through base-10 analog).

A371276 Nonnegative numbers whose balanced ternary expansions have no consecutive equal digits (with offset 0).

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 8, 10, 17, 19, 20, 21, 24, 25, 29, 30, 51, 52, 56, 57, 60, 61, 62, 64, 71, 73, 74, 75, 87, 88, 89, 91, 152, 154, 155, 156, 168, 169, 170, 172, 179, 181, 182, 183, 186, 187, 191, 192, 213, 214, 218, 219, 222, 223, 224, 226, 260, 262, 263, 264
Offset: 0

Views

Author

Rémy Sigrist, Mar 17 2024

Keywords

Comments

Although this is a list, we use an offset equal to 0; thus:
- the binary expansion of n has the same number of digits as the balanced ternary expansion of a(n) (ignoring leading zeros),
- for n > 0 with binary expansion (b_1, ..., b_w) (where b_1 = 1), let's say that the balanced ternary expansion of a(n) is (t_1, ..., t_w) (where t_1 = 1):
- for i = 2..w:
- if b_i = 0, then t_i = min({-1, 0, +1} \ {t_{i-1}}),
- otherwise, t_i = max({-1, 0, +1} \ {t_{i-1}}).
For any w > 0, there are 2^(w-1) positive terms with w balanced ternary digits.

Examples

			The first terms, alongside their balanced ternary expansions, are:
  n   a(n)  bter(a(n))
  --  ----  ----------
   1     0           0
   2     1           1
   3     2          1T
   4     3          10
   5     6         1T0
   6     7         1T1
   7     8         10T
   8    10         101
   9    17        1T0T
  10    19        1T01
  11    20        1T1T
  12    21        1T10
  13    24        10T0
  14    25        10T1
  15    29        101T
  16    30        1010
		

Crossrefs

See A031941 for a similar sequence.
Cf. A134021.

Programs

  • PARI
    is(n) = { while (n, my (d = centerlift(Mod(n, 3))); n = (n-d)/3; if (d==centerlift(Mod(n, 3)), return (0););); return (1); }
    
  • PARI
    a(n) = { my (d = binary(n)); for (i = 2, #d, d[i] = setminus([-1,0,1], [d[i-1]])[1+d[i]];); fromdigits(d, 3); }

A043094 Every string of 2 consecutive base 8 digits contains exactly 2 distinct numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 65, 66, 67, 68, 69, 70
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A000975 (base-2 analog), A031941 or A043089 (base-3 analog), A031942 or A043090 (base-4 analog), A031943 or A043091 (base-5 analog), A043092, ..., A043096 (base-6 through base-10 analog).

Programs

  • Mathematica
    Select[Range[0,80],FreeQ[Differences[IntegerDigits[#,8]],0]&] (* Harvey P. Dale, Nov 08 2022 *)

A263307 Numbers without consecutive repeated digits in base 2 and in base 3.

Original entry on oeis.org

1, 2, 5, 10, 21, 1365, 2730
Offset: 1

Views

Author

Robin Powell, Oct 13 2015

Keywords

Comments

Intersection of A000975 and A031941. - Michel Marcus, Oct 14 2015
It seems likely that there are no further terms.

Examples

			10 is 1010 in base 2 and 101 in base 3; no two of the same digit are next to one another and so 10 is a term.
Similarly 21 is 10101 in base 2 and 210 in base 3 so it is also a term.
		

Crossrefs

Cf. A000975 (base 2), A031941 (base 3).

Programs

  • PARI
    isokd(d) = {dd = vector(#d-1, k, abs(d[k+1]-d[k])); if (#dd, vecmin(dd), 1);}
    isok(n) = isokd(binary(n)) && isokd(digits(n, 3)); \\ Michel Marcus, Oct 14 2015
Showing 1-10 of 10 results.