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

A190941 Partial sums of A190592.

Original entry on oeis.org

0, 1, 3, 4, 5, 7, 9, 11, 13, 14, 15, 17, 18, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 46, 47, 49, 50, 51, 53, 55, 57, 59, 60, 61, 63, 64, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 146, 147, 149, 150, 151, 153, 155, 157, 159, 160, 161, 163, 164, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185
Offset: 0

Views

Author

Jonathan Vos Post, May 24 2011

Keywords

Comments

Compare with obvious base-2 analog. What is the general base-k formula?

Programs

  • Mathematica
    Accumulate@ Array[Max@ IntegerDigits[#, 3] &, 105, 0] (* Michael De Vlieger, Feb 15 2020 *)

Formula

a(n) = Sum_{i=0..n} (maximal digit in base-3 expansion of i).
a(n) = 3n + O(n^0.631). - Charles R Greathouse IV, Aug 21 2011

A054055 Largest digit of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 3, 3, 3, 3, 4, 5, 6, 7, 8, 9, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1, 1, 2, 3, 4
Offset: 0

Views

Author

Henry Bottomley, Apr 29 2000

Keywords

Comments

A095815(n) = n + a(n). - Reinhard Zumkeller, Aug 23 2011
a(A007088(n)) = 1, n > 0; a(A136399(n)) > 1. - Reinhard Zumkeller, Apr 25 2012
a(n) = 9 for almost all n. Sum_{n < x} a(n) = 9x + O(.956^x). - Charles R Greathouse IV, Oct 02 2013

Examples

			a(12)=2 because 1 < 2.
		

Crossrefs

Cf. A054054.

Programs

  • Haskell
    a054055 = f 0 where
       f m x | x <= 9 = max m x
             | otherwise = f (max m d) x' where (x',d) = divMod x 10
    -- Reinhard Zumkeller, Jun 20 2012, May 14 2011
    
  • Magma
    [n eq 0 select 0 else Maximum(Intseq(n)): n in [0..104]]; // Bruno Berselli, Aug 24 2011
    
  • Maple
    [seq(max(convert(n,base,10)),n=0..120)];
  • Mathematica
    f[n_] := Sort[IntegerDigits[n]][[-1]]; Array[f, 105, 0] (* Alonso del Arte, May 14 2011 *) (* and revised by Robert G. Wilson v, Aug 24 2011 *)
    Max/@IntegerDigits[Range[0,110]] (* Harvey P. Dale, Apr 17 2016 *)
  • PARI
    a(n)=vecmax(eval(Vec(Str(n)))) \\ Charles R Greathouse IV, Jun 16 2011
    
  • PARI
    a(n)=vecmax(digits(n)) \\ Charles R Greathouse IV, Oct 02 2013
    
  • Python
    def A054055(n): return max(int(d) for d in str(n)) # Chai Wah Wu, Jun 06 2022

A037897 (Greatest base 3 digit of n)-(least base 3 digit of n).

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 1, 0, 1, 1, 2, 1, 0, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 0, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 0, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 0, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    A037897 := proc(n)
        local dgs ;
        dgs := convert(n,base,3);
        max(op(dgs))-min(op(dgs)) ;
    end proc: # R. J. Mathar, Oct 19 2015
  • PARI
    A037897(n) = (vecmax(digits(n,3)) - vecmin(digits(n,3))); \\ Antti Karttunen, Aug 11 2017

Formula

a(n) = A190592(n) - A290825(n). - Antti Karttunen, Aug 12 2017

Extensions

Offset corrected by R. J. Mathar, Oct 19 2015
More terms from Antti Karttunen, Aug 11 2017

A290825 Least base-3 digit of n.

Original entry on oeis.org

0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Robert Israel, Aug 11 2017

Keywords

Examples

			11 = 102_3 so a(11)=0.
		

Crossrefs

Programs

  • Maple
    seq(min(convert(n,base,3)),n=0..100);
  • Mathematica
    Table[Min[IntegerDigits[n,3]],{n,0,120}] (* Harvey P. Dale, Dec 19 2017 *)
  • PARI
    a(n) = if (n==0, 0, vecmin(digits(n, 3))); \\ Michel Marcus, Aug 12 2017

Formula

a(n) = 2 if and only if n > 0 is in A024023.
a(n) = 0 if n is divisible by 3.
a(n) = min(A010872(n), a(A002264(n))).
Showing 1-4 of 4 results.