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

A129797 a(n) = floor(7^n/n).

Original entry on oeis.org

7, 24, 114, 600, 3361, 19608, 117649, 720600, 4483734, 28247524, 179756976, 1153440600, 7453000800, 48444505203, 316504100662, 2077058160600, 13684147881600, 90467422106136, 599941851861744, 3989613314880600
Offset: 1

Views

Author

Mohammad K. Azarian, May 18 2007

Keywords

Crossrefs

Programs

A129798 a(n) = floor(8^n/n).

Original entry on oeis.org

8, 32, 170, 1024, 6553, 43690, 299593, 2097152, 14913080, 107374182, 780903144, 5726623061, 42288908760, 314146179364, 2345624805922, 17592186044416, 132458812569720, 1000799917193443, 7585009898729256
Offset: 1

Views

Author

Mohammad K. Azarian, May 18 2007

Keywords

Crossrefs

Programs

A129799 a(n) = floor(9^n/n).

Original entry on oeis.org

9, 40, 243, 1640, 11809, 88573, 683281, 5380840, 43046721, 348678440, 2852823600, 23535794706, 195528140640, 1634056603925, 13726075472976, 115813761803240, 981010688215680, 8338590849833284, 71097458824894320
Offset: 1

Views

Author

Mohammad K. Azarian, May 18 2007

Keywords

Crossrefs

Programs

A128092 a(n) = largest multiple of n which is <= 2^n.

Original entry on oeis.org

2, 4, 6, 16, 30, 60, 126, 256, 504, 1020, 2046, 4092, 8190, 16380, 32760, 65536, 131070, 262134, 524286, 1048560, 2097144, 4194300, 8388606, 16777200, 33554425, 67108860, 134217702, 268435440, 536870910, 1073741820, 2147483646
Offset: 1

Views

Author

Leroy Quet, Feb 14 2007

Keywords

Crossrefs

Programs

  • Maple
    a:=n->n*floor(2^n/n): seq(a(n),n=1..37); # Emeric Deutsch, Feb 16 2007
  • Mathematica
    f[n_] := n*Floor[2^n/n];Array[f, 33] (* Ray Chandler, Feb 19 2007 *)
  • Python
    def A128092(n): return (m:=1<Chai Wah Wu, Aug 24 2023

Formula

a(n) = n*floor(2^n/n) = n*A000799(n).
a(n) = 2^n - (2^n mod n). - Chai Wah Wu, Aug 24 2023

Extensions

Extended by Emeric Deutsch and Ray Chandler, Feb 19 2007

A000801 a(n) = Sum_{k = 1..n} floor(2^k / k).

Original entry on oeis.org

2, 4, 6, 10, 16, 26, 44, 76, 132, 234, 420, 761, 1391, 2561, 4745, 8841, 16551, 31114, 58708, 111136, 211000, 401650, 766372, 1465422, 2807599, 5388709, 10359735, 19946715, 38459505, 74250899, 143524565, 277742293, 538043341, 1043333611, 2025040421
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000799.

Programs

  • Maple
    A000801 := proc(n) local k; sum(floor(2^k/k),k=1..n); end;
  • Mathematica
    Table[Sum[Floor[2^k/k], {k, n}], {n, 30}] (* T. D. Noe, Jun 20 2012 *)

A065482 a(n) = round( 2^n/n ).

Original entry on oeis.org

2, 2, 3, 4, 6, 11, 18, 32, 57, 102, 186, 341, 630, 1170, 2185, 4096, 7710, 14564, 27594, 52429, 99864, 190650, 364722, 699051, 1342177, 2581110, 4971027, 9586981, 18512790, 35791394, 69273666, 134217728, 260301048, 505290270, 981706811, 1908874354, 3714566310
Offset: 1

Views

Author

N. J. A. Sloane, Dec 03 2001

Keywords

Crossrefs

Programs

  • Magma
    [Round(2^n/n): n in [1..30]]; // G. C. Greubel, Jan 18 2018
    
  • Mathematica
    Table[Floor[(Floor[n/2]+2^n)/n], {n, 1, 100}]
  • PARI
    a(n) = { round(2^n/n) } \\ Harry J. Smith, Oct 20 2009
    
  • Python
    def A065482(n): return ((1<>1))//n # Chai Wah Wu, Apr 23 2025

Formula

a(n) = A082894(n)/n.
a(n) = floor((2^n + floor(n/2))/n).

A071354 Floor(2^n/n) is odd.

Original entry on oeis.org

12, 18, 25, 36, 42, 45, 48, 55, 80, 91, 95, 98, 99, 100, 108, 110, 112, 125, 130, 132, 135, 136, 140, 143, 152, 153, 155, 160, 161, 162, 175, 184, 187, 190, 192, 198, 208, 216, 224, 225, 228, 232, 235, 238, 240, 242, 245, 247, 248, 261, 266, 273, 275, 279, 285, 286, 289
Offset: 1

Views

Author

R. K. Guy, Jun 12 2002

Keywords

Comments

A student asked if the floor of 2^n / n was always even. He had a proof when n is prime. There is a shorter proof if you look at the binomial expansion of (1+1)^p.
There are infinitely many numbers in this sequence. (Because if n is even, then 2^n*12-n-2 is even, so 2^(2^n*12-n-2) is 4 (mod 6). Define x so that this is 6*x + 4, then dividing by 3 gives 2*x + (4/3), and the floor is an odd number.) - Jinyuan Wang, Oct 13 2018

Crossrefs

Programs

  • Mathematica
    Select[ Range[300], OddQ[ Floor[2^# / # ]] & ]
  • PARI
    for(n=1,1000,if((-1)^(floor(2^n/n))==-1+isprime(n),print1(n,",")))
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A071354_gen(startvalue=1): # generator of terms >= startvalue
        yield from filter(lambda k:not isprime(k) and (1<A071354_list = list(islice(A071354_gen(),20)) # Chai Wah Wu, Apr 23 2025

Extensions

More terms from several correspondents, Jun 12 2002

A215894 a(n) = floor(2^n / n^k), where k is the largest integer such that 2^n >= n^k.

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 4, 6, 1, 1, 2, 3, 5, 9, 1, 1, 2, 4, 6, 10, 17, 1, 2, 3, 5, 9, 15, 26, 1, 2, 4, 6, 11, 18, 31, 1, 2, 4, 6, 11, 19, 32, 1, 2, 3, 5, 9, 16, 28, 49, 1, 2, 4, 7, 13, 22, 38, 1, 1, 3, 5, 9, 16, 27, 47, 1, 2, 3, 5, 10, 17, 30, 51, 1, 2, 3, 5, 10
Offset: 2

Views

Author

Alex Ratushnyak, Aug 25 2012

Keywords

Comments

a(n) < n.
n such that a(n) = n-1: 2, 3, 996, 3389, 149462.

Examples

			a(2) = floor(2^2 / 2^2) = 1,
a(3) = floor(2^3 / 3) = 2,
a(4)..a(9) are floor(2^n / n^2),
a(10)..a(15) are floor(2^n / n^3),
a(16)..a(22) are floor(2^n / n^4), and so on.
		

Crossrefs

Programs

  • Magma
    [Floor(2^n div n^Floor(n *Log(n,2))): n in [2..100]]; // Vincenzo Librandi, Jan 09 2019
  • Mathematica
    Table[Floor[2^n/n^Floor[n Log[n, 2]]], {n, 2, 64}] (* Alonso del Arte, Aug 26 2012 *)
  • Python
    import math
    def modiv(a,b):
        return a - b*(a//b)
    def modlg(a,b):
        return a // b**int(math.log(a,b))
    for n in range(2,100):
        a = 2**n
        print(modlg(a,n), end=',')
    

Formula

a(n) = modlg(2^n, n) = floor(2^n / n^floor(n*logn(2))), where logn is the logarithm base n.
In the base-b representation of k, modlg(k,b) is the most significant digit: k = c0 + c1*b + c2*b^2 + ... + cn*b^n, cn = modlg(k,b), c0 = k mod b. - Alex Ratushnyak, Aug 30 2012

A141602 Integer part of 2^n/log(2^n).

Original entry on oeis.org

2, 2, 3, 5, 9, 15, 26, 46, 82, 147, 268, 492, 909, 1688, 3151, 5909, 11123, 21010, 39809, 75638, 144073, 275050, 526182, 1008516, 1936352, 3723754, 7171675, 13831089, 26708310, 51636066, 99940774, 193635250, 375535031, 728979766, 1416303547
Offset: 1

Views

Author

Cino Hilliard, Aug 21 2008

Keywords

Comments

2^n/log(2^n) is an approximation to the number of primes < 2^n.

Crossrefs

Programs

  • Magma
    A141602:= func< n | Floor(2^n/(n*Log(2))) >;
    [A141602(n): n in [1..40]]; // G. C. Greubel, Sep 21 2024
    
  • Mathematica
    Floor[2^#/Log[2^#]]&/@Range[40] (* Harvey P. Dale, Mar 11 2013 *)
  • PARI
    g(n) = for(x=1,n,y=floor(2^x/log(2^x));print1(y","))
    
  • PARI
    a(n) = 2^n\log(2^n); \\ Michel Marcus, Feb 24 2021
    
  • SageMath
    def A141602(n): return int(2^n/(n*log(2)))
    [A141602(n) for n in range(1,41)] # G. C. Greubel, Sep 21 2024

Formula

a(n) = A050500(2^n) = floor(2^n*A007525/n) >= A000799(n). - R. J. Mathar, Jan 05 2009

A364881 First significant digit of the decimal expansion of n/(2^n).

Original entry on oeis.org

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

Views

Author

Ejder Aysun, Aug 10 2023

Keywords

Comments

a(n) is also the first digit of n*5^n = A036291(n).

Examples

			n     n/(2^n)
1     0.5                            a(1) = 5
2     0.5                            a(2) = 5
3     0.375                          a(3) = 3
4     0.25                           a(4) = 2
5     0.15625                        a(5) = 1
6     0.9375                         a(6) = 9
7     0.0546875                      a(7) = 5
8     0.03125                        a(8) = 3
9     0.017578125                    a(9) = 1
10    0.009765625                    a(10) = 9
...
		

Crossrefs

Programs

  • Maple
    a:= n-> parse((""||(n*5^n))[1]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 18 2023
  • Mathematica
    Table[Floor[n/(2^n)/10^Floor[Log10[n/(2^n)]]], {n, 100000}]
  • Python
    def A364881(n): return (n*5**(m:=len(str((1<>n-m) % 10 # Chai Wah Wu, Aug 24 2023

Formula

a(n) = floor(n/(2^n)/10^floor(log_10(n/(2^n)))), for n > 0.
a(n) = floor(n/A000079(n)/10^floor(log_10(n/A000079(n)))).
a(n) = floor(A036291(n)/10^floor(log_10(A036291(n)))).
a(n) = A000030(A036291(n)).
Previous Showing 11-20 of 21 results. Next