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

A098844 a(1)=1, a(n) = n*a(floor(n/2)).

Original entry on oeis.org

1, 2, 3, 8, 10, 18, 21, 64, 72, 100, 110, 216, 234, 294, 315, 1024, 1088, 1296, 1368, 2000, 2100, 2420, 2530, 5184, 5400, 6084, 6318, 8232, 8526, 9450, 9765, 32768, 33792, 36992, 38080, 46656, 47952, 51984, 53352, 80000, 82000, 88200, 90300
Offset: 1

Views

Author

Benoit Cloitre, Nov 03 2004

Keywords

Examples

			a(10) = floor(10/2^0)*floor(10/2^1)*floor(10/2^2)*floor(10/2^3) = 10*5*2*1 = 100;
a(17) = 1088 since 17 = 10001(base 2) and so a(17) = 10001*1000*100*10*1(base 2) = 17*8*4*2*1 = 1088.
		

Crossrefs

For formulas regarding a general parameter p (i.e., terms floor(n/p^k)) see A132264.
For the product of terms floor(n/p^k) for p=3 to p=12 see A132027(p=3)-A132033(p=9), A067080(p=10), A132263(p=11), A132264(p=12).
For the products of terms 1+floor(n/p^k) see A132269-A132272, A132327, A132328.

Programs

  • Mathematica
    lst={};Do[p=n;s=1;While[p>1,p=IntegerPart[p/2];s*=p;];AppendTo[lst,s],{n,1,6!,2}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 28 2009 *)
  • PARI
    a(n)=if(n<2,1,n*a(floor(n/2)))
    
  • Python
    from math import prod
    def A098844(n): return n*prod(n//2**k for k in range(1,n.bit_length()-1)) # Chai Wah Wu, Jun 07 2022

Formula

a(2^n) = 2^(n*(n+1)/2) = A006125(n+1).
From Hieronymus Fischer, Aug 13 2007: (Start)
a(n) = Product_{k=0..floor(log_2(n))} floor(n/2^k), n>=1.
Recurrence:
a(n*2^m) = n^m*2^(m(m+1)/2)*a(n).
a(n) <= n^((1+log_2(n))/2) = 2^A000217(log_2(n)); equality iff n is a power of 2.
a(n) >= c(n)*(n+1)^((1 + log_2(n+1))/2) for n != 2,
where c(n) = Product_{k=1..floor(log_2(n))} (1 - 1/2^k); equality holds iff n+1 is a power of 2.
a(n) > c*(n+1)^((1 + log_2(n+1))/2)
where c = 0.288788095086602421... (see constant A048651).
lim inf a(n)/n^((1+log_2(n))/2)=0.288788095086602421... for n-->oo.
lim sup a(n)/n^((1+log_2(n))/2) = 1 for n-->oo.
lim inf a(n)/a(n+1) = 0.288788095086602421... for n-->oo (see constant A048651).
a(n) = O(n^((1+log_2(n))/2)). (End)

Extensions

Formula section edited by Hieronymus Fischer, Jun 13 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

A132022 Decimal expansion of Product_{k>=0} (1 - 1/(2*6^k)).

Original entry on oeis.org

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

Views

Author

Hieronymus Fischer, Aug 14 2007

Keywords

Examples

			0.45071262522603913...
		

Crossrefs

Programs

  • Mathematica
    digits = 103; NProduct[1-1/(2*6^k), {k, 0, Infinity}, NProductFactors -> 200, WorkingPrecision -> digits+5] // N[#, digits+5]& // RealDigits[#, 10, digits]& // First (* Jean-François Alcover, Feb 18 2014 *)
    (1/2)*N[QPochhammer[1/12, 1/6], 200] (* G. C. Greubel, Dec 20 2015 *)
  • PARI
    prodinf(x=0, 1-1/(2*6^x)) \\ Altug Alkan, Dec 20 2015

Formula

Equals lim inf_{n->oo} Product_{k=0..floor(log_6(n))} floor(n/6^k)*6^k/n.
Equals lim inf_{n->oo} A132030(n)/n^(1+floor(log_6(n)))*6^(1/2*(1+floor(log_6(n)))*floor(log_6(n))).
Equals lim inf_{n->oo} A132030(n)/n^(1+floor(log_6(n)))*6^A000217(floor(log_6(n))).
Equals (1/2)*exp(-Sum_{n>0} 6^(-n)*Sum{k|n} 1/(k*2^k)).
Equals lim inf_{n->oo} A132030(n)/A132030(n+1).
Equals (1/2)*(1/12; 1/6){infinity}, where (a;q){infinity} is the q-Pochhammer symbol. - G. C. Greubel, Dec 20 2015
Equals Product_{n>=1} (1 - 1/A167747(n)). - Amiram Eldar, May 09 2023
Showing 1-3 of 3 results.