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

A068637 a(n) = Max(n, R(n)), where R(n) (A004086) = digit reversal of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 31, 41, 51, 61, 71, 81, 91, 20, 21, 22, 32, 42, 52, 62, 72, 82, 92, 30, 31, 32, 33, 43, 53, 63, 73, 83, 93, 40, 41, 42, 43, 44, 54, 64, 74, 84, 94, 50, 51, 52, 53, 54, 55, 65, 75, 85, 95, 60, 61, 62, 63, 64, 65, 66, 76, 86, 96, 70, 71
Offset: 1

Views

Author

Amarnath Murthy, Feb 27 2002

Keywords

Comments

a(n) = A004186(n) for n <= 100. - Reinhard Zumkeller, Apr 03 2015

Examples

			a(12) = max(12,21) = 21. a(34632) = max(34632,23643) = 34632.
		

Crossrefs

Programs

  • Haskell
    a068637 n = max n $ a004086 n  -- Reinhard Zumkeller, Apr 03 2015
    
  • Maple
    a:= n-> max(n,(s-> parse(cat(seq(s[-i], i=1..length(s)))))(""||n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 22 2015
  • Mathematica
    Table[Max[n,IntegerReverse[n]],{n,100}] (* The program uses the IntegerReverse function from Mathematica version 10 *) (* Harvey P. Dale, Jan 10 2016 *)
  • Python
    def A068637(n): return max(n,int(str(n)[::-1])) # Chai Wah Wu, Jun 26 2025

Extensions

Wrong a(13)=22 removed by Reinhard Zumkeller, Apr 03 2015

A325401 minflip(n) = min(n, r(n)) where r(n) is the binary reverse of n.

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 11, 3, 11, 7, 15, 1, 17, 9, 19, 5, 21, 13, 23, 3, 19, 11, 27, 7, 23, 15, 31, 1, 33, 17, 35, 9, 37, 25, 39, 5, 37, 21, 43, 13, 45, 29, 47, 3, 35, 19, 51, 11, 43, 27, 55, 7, 39, 23, 55, 15, 47, 31, 63
Offset: 0

Views

Author

Francois Alcover, Apr 23 2019

Keywords

Examples

			a(2) = min(2, r(2))
     = min(2, b'01')
     = min(2,1)
     = 1.
		

Crossrefs

Cf. A068636 (analog in base 10).

Programs

  • Maple
    a:= proc(n) local m, r; m:=n; r:=0;
          while m>0 do r:=r*2+irem(m, 2, 'm') od;
          min(n, r)
        end:
    seq(a(n), n=0..127);  # Alois P. Heinz, Apr 23 2019
  • PARI
    a(n) = min(n, fromdigits(Vecrev(binary(n)), 2)); \\ Michel Marcus, Apr 23 2019

Formula

a(n) = min(n,A030101(n)).
Showing 1-2 of 2 results.