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

A102669 Number of digits >= 2 in decimal representation of n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Comments

a(n) = 0 iff n is in A007088 (numbers in base 2). - Bernard Schott, Feb 19 2023

Crossrefs

Programs

  • Maple
    p:=proc(n) local b,ct,j: b:=convert(n,base,10): ct:=0: for j from 1 to nops(b) do if b[j]>=2 then ct:=ct+1 else ct:=ct fi od: ct: end: seq(p(n),n=0..116); # Emeric Deutsch, Feb 23 2005
  • Mathematica
    Table[Total@ Take[DigitCount@ n, {2, 9}], {n, 0, 104}] (* Michael De Vlieger, Aug 17 2017 *)

Formula

Contribution from Hieronymus Fischer, Jun 10 2012: (Start)
a(n) = Sum_{j=1..m+1} (floor(n/10^j + 4/5) - floor(n/10^j)), where m = floor(log_10(n)).
G.f.: g(x) = (1/(1-x))*Sum_{j>=0} (x^(2*10^j) - x^(10*10^j))/(1 - x^10^(j+1)).
General formulas for the number of digits >= d in the decimal representations of n, where 1 <= d <= 9:
a(n) = Sum_{j=1..m+1} (floor(n/10^j + (10-d)/10) - floor(n/10^j)), where m = floor(log_10(n)).
G.f.: g(x) = (1/(1-x))*Sum_{j>=0} (x^(d*10^j) - x^(10*10^j))/(1 - x^10^(j+1)). (End)

Extensions

More terms from Emeric Deutsch, Feb 23 2005

A102685 Partial sums of A055640.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123
Offset: 0

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Comments

The total number of nonzero digits occurring in all the numbers 0, 1, 2, ... n (in decimal representation). - Hieronymus Fischer, Jun 10 2012

Crossrefs

Formula

From Hieronymus Fischer, Jun 06 2012: (Start)
a(n) = (1/2)*Sum_{j=1..m+1} (floor((n/10^j)+0.9)*(2n + 2 + (0.8 - floor((n/10^j)+0.9))*10^j) - floor(n/10^j)*(2n + 2 - (floor(n/10^j)+1) * 10^j)), where m = floor(log_10(n)).
a(n) = (n+1)*A055640(n) + (1/2)*Sum_{j=1..m+1} ((8*floor((n/10^j)+0.9)/10 + floor(n/10^j))*10^j - (floor((n/10^j)+0.9)^2 - floor(n/10^j)^2)*10^j), where m = floor(log_10(n)).
a(10^m-1) = 9*m*10^(m-1). (This is the total number of nonzero digits occurring in all the numbers with <= m digits.)
G.f.: g(x) = (1/(1-x)^2) * Sum_{j>=0} (x^10^j - x^(10*10^j))/(1-x^10^(j+1)). (End)

A160094 a(n) = 1 + A122840(n).

Original entry on oeis.org

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

Views

Author

Anonymous, May 01 2009

Keywords

Comments

a(n) is the Levenshtein distance from the decimal expansion of n - 1 to the decimal expansion of n. For example, to convert "9" to "10", substitute "0" for "9" and insert "1". Since two such operations are required, a(10) = 2. See the analogous A091090 (binary expansion) and A115777 (full definition). - Rick L. Shepherd, Mar 25 2015

Examples

			a(160) = 2 because the last nonzero digit of 160 (counting from left to right), when 160 is written in base 10, is 6, and that 6 occurs 2 digits from the right in 160.
		

Crossrefs

Programs

  • Mathematica
    IntegerExponent[Range[150]]+1 (* Harvey P. Dale, Feb 06 2015 *)

Formula

From Hieronymus Fischer, Jun 08 2012: (Start)
With m = floor(log_10(n)), frac(x) = x-floor(x):
a(n) = Sum_{j=0..m} (1 - ceiling(frac(n/10^j))).
a(n) = m + 1 + Sum_{j=1..m} (floor(-frac(n/10^j))).
a(n) = 1 + A054899(n) - A054899(n-1).
G.f.: g(x) = (x/(1-x)) + Sum_{j>0} x^10^j/(1-x^10^j). (End)
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 10/9. - Amiram Eldar, Jul 10 2023
a(n) = A122840(10*n). - R. J. Mathar, Jun 28 2025

Extensions

Name simplified by Jon E. Schoenfield, Feb 26 2014

A160093 Number of digits in n, excluding any trailing zeros.

Original entry on oeis.org

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

Views

Author

Anonymous, May 01 2009

Keywords

Examples

			a(1060000) = 3 because discarding the trailing zeros from 1060000 leaves 106, which is a 3-digit number.
		

Crossrefs

Programs

  • Mathematica
    lnzd[n_]:=Module[{spl=Last[Split[IntegerDigits[n]]]},If[!MemberQ[ spl,0], IntegerLength[n], IntegerLength[n]-Length[spl]]]; Array[lnzd,110] (* Harvey P. Dale, Jun 05 2013 *)
    Table[IntegerLength[n] - IntegerExponent[n, 10], {n, 100}] (* Amiram Eldar, Sep 14 2020 *)
  • PARI
    a(n)=if(n==0,1,#digits(n/10^valuation(n,10))) \\ Joerg Arndt, Jan 11 2017
    
  • PARI
    a(n)=logint(n,10)+1-valuation(n,10) \\ Charles R Greathouse IV, Jan 12 2017
  • Python
    def A160093(n):
         return len(str(int(str(n)[::-1]))) # Indranil Ghosh, Jan 11 2017
    

Formula

From Hieronymus Fischer, Jun 08 2012: (Start)
With m = floor(log_10(n)), frac(x) = x-floor(x):
a(n) = 1 + Sum_{j=0..m} ceiling(frac(n/10^j)).
a(n) = 1 - Sum_{j=1..m} (floor(-frac(n/10^j))).
a(n)= A055642(n) + A054899(n-1) - A054899(n).
G.f.: (x/(1-x)) + (1/(1-x))*Sum_{j>0} x^(10^j+1)*(1 - x^(10^j-1))/(1-x^10^j). (End)
a(n) = A055642(A004086(n)). - Indranil Ghosh, Jan 11 2017
a(n) = A055642(A004151(n)). - Amiram Eldar, Sep 14 2020

Extensions

Simpler definition and changed example from Jon E. Schoenfield, Feb 15 2014

A004128 a(n) = Sum_{k=1..n} floor(3*n/3^k).

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 8, 9, 10, 13, 14, 15, 17, 18, 19, 21, 22, 23, 26, 27, 28, 30, 31, 32, 34, 35, 36, 40, 41, 42, 44, 45, 46, 48, 49, 50, 53, 54, 55, 57, 58, 59, 61, 62, 63, 66, 67, 68, 70, 71, 72, 74, 75, 76, 80, 81, 82, 84, 85, 86, 88, 89, 90, 93, 94, 95, 97, 98, 99, 101, 102
Offset: 0

Views

Author

Keywords

Comments

3-adic valuation of (3n)!; cf. A054861.
Denominators of expansion of (1-x)^{-1/3} are 3^a(n). Numerators are in |A067622|.

References

  • Gary W. Adamson, in "Beyond Measure, A Guided Tour Through Nature, Myth and Number", by Jay Kappraff, World Scientific, 2002, p. 356.

Crossrefs

Programs

  • Haskell
    a004128 n = a004128_list !! (n-1)
    a004128_list = scanl (+) 0 a051064_list
    -- Reinhard Zumkeller, May 23 2013
    
  • Magma
    [n + Valuation(Factorial(n), 3): n in [0..70]]; // Vincenzo Librandi, Jun 12 2019
    
  • Maple
    A004128 := proc(n)
        A054861(3*n) ;
    end proc:
    seq(A004128(n),n=0..100) ; # R. J. Mathar, Nov 04 2017
  • Mathematica
    Table[Total[NestWhileList[Floor[#/3] &, n, # > 0 &]], {n, 0, 70}] (* Birkas Gyorgy, May 20 2012 *)
    A004128 = Log[3, CoefficientList[ Series[1/(1+x)^(1/3), {x, 0, 100}], x] // Denominator] (* Jean-François Alcover, Feb 19 2015 *)
    Flatten[{0, Accumulate[Table[IntegerExponent[3*n, 3], {n, 1, 100}]]}] (* Vaclav Kotesovec, Oct 17 2019 *)
  • PARI
    {a(n) = my(s, t=1); while(t<=n, s += n\t; t*=3);s}; /* Michael Somos, Feb 26 2004 */
    
  • PARI
    a(n) = (3*n-sumdigits(n,3))/2; \\ Christian Krause, Jun 10 2025
    
  • Python
    def A007949(n):
        c = 0
        while not (a:=divmod(n,3))[1]:
            c += 1
            n = a[0]
        return c
    def A004128(n): return n+sum(A007949(i) for i in range(3,n+1)) # Chai Wah Wu, Feb 28 2025
  • Sage
    A004128 = lambda n: A004128(n//3) + n if n > 0 else 0
    [A004128(n) for n in (0..70)]  # Peter Luschny, Nov 16 2012
    

Formula

A051064(n) = a(n+1) - a(n). - Alford Arnold, Jul 19 2000
a(n) = n + floor(n/3) + floor(n/9) + floor(n/27) + ... = n + a(floor(n/3)) = n + A054861(n) = A054861(3n) = (3*n - A053735(n))/2. - Henry Bottomley, May 01 2001
a(n) = Sum_{k>=0} floor(n/3^k). a(n) = Sum_{k=0..floor(log_3(n))} floor(n/3^k), n >= 1. - Hieronymus Fischer, Aug 14 2007
Recurrence: a(n) = n + a(floor(n/3)); a(3n) = 3*n + a(n); a(n*3^m) = 3*n*(3^m-1)/2 + a(n). - Hieronymus Fischer, Aug 14 2007
a(k*3^m) = k*(3^(m+1)-1)/2, 0 <= k < 3, m >= 0. - Hieronymus Fischer, Aug 14 2007
Asymptotic behavior: a(n) = (3/2)*n + O(log(n)), a(n+1) - a(n) = O(log(n)); this follows from the inequalities below. - Hieronymus Fischer, Aug 14 2007
a(n) <= (3n-1)/2; equality holds for powers of 3. - Hieronymus Fischer, Aug 14 2007
a(n) >= (3n-2)/2 - floor(log_3(n)); equality holds for n = 3^m - 1, m > 0. - Hieronymus Fischer, Aug 14 2007
Lim inf (3n/2 - a(n)) = 1/2, for n->oo. - Hieronymus Fischer, Aug 14 2007
Lim sup (3n/2 - log_3(n) - a(n)) = 0, for n->oo. - Hieronymus Fischer, Aug 14 2007
Lim sup (a(n+1) - a(n) - log_3(n)) = 1, for n->oo. - Hieronymus Fischer, Aug 14 2007
G.f.: (Sum_{k>=0} x^(3^k)/(1-x^(3^k)))/(1-x). - Hieronymus Fischer, Aug 14 2007
a(n) = Sum_{k>=0} A030341(n,k)*A003462(k+1). - Philippe Deléham, Oct 21 2011
a(n) ~ 3*n/2 - log(n)/(2*log(3)). - Vaclav Kotesovec, Oct 17 2019

Extensions

Current definition suggested by Jason Earls, Jul 04 2001

A059995 Drop the final digit of n.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 12 2001

Keywords

Crossrefs

Programs

Formula

a(n) = a(n-10) + 1.
a(n) = floor(n/10).
a(n) = (n - A010879(n))/10.
G.f.: x^10/((1-x)(1-x^10)).
Partial sums are given by A131242. - Hieronymus Fischer, Jun 21 2007

A102683 Number of digits 9 in decimal representation of n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Crossrefs

Programs

  • Haskell
    a102683 =  length . filter (== '9') . show
    -- Reinhard Zumkeller, Dec 29 2011
  • Maple
    p:=proc(n) local b,ct,j: b:=convert(n,base,10): ct:=0: for j from 1 to nops(b) do if b[j]>=9 then ct:=ct+1 else ct:=ct fi od: ct: end: seq(p(n),n=0..116); # Emeric Deutsch, Feb 23 2005
  • Mathematica
    a[n_] := DigitCount[n, 10, 9]; Array[a, 100, 0] (* Amiram Eldar, Jul 24 2023 *)

Formula

a(A007095(n)) = 0; a(A011539(n)) > 0. - Reinhard Zumkeller, Dec 29 2011
From Hieronymus Fischer, Jun 10 2012: (Start)
a(n) = Sum_{j=1..m+1} (floor(n/10^j + 1/10) - floor(n/10^j)), where m=floor(log_10(n)).
G.f.: g(x) = (1/(1-x))*Sum_{j>=0} (x^(9*10^j) - x^(10*10^j))/(1-x^10^(j+1)). (End)
a(A235049(n)) = 0. - Reinhard Zumkeller, Apr 16 2014

Extensions

More terms from Emeric Deutsch, Feb 23 2005

A037308 Numbers whose base-2 and base-10 expansions have the same digit sum.

Original entry on oeis.org

0, 1, 20, 21, 122, 123, 202, 203, 222, 223, 230, 231, 302, 303, 410, 411, 502, 503, 1130, 1131, 1150, 1151, 1202, 1203, 1212, 1213, 1230, 1231, 1300, 1301, 1402, 1403, 1502, 1503, 1510, 1511, 2006, 2007, 2032, 2033, 2102, 2103, 2200, 2201, 3006, 3007, 3012
Offset: 1

Views

Author

Keywords

Comments

n is in the sequence iff n+(-1)^n is in the sequence. [Robert Israel, Mar 25 2013]

Examples

			122 is a member, since digital-sum_2(122) = 5 = digital-sum_10(122).
		

Crossrefs

Programs

  • Maple
    N:= 10000; # to get all elements up to N
    select(x -> (convert(convert(x,base,10),`+`)-convert(convert(x,base,2),`+`)=0), [$0..N]); # Robert Israel, Mar 25 2013
  • Mathematica
    Select[Range[0, 5000], Total[IntegerDigits[#, 2]] == Total[IntegerDigits[#, 10]] &] (* Jean-François Alcover, Mar 07 2016 *)
  • PARI
    is(n)=hammingweight(n)==sumdigits(n); \\ Charles R Greathouse IV, Sep 25 2012
    
  • Python
    def ok(n): return sum(map(int, str(n))) == sum(map(int, bin(n)[2:]))
    print(list(filter(ok, range(3013)))) # Michael S. Branicky, Jun 20 2021
  • Sage
    [n for n in (0..10000) if sum(n.digits(base=2)) == sum(n.digits(base=10))] # Freddy Barrera, Oct 12 2018
    

Formula

From Reinhard Zumkeller, Aug 06 2010: (Start)
A007953(a(n)) = A000120(a(n));
A180018(a(n)) = 0. (End)

Extensions

Edited by N. J. A. Sloane Nov 29 2008 at the suggestion of Zak Seidov

A054896 a(n) = Sum_{k>0} floor(n/7^k).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13
Offset: 0

Views

Author

Henry Bottomley, May 23 2000

Keywords

Comments

Exponent of the highest power of 7 dividing n!.

Examples

			  a(10^0) = 0.
  a(10^1) = 1.
  a(10^3) = 16.
  a(10^3) = 164.
  a(10^4) = 1665.
  a(10^5) = 16662.
  a(10^6) = 166664.
  a(10^7) = 1666661.
  a(10^8) = 16666662.
  a(10^9) = 166666661
		

Crossrefs

Cf. A011371 and A054861 for analogs involving powers of 2 and 3.

Programs

Formula

a(n) = floor(n/7) + floor(n/49) + floor(n/343) + floor(n/2401) + ...
a(n) = (n - A053828(n))/6.
From Hieronymus Fischer, Aug 14 2007: (Start)
a(n) = a(floor(n/7)) + floor(n/7).
a(7*n) = n + a(n).
a(n*7^m) = a(n) + n*(7^m-1)/6.
a(k*7^m) = k*(7^m-1)/6, for 0 <= k < 7, m >= 0.
Asymptotic behavior:
a(n) = n/6 + O(log(n)).
a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
a(n) <= (n-1)/6; equality holds for powers of 7.
a(n) >= (n-6)/6 - floor(log_7(n)); equality holds for n=7^m-1, m>0. -
lim inf (n/6 - a(n)) = 1/6, for n-->oo.
lim sup (n/6 - log_7(n) - a(n)) = 0, for n-->oo.
lim sup (a(n+1) - a(n) - log_7(n)) = 0, for n-->oo.
G.f.: (1/(1-x))*Sum_{k > 0} x^(7^k)/(1-x^(7^k)). (End)
Partial sums of A214411. - R. J. Mathar, Jul 08 2021
a(n) = A214411(A000142(n)). - Michel Marcus, Oct 07 2024

Extensions

Examples added by Hieronymus Fischer, Jun 06 2012

A054895 a(n) = Sum_{k>0} floor(n/6^k).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16
Offset: 0

Views

Author

Henry Bottomley, May 23 2000

Keywords

Comments

Different from the highest power of 6 dividing n! (cf. A054861). - Hieronymus Fischer, Aug 14 2007
Partial sums of A122841. - Hieronymus Fischer, Jun 06 2012

Examples

			  a(10^0) = 0.
  a(10^1) = 1.
  a(10^2) = 18.
  a(10^3) = 197.
  a(10^4) = 1997.
  a(10^5) = 19996.
  a(10^6) = 199995.
  a(10^7) = 1999995.
  a(10^8) = 19999994.
  a(10^9) = 199999993.
		

Crossrefs

Cf. A011371 and A054861 for analogs involving powers of 2 and 3.

Programs

  • Haskell
    a054895 n = a054895_list !! n
    a054895_list = scanl (+) 0 a122841_list
    -- Reinhard Zumkeller, Nov 10 2013
    
  • Magma
    function A054895(n)
      if n eq 0 then return n;
      else return A054895(Floor(n/6)) + Floor(n/6);
      end if; return A054895;
    end function;
    [A054895(n): n in [0..100]]; // G. C. Greubel, Feb 09 2023
    
  • Mathematica
    Table[t=0; p=6; While[s=Floor[n/p]; t=t+s; s>0, p *= 6]; t, {n,0,100}]
  • SageMath
    def A054895(n):
        if (n==0): return 0
        else: return A054895(n//6) + (n//6)
    [A054895(n) for n in range(104)] # G. C. Greubel, Feb 09 2023

Formula

a(n) = floor(n/6) + floor(n/36) + floor(n/216) + floor(n/1296) + ...
a(n) = (n - A053827(n))/5.
From Hieronymus Fischer, Aug 14 2007: (Start)
a(n) = a(floor(n/6)) + floor(n/6).
a(6*n) = n + a(n).
a(n*6^m) = n*(6^m-1)/5 + a(n).
a(k*6^m) = k*(6^m-1)/5, for 0 <= k < 6, m >= 0.
Asymptotic behavior:
a(n) = (n/5) + O(log(n)).
a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
a(n) <= (n-1)/5; equality holds for powers of 6.
a(n) >= ((n-5)/5) - floor(log_6(n)); equality holds for n=6^m-1, m>0.
lim inf (n/5 - a(n)) = 1/5, for n-->oo.
lim sup (n/5 - log_6(n) - a(n)) = 0, for n-->oo.
lim sup (a(n+1) - a(n) - log_6(n)) = 0, for n-->oo.
G.f.: (1/(1-x))*Sum_{k > 0} x^(6^k)/(1-x^(6^k)). (End)

Extensions

An incorrect formula was deleted by N. J. A. Sloane, Nov 18 2008
Examples added by Hieronymus Fischer, Jun 06 2012
Previous Showing 11-20 of 58 results. Next