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.

A068505 Decimal representation of n interpreted in base b+1, where b=A054055(n) is the largest digit in decimal representation of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 5, 7, 9, 11, 13, 15, 17, 19, 6, 7, 8, 11, 14, 17, 20, 23, 26, 29, 12, 13, 14, 15, 19, 23, 27, 31, 35, 39, 20, 21, 22, 23, 24, 29, 34, 39, 44, 49, 30, 31, 32, 33, 34, 35, 41, 47, 53, 59, 42, 43, 44, 45, 46, 47, 48, 55, 62, 69, 56, 57, 58, 59, 60, 61
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 11 2002, Feb 23 2008

Keywords

Comments

a(n) = n iff n < 10 OR n is a "9ish number": a(A011539(n)) = A011539(n). - Reinhard Zumkeller, Dec 29 2011

Examples

			a(20)=2*3^1+0*1=6, a(21)=2*3^1+1*1=7, a(22)=2*3^1+2*1=8,
a(23)=2*4^1+3*1=11, a(24)=2*5^1+4*1=14, a(25)=2*6^1+5*1=17,
a(26)=2*7^1+6*1=20, a(27)=2*8^1+7*1=23, a(28)=2*9^1+8*1=26,
a(29)=2*10^1+9*1=29, a(30)=3*4^1+0*1=12, a(31)=3*4^1+1*1=13.
		

Crossrefs

Cf. A031298.

Programs

  • Haskell
    a068505 n = foldr (\d v -> v * b + d) 0 dds where
    b = maximum dds + 1
    dds = a031298_row n
    -- Reinhard Zumkeller, Feb 17 2013, Dec 29 2011
    
  • Maple
    f:= proc(n) local b,L,i;
    L:= convert(n,base,10);
    b:= max(L);
    add(L[i]*(b+1)^(i-1),i=1..nops(L));
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 02 2016
  • Mathematica
    a[n_] := (id = IntegerDigits[n] // Reverse; b = Max[id]+1; id.b^Range[0, Length[id]-1]); Table[a[n], {n, 1, 75}] (* Jean-François Alcover, May 15 2013 *)
    Table[FromDigits[IntegerDigits[n],Max[IntegerDigits[n]+1]],{n,80}] (* Harvey P. Dale, Dec 02 2015 *)
  • PARI
    a(n)=my(d = digits(n), b = vecmax(d)); subst(Pol(d), x, b+1); \\ Michel Marcus, Feb 12 2016

Extensions

Definition clarified and comment corrected by Martin Büttner, Feb 02 2016