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-5 of 5 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

A132027 a(n) = Product_{k=0..floor(log_3(n))} floor(n/3^k), n>=1.

Original entry on oeis.org

1, 2, 3, 4, 5, 12, 14, 16, 27, 30, 33, 48, 52, 56, 75, 80, 85, 216, 228, 240, 294, 308, 322, 384, 400, 416, 729, 756, 783, 900, 930, 960, 1089, 1122, 1155, 1728, 1776, 1824, 2028, 2080, 2132, 2352, 2408, 2464, 3375, 3450, 3525, 3840, 3920, 4000, 4335
Offset: 1

Views

Author

Hieronymus Fischer, Aug 13 2007, Aug 20 2007

Keywords

Comments

If n is written in base 3 as n=d(m)d(m-1)d(m-2)...d(2)d(1)d(0) (where d(k) is the digit at position k) then a(n) is also the product d(m)d(m-1)d(m-2)...d(2)d(1)d(0)*d(m)d(m-1)d(m-2)...d(2)d(1)*d(m)d(m-1)d(m= -2)...d(2)*...*d(m)d(m-1)d(m-2)*d(m)d(m-1)*d(m).

Examples

			a(11)=floor(11/3^0)*floor(11/3^1)*floor(11/3^2)=11*3*1=33;
a(13)=52 since 13=111(base-3) and so a(13)=111*11*1(base-3)=13*4*1=52.
		

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=2 to p=12 see A098844(p=2), A132028(p=4)-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
    Table[(f = If[# < 3, #, #*f[Quotient[#, 3]]] &)[n], {n, 51}] (* Ivan Neretin, May 29 2016 *)

Formula

Recurrence: a(n)=n*a(floor(n/3)); a(n*3^m)=n^m*3^(m(m+1)/2)*a(n).
a(k*3^m)=k^(m+1)*3^(m(m+1)/2), for k=1 or 2.
a(n)<=b(n), where b(n)=n^(1+floor(log_3(n)))/3^(1/2*(1+floor(log_3(n)))*floor(log_3(n))); equality holds if n is a power of 3 or two times a power of 3.
Also: a(n)<=2^((1-log_3(2))/2)*n^((1+log_3(n))/2)=1.1364507...*3^A000217(log_3(n)), equality for n=2*3^m, m>=0.
a(n)>c*b(n), where c=0.3826631966790330232889550... (see constant A132019).
Also: a(n)>c*2^((1-log_3(2))/2)*n^((1+log_3(n))/2)=0.434877...*3^A000217(log_3(n)).
lim inf a(n)/b(n)=0.3826631966790330232889550..., for n-->oo.
lim sup a(n)/b(n)=1, for n-->oo.
lim inf a(n)/n^((1+log_3(n))/2)=0.3826631966790330232889550...*sqrt(2)/2^log_3(sqrt(2)), for n-->oo.
lim sup a(n)/n^((1+log_3(n))/2)=sqrt(2)/2^log_3(sqrt(2)), for n-->oo.
lim inf a(n)/a(n+1)=0.3826631966790330232889550... for n-->oo (see constant A132019).
a(n)=O(n^((1+log_3(n))/2)).

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

Original entry on oeis.org

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

Views

Author

Hieronymus Fischer, Aug 14 2007

Keywords

Comments

This is the limiting probability that a large random symmetric binary matrix is nonsingular (cf. A086812, A048651). In other words, equals Lim_{n->oo} A086812(n)/A006125(n+1).- H. Tracy Hall, Sep 07 2024

Examples

			0.41942244179510759770995610770297425223395323439266674908044991663177...
		

Crossrefs

Programs

  • Maple
    evalf(1+sum((-1)^n*2^(n*(n-1)/2)/product(2^k-1, k=1..n), n=1..infinity), 120); # Robert FERREOL, Feb 23 2020
  • Mathematica
    RealDigits[ Product[1 - 1/(2*4^i), {i, 0, 175}], 10, 111][[1]] (* Robert G. Wilson v, May 25 2011 *)
    RealDigits[QPochhammer[1/2, 1/4], 10, 105][[1]] (* Jean-François Alcover, Nov 18 2015 *)
  • PARI
    prodinf(k=0,1-1.>>(2*k+1)) \\ Charles R Greathouse IV, Nov 16 2012

Formula

Equals lim inf_{n->oo} Product_{k=0..floor(log_4(n))} floor(n/4^k)*4^k/n.
Equals lim inf_{n->oo} A132028(n)/n^(1+floor(log_4(n)))*4^((1/2)*(1+floor(log_4(n)))*floor(log_4(n))).
Equals lim inf_{n->oo} A132028(n)/n^(1+floor(log_4(n)))*4^A000217(floor(log_4(n))).
Equals (1/2)*exp(-Sum_{n>0} (4^(-n)*(Sum_{k|n} 1/(k*2^k)))).
Equals lim inf_{n->oo} A132028(n)/A132028(n+1).
Equals Product_{k>0} (1-1/(2^k+1)). - Robert G. Wilson v, May 25 2011
From Robert FERREOL, Feb 23 2020: (Start)
Equals Product_{k>0} (1 + 1/2^k)^(-1) = 2/A081845.
Equals 1 + Sum_{n>=1} (-1)^n*2^(n*(n-1)/2)/((2-1)*(2^2-1)*...*(2^n-1)). (End)
From Peter Bala, Jan 15 2021: (Start)
Constant C = Sum_{n >= 0} 2^n/Product_{k = 1..n} (1 - 4^k).
Faster converging series:
2*C = (1/2)*Sum_{n >= 0} 2^(-n)/Product_{k = 1..n} (1 - 4^k);
(2^4)*C = 7*Sum_{n >= 0} 2^(-3*n)/Product_{k = 1..n} (1 - 4^k);
(2^9)*C = 7*31*Sum_{n >= 0} 2^(-5*n)/Product_{k = 1..n} (1 - 4^k), and so on.
Slower converging series:
C = -Sum_{n >= 0} 2^(3*n)/Product_{k = 1..n} (1 - 4^k);
7*C = Sum_{n >= 0} 2^(5*n)/Product_{k = 1..n} (1 - 4^k);
7*31*C = -Sum_{n >= 0} 2^(7*n)/Product_{k = 1..n} (1 - 4^k), and so on. (End)
Equals Product_{n>=0} (1 - 1/A004171(n)). - Amiram Eldar, May 09 2023

Extensions

Name corrected by Charles R Greathouse IV, Nov 16 2012

A054893 a(n) = Sum_{j > 0} floor(n/4^j).

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24
Offset: 0

Views

Author

Henry Bottomley, May 23 2000

Keywords

Comments

Different from highest power of 4 dividing n! (see A090616).

Examples

			  a(10^0) = 0.
  a(10^1) = 2.
  a(10^2) = 32.
  a(10^3) = 330.
  a(10^4) = 3331.
  a(10^5) = 33330.
  a(10^6) = 333330.
  a(10^7) = 3333329.
  a(10^8) = 33333328.
  a(10^9) = 333333326.
		

Crossrefs

Cf. A053737, A235127 (first differences).

Programs

  • Magma
    function A054893(n)
      if n eq 0 then return n;
      else return A054893(Floor(n/4)) + Floor(n/4);
      end if; return A054893;
    end function;
    [A054893(n): n in [0..103]]; // G. C. Greubel, Feb 09 2023
    
  • Mathematica
    Table[t=0; p=4; While[s=Floor[n/p]; t=t+s; s>0, p *= 4]; t, {n,0,100}]
    Table[Total[Floor/@(n/NestList[4#&,4,6])],{n,0,80}] (* Harvey P. Dale, Jun 12 2022 *)
  • PARI
    a(n) = (n - sumdigits(n,4))/3; \\ Kevin Ryde, Jan 08 2024
  • SageMath
    def A054893(n):
        if (n==0): return 0
        else: return A054893(n//4) + (n//4)
    [A054893(n) for n in range(104)] # G. C. Greubel, Feb 09 2023
    

Formula

a(n) = floor(n/4) + floor(n/16) + floor(n/64) + floor(n/256) + ...
a(n) = (n - A053737(n))/3.
From Hieronymus Fischer, Sep 15 2007: (Start)
a(n) = a(floor(n/4)) + floor(n/4).
a(4*n) = a(n) + n.
a(n*4^m) = a(n) + n*(4^m-1)/3.
a(k*4^m) = k*(4^m-1)/3, for 0 <= k < 4, m >= 0.
Asymptotic behavior:
a(n) = n/3 + O(log(n)),
a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
a(n) <= (n-1)/3; equality holds true for powers of 4.
a(n) >= (n-3)/3 - floor(log_4(n)); equality holds true for n = 4^m - 1, m>0. lim inf (n/3 - a(n)) = 1/3, for n-->oo.
lim sup (n/3 - log_4(n) - a(n)) = 0, for n-->oo.
lim sup (a(n+1) - a(n) - log_4(n)) = 0, for n-->oo.
G.f.: (1/(1-x))*Sum_{k > 0} x^(4^k)/(1-x^(4^k)). (End)
Partial sums of A235127. - R. J. Mathar, Jul 08 2021

Extensions

Edited by Hieronymus Fischer, Sep 15 2007
Examples added by Hieronymus Fischer, Jun 06 2012

A233035 a(n) = n * floor(n/4).

Original entry on oeis.org

0, 0, 0, 4, 5, 6, 7, 16, 18, 20, 22, 36, 39, 42, 45, 64, 68, 72, 76, 100, 105, 110, 115, 144, 150, 156, 162, 196, 203, 210, 217, 256, 264, 272, 280, 324, 333, 342, 351, 400, 410, 420, 430, 484, 495, 506, 517, 576, 588, 600, 612, 676, 689, 702, 715, 784, 798, 812, 826, 900, 915, 930, 945, 1024, 1040
Offset: 1

Views

Author

Kival Ngaokrajang, Dec 03 2013

Keywords

Comments

The maximum number of I patterns tetrominos that can be packed into an n X n array of squares with rotation is prohibited.
u(n) = n*(n mod 4), where u(n) is total number of squares left after packing I patterns into n X n squares.
a(n) = A132028(n) for 4 <= n <= 31.

Crossrefs

Programs

  • Mathematica
    Table[n*Floor[n/4],{n,80}] (* or *) LinearRecurrence[{1,0,0,2,-2,0,0,-1,1},{0,0,0,4,5,6,7,16,18},80] (* Harvey P. Dale, Aug 22 2020 *)
  • PARI
    a(n) = n * floor(n/4); \\ Joerg Arndt, Dec 08 2013

Formula

a(n) = (n^2 - n*(n mod 4))/4.
G.f.: (x^7 + x^6 + x^5 + x^4 + 4*x^3)/((1-x)*(1-x^4)^2). - Ralf Stephan, Dec 08 2013
Showing 1-5 of 5 results.