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 69 results. Next

A265523 a(n) = largest base-9 palindrome m <= n such that every base-9 digit of m is <= the corresponding digit of n; m is written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 20, 20, 20, 20, 20, 20, 20, 0, 10, 20, 30, 30, 30, 30, 30, 30, 0, 10, 20, 30, 40, 40, 40, 40, 40, 0, 10, 20, 30, 40, 50, 50, 50, 50, 0, 10, 20, 30, 40, 50, 60, 60, 60, 0, 10, 20, 30, 40, 50, 60, 70, 70, 0, 10, 20, 30, 40, 50, 60, 70, 80, 0, 82, 82
Offset: 0

Views

Author

N. J. A. Sloane, Dec 09 2015

Keywords

Crossrefs

Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509.

Programs

  • Maple
    F:= proc(n) local L;
      L:= convert(n,base,9);
    if L[1] = 0 then return 0 fi;
      add(min(L[i],L[-i])*9^(i-1),i=1..nops(L))
    end proc:
    map(F, [$0..100]); # Robert Israel, Jan 13 2020

A265526 Largest base-2 palindrome m <= n, written in base 2.

Original entry on oeis.org

0, 1, 1, 11, 11, 101, 101, 111, 111, 1001, 1001, 1001, 1001, 1001, 1001, 1111, 1111, 10001, 10001, 10001, 10001, 10101, 10101, 10101, 10101, 10101, 10101, 11011, 11011, 11011, 11011, 11111, 11111, 100001, 100001, 100001, 100001, 100001, 100001, 100001, 100001, 100001, 100001, 100001, 100001, 101101, 101101, 101101
Offset: 0

Views

Author

N. J. A. Sloane, Dec 09 2015

Keywords

Crossrefs

Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509.

Programs

  • Maple
    ispal:= proc(n) global b; # test for base-b palindrome
      local L, Ln, i;
      L:= convert(n, base, b);
      Ln:= nops(L);
    for i from 1 to floor(Ln/2) do
    if L[i] <> L[Ln+1-i] then return(false); fi;
    od:
    return(true);
    end proc;
    # find max pal <= n, write in base 10
    less10:=proc(n) global b;
    local t1,t2,i,m,sw1,L2;
    t1:=convert(n,base,b);
    for m from n by -1 to 0 do
    if ispal(m) then return(m); fi;
                            od;
    end proc;
    # find max pal <= n, write in base b
    lessb:=proc(n) global b;
    local t1,t2,i,m,mb,sw1,L2;
    t1:=convert(n,base,b);
    for m from n by -1 to 0 do
    if ispal(m) then
       t2:=convert(m,base,b);
       L2:=nops(t2);
       mb:=add(t2[i]*10^(i-1), i=1..L2); return(mb); fi;
                            od;
    end proc;
    b:=2;
    [seq(less10(n),n=0..100)]; # A206913
    [seq(lessb(n),n=0..100)]; # A265526
    [seq(less10(2*n),n=0..100)]; # A265527
    [seq(lessb(2*n),n=0..100)]; # A265528
    b:=10;
    [seq(less10(n),n=0..100)]; # A261423

A265527 Largest base-2 palindrome m <= 2n, written in base 10.

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 9, 9, 15, 17, 17, 21, 21, 21, 27, 27, 31, 33, 33, 33, 33, 33, 33, 45, 45, 45, 51, 51, 51, 51, 51, 51, 63, 65, 65, 65, 65, 73, 73, 73, 73, 73, 73, 85, 85, 85, 85, 93, 93, 93, 99, 99, 99, 99, 107, 107, 107, 107, 107, 107, 119, 119, 119, 119, 127, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129
Offset: 0

Views

Author

N. J. A. Sloane, Dec 09 2015

Keywords

Crossrefs

Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509.

A265528 Largest base-2 palindrome m <= 2n, written in base 2.

Original entry on oeis.org

0, 1, 11, 101, 111, 1001, 1001, 1001, 1111, 10001, 10001, 10101, 10101, 10101, 11011, 11011, 11111, 100001, 100001, 100001, 100001, 100001, 100001, 101101, 101101, 101101, 110011, 110011, 110011, 110011, 110011, 110011, 111111, 1000001, 1000001, 1000001, 1000001, 1001001, 1001001, 1001001, 1001001, 1001001, 1001001
Offset: 0

Views

Author

N. J. A. Sloane, Dec 09 2015

Keywords

Crossrefs

Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509.

A265546 a(n) = smallest base-4 palindrome m >= n such that every base-4 digit of n is <= the corresponding base-4 digit of m; m is written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 5, 5, 10, 15, 10, 10, 10, 15, 15, 15, 15, 15, 17, 17, 34, 51, 21, 21, 38, 55, 25, 25, 42, 59, 29, 29, 46, 63, 34, 34, 34, 51, 38, 38, 38, 55, 42, 42, 42, 59, 46, 46, 46, 63, 51, 51, 51, 51, 55, 55, 55, 55, 59, 59, 59, 59, 63, 63, 63, 63, 65, 65, 130, 195, 85, 85, 150, 215, 105, 105, 170, 235, 125, 125, 190
Offset: 0

Views

Author

N. J. A. Sloane, Dec 10 2015

Keywords

Crossrefs

Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509.

Programs

  • PARI
    isok(m, dn) = {my(dm = digits(m, 4)); if ((Vecrev(dm) == dm) && (#dm == #dn), for (i=1, #dn, if (dn[i] > dm[i], return (0))); return(1););}
    a(n) = {my(dn = digits(n, 4), m = n); while (!isok(m, dn), m++); m;} \\ Michel Marcus, Apr 07 2021

A265559 Smallest base-2 palindrome m >= n, written in base 2.

Original entry on oeis.org

0, 1, 11, 11, 101, 101, 111, 111, 1001, 1001, 1111, 1111, 1111, 1111, 1111, 1111, 10001, 10001, 10101, 10101, 10101, 10101, 11011, 11011, 11011, 11011, 11011, 11011, 11111, 11111, 11111, 11111, 100001, 100001, 101101, 101101, 101101, 101101, 101101, 101101, 101101, 101101, 101101, 101101, 101101, 101101, 110011
Offset: 0

Views

Author

N. J. A. Sloane, Dec 10 2015

Keywords

Crossrefs

Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509.
See A206914 for the values of m written in base 10.

Programs

  • Maple
    ispal:= proc(n) global b; # test if n is base-b pallindrome
      local L, Ln, i;
      L:= convert(n, base, b);
      Ln:= nops(L);
    for i from 1 to floor(Ln/2) do
    if L[i] <> L[Ln+1-i] then return(false); fi;
    od:
    return(true);
    end proc;
    # find min pal >= n, write in base 10
    big10:=proc(n) global b;
    local t1,t2,i,m,sw1,L1;
    t1:=convert(n,base,b);
    L1:=nops(t1);
    for m from n to 10*n do
    if ispal(m) then return(m); fi;
                           od;
    lprint("no solution in big10 for n = ", n);
    end proc;
    # find min pal >= n, write in base 10
    bigb:=proc(n) global b;
    local t1,t2,i,m,mb,sw1,L1;
    t1:=convert(n,base,b);
    L1:=nops(t1);
    for m from n to 10*n do
    if ispal(m) then t2:=convert(m,base,b); mb:=add(t2[i]*10^(i-1), i=1..nops(t2)); return(mb); fi;
                           od;
    lprint("no solution in big10 for n = ", n);
    end proc;
    b:=2;
    [seq(big10(n),n=0..144)]; # A206914
    [seq(bigb(n),n=0..144)]; # A265559
  • Mathematica
    b2pal[n_]:=Module[{m=n},While[IntegerDigits[m,2]!=Reverse[IntegerDigits[m,2]],m++]; FromDigits[ IntegerDigits[m,2]]]; Array[b2pal,50,0] (* Harvey P. Dale, Feb 25 2024 *)

A265512 a(n) = largest base-3 palindrome m <= n such that every base-3 digit of m is <= the corresponding digit of n; m is written in base 3.

Original entry on oeis.org

0, 1, 2, 0, 11, 11, 0, 11, 22, 0, 101, 101, 0, 111, 111, 0, 121, 121, 0, 101, 202, 0, 111, 212, 0, 121, 222, 0, 1001, 1001, 0, 1001, 1001, 0, 1001, 1001, 0, 1001, 1001, 0, 1111, 1111, 0, 1111, 1111, 0, 1001, 1001, 0, 1111, 1111, 0, 1221, 1221, 0, 1001, 2002, 0, 1001, 2002, 0, 1001, 2002, 0, 1001, 2002, 0, 1111, 2112
Offset: 0

Views

Author

N. J. A. Sloane, Dec 09 2015

Keywords

Crossrefs

Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509.

A265513 a(n) = largest base-4 palindrome m <= n such that every base-4 digit of m is <= the corresponding digit of n; m is written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 0, 5, 5, 5, 0, 5, 10, 10, 0, 5, 10, 15, 0, 17, 17, 17, 0, 21, 21, 21, 0, 25, 25, 25, 0, 29, 29, 29, 0, 17, 34, 34, 0, 21, 38, 38, 0, 25, 42, 42, 0, 29, 46, 46, 0, 17, 34, 51, 0, 21, 38, 55, 0, 25, 42, 59, 0, 29, 46, 63, 0, 65, 65, 65, 0, 65, 65, 65, 0, 65, 65, 65, 0, 65, 65, 65, 0, 65, 65, 65, 0, 85, 85
Offset: 0

Views

Author

N. J. A. Sloane, Dec 09 2015

Keywords

Crossrefs

Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509.

A265514 a(n) = largest base-4 palindrome m <= n such that every base-4 digit of m is <= the corresponding digit of n; m is written in base 4.

Original entry on oeis.org

0, 1, 2, 3, 0, 11, 11, 11, 0, 11, 22, 22, 0, 11, 22, 33, 0, 101, 101, 101, 0, 111, 111, 111, 0, 121, 121, 121, 0, 131, 131, 131, 0, 101, 202, 202, 0, 111, 212, 212, 0, 121, 222, 222, 0, 131, 232, 232, 0, 101, 202, 303, 0, 111, 212, 313, 0, 121, 222, 323, 0, 131, 232, 333, 0, 1001, 1001, 1001, 0, 1001, 1001, 1001, 0
Offset: 0

Views

Author

N. J. A. Sloane, Dec 09 2015

Keywords

Crossrefs

Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509.

A265515 a(n) = largest base-5 palindrome m <= n such that every base-5 digit of m is <= the corresponding digit of n; m is written in base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 0, 6, 6, 6, 6, 0, 6, 12, 12, 12, 0, 6, 12, 18, 18, 0, 6, 12, 18, 24, 0, 26, 26, 26, 26, 0, 31, 31, 31, 31, 0, 36, 36, 36, 36, 0, 41, 41, 41, 41, 0, 46, 46, 46, 46, 0, 26, 52, 52, 52, 0, 31, 57, 57, 57, 0, 36, 62, 62, 62, 0, 41, 67, 67, 67, 0, 46, 72, 72, 72, 0, 26, 52, 78, 78, 0, 31, 57, 83, 83, 0, 36
Offset: 0

Views

Author

N. J. A. Sloane, Dec 09 2015

Keywords

Crossrefs

Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509.
Previous Showing 11-20 of 69 results. Next