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.

A078607 Least positive integer x such that 2*x^n > (x+1)^n.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 9, 10, 12, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 27, 29, 30, 32, 33, 35, 36, 38, 39, 40, 42, 43, 45, 46, 48, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 63, 65, 66, 68, 69, 71, 72, 74, 75, 76, 78, 79, 81, 82, 84, 85, 87, 88, 89, 91, 92, 94, 95, 97, 98, 100, 101, 102
Offset: 0

Views

Author

Jon Perry, Dec 09 2002

Keywords

Comments

Also, integer for which E(s) = s^n - Sum_{0 < k < s} k^n is maximal. It appears that a(n) + 2 is the least integer for which E(s) < 0. - M. F. Hasler, May 08 2020

Examples

			a(2) = 3 as 2^2 = 4, 3^2 = 9 and 4^2 = 16.
For n = 777451915729368, a(n) = 1121626023352384 = ceiling(n log 2), where n*log(2) = 1121626023352383.5 - 2.13*10^-17 and 2*floor(n log 2)^n / floor(1 + n log 2)^n = 1 - 3.2*10^-32. - _M. F. Hasler_, Nov 02 2013
a(2) is given by floor(1/(1-1/sqrt(2))). [From former A230748.]
		

Crossrefs

Cf. A224996 (the largest integer x that satisfies 2*x^n <= (x+1)^n).
Cf. A078608, A078609. Equals A110882(n)-1 for n > 0.
Cf. A332097 (maximum of E(s), cf comments), also related to this: A332101 (least k such that k^n <= sum of all smaller n-th powers), A030052 (least k such that k^n = sum of distinct n-th powers), A332065 (all k such that k^n is a sum of distinct n-th powers).

Programs

  • Mathematica
    Table[SelectFirst[Range@ 120, 2 #^n > (# + 1)^n &], {n, 0, 71}] (* Michael De Vlieger, May 01 2016, Version 10 *)
  • PARI
    for (n=2,50, x=2; while (2*x^n<=((x+1)^n),x++); print1(x","))
    
  • PARI
    a(n)=1\(1-1/2^(1/n)) \\ Charles R Greathouse IV, Oct 31 2013
    
  • PARI
    apply( A078607(n)=ceil(1/if(n>1,sqrtn(2,n)-1,!n+n/2)), [0..80]) \\ M. F. Hasler, May 08 2020

Formula

a(n) = ceiling(1/(2^(1/n)-1)) for n > 1. (For n = 1 resp. 0 this gives the integer 1 resp. infinity as argument of ceiling.) [Edited by M. F. Hasler, May 08 2020]
For most n, a(n) is the nearest integer to n/log(2), but there are exceptions, including n=777451915729368.
Following formulae merged in from former A230748, M. F. Hasler, May 14 2020:
a(n) = floor(1/(1-1/2^(1/n))).
a(n) = n/log(2) + O(1). - Charles R Greathouse IV, Oct 31 2013
a(n) = floor(1/(1-x)) with x^n = 1/2: f(n) = 1/(2^(1/n)-1) is never an integer for n > 1, whence floor(f(n)+1) = ceiling(f(n)) = a(n). - M. F. Hasler, Nov 02 2013, and Gabriel Conant, May 01 2016

Extensions

Edited by Dean Hickerson, Dec 17 2002
Initial terms a(0) = 1 and a(1) = 2 added by M. F. Hasler, Nov 02 2013

A129935 Numbers n such that ceiling( 2/(2^(1/n)-1) ) is not equal to floor( 2n/log(2) ).

Original entry on oeis.org

777451915729368, 140894092055857794, 1526223088619171207, 3052446177238342414, 54545811706258836911039145, 624965662836733496131286135873807507, 1667672249427111806462471627630318921648499, 36465374036664559522628534720215805439659141
Offset: 1

Views

Author

Richard Stanley, Apr 30 2007 (who sent a(1))

Keywords

Comments

If n belongs to this sequence and m = ceiling(2/(2^(1/n)-1)), then 0 < m/(2n) - 1/log(2) < (log(2)/3) * (1/(2n)^2) implying that m/(2n) is a convergent of 1/log(2) (note that m and 2n are not necessarily coprime). - Max Alekseyev, Jun 06 2007
From David Applegate, Jun 07 2007: (Start)
"Some background to Max Alekseyev's comments: The key point is that the Laurent series for 2/(2^(1/n)-1) about n=infinity is 2/log(2)*n - 1 + (1/6)*log(2)/n + O(1/n^3).
"Also, since 2/log(2) is irrational, 2n/log(2) is never integral, so floor(2n/log(2)) = ceiling(2n/log(2)-1).
"So the question becomes: when is 2n/log(2)-1 so close to an integer that 2/(2^(1/n)-1) is on the other side of the integer? That is why the continued fraction expansion of 2/log(2) is relevant." (End)
The appropriate generalization of ceiling(2/(2^(1/n)-1)) = ? floor(2n/log(2)) is floor(a/(b^(1/n)-1)+a/2) = ceiling(an/log(b)). When a=2, the a/2 can be hidden in floor() + 1 = ceiling(). - David Applegate, Jun 08 2007 [edited Jun 11 2007]

References

  • S. W. Golomb and A. W. Hales, "Hypercube Tic-Tac-Toe", in "More Games of No Chance", ed. R. J. Nowakowski, MSRI Publications 42, Cambridge University Press, 2002, pp. 167-182. Here it is stated that the first counterexample is at n=6847196937, an error due to faulty multiprecision arithmetic. The correct value was found by J. Buhler in 2004 and is reported in S. Golomb, "Martin Gardner and Tictacktoe," in Demaine, Demaine, and Rodgers, eds., A Lifetime of Puzzles, A K Peters, 2008, pp. 293-301.
  • Dean Hickerson, Email to Jon Perry and N. J. A. Sloane, Dec 16 2002. Gives first three terms: 777451915729368, 140894092055857794, 1526223088619171207, as well as five later terms. - N. J. A. Sloane, Apr 30 2014

Crossrefs

Cf. A078608 for the sequence ceiling( 2/(2^(1/n)-1) ).

Programs

  • Mathematica
    (* Mma 9.0.1 code from Bill Gosper, Mar 15 2013. He comments: "This reproduces the hundred values in the b-file, and probably works up to around half a billion digits. When Mathematica gets fixed, change 999999999 to infinity." *)
    $MaxExtraPrecision = 999999999; For[{lo = {0, 1}, hi = {1, 0}, nu = {0, 0}, n = 0}, nu[[2]] < 10^386, nu = lo + hi; For[{k = nu[[2]]}, Floor[k*2/Log[2]] != Ceiling[2/(2^(1/k) - 1)], k += nu[[2]], Print[{++n, k}]];
      If[nu[[1]]*Log[2] > 2*nu[[2]], hi = nu, lo = nu]]
  • PARI
    prec=1500;default(realprecision,prec);c=contfrac(log(2)/2);default(realprecision,prec*2+50); i=0;for(n=2,#c-1, cand=contfracpnqn(vecextract(c,2^n-1))[1,1];forstep(m=cand,c[n+1]*cand,cand, if(ceil(2/(2^(1/m)-1)) != floor(2*m/log(2)), i++;print(i" "m), break))) /* Phil Carmody, Mar 20 2013 */

Extensions

More terms from Max Alekseyev, Jun 06 2007
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 08 2007

A078609 Least positive integer x such that 2*x^n>(x+3)^n.

Original entry on oeis.org

8, 12, 16, 21, 25, 29, 34, 38, 42, 47, 51, 55, 60, 64, 68, 73, 77, 81, 86, 90, 94, 99, 103, 107, 112, 116, 120, 125, 129, 133, 138, 142, 146, 150, 155, 159, 163, 168, 172, 176, 181, 185, 189, 194, 198, 202, 207, 211, 215, 220, 224, 228, 233, 237, 241, 246, 250
Offset: 2

Views

Author

Jon Perry, Dec 09 2002

Keywords

Examples

			a(2)=8 as 7^2=49, 8^2=64, 10^2=100 and 11^2=121.
		

Crossrefs

Programs

  • PARI
    for (n=2,50, x=2; while (2*x^n<=((x+3)^n),x++); print1(x","))

Formula

a(n) = ceiling(3/(2^(1/n)-1)). For most n, a(n) = floor(3n/log(2)-1/2), but there are exceptions, starting with n=32 and n=52113.

Extensions

Edited by Dean Hickerson, Dec 17 2002

A258703 a(n) = floor(n/sqrt(2) - 1/2).

Original entry on oeis.org

0, 0, 1, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 10, 10, 11, 12, 12, 13, 14, 15, 15, 16, 17, 17, 18, 19, 20, 20, 21, 22, 22, 23, 24, 24, 25, 26, 27, 27, 28, 29, 29, 30, 31, 32, 32, 33, 34, 34, 35, 36, 36, 37, 38, 39, 39, 40, 41, 41, 42, 43, 44, 44, 45, 46, 46, 47, 48, 48, 49, 50, 51, 51, 52, 53, 53
Offset: 1

Views

Author

N. J. A. Sloane, Jun 09 2015

Keywords

Comments

From Michel Dekking, Aug 11 2022: (Start)
By definition, (a(n)) is an inhomogeneous Beatty sequence. The associated Sturmian word is s(alpha, rho) = (floor((n + 1)*alpha + rho) - floor(n*alpha + rho), n= 0, 1, 2,...) = 1,0,1,1,1,0,1,1,0,1,1,..., with slope alpha = sqrt(2)/2, and intercept rho = -1/2.
Also, s(alpha, rho) = s(alpha,rho+1) - 1. Since 0 < alpha < 1 and 0 < rho +1 < 1, with algebraic conjugates
alpha* = -sqrt(2)/2, and (rho +1)* = 1/2,
Yasutomi's criterion gives that s(alpha, rho) is fixed point of a morphism.
The morphism can be found following the ideas of Chapter 2 in Lothaire's book and Section 4 of my paper "Substitution invariant Sturmian words and binary trees" (cf. A006340).
For a better fit with the literature we will determine the morphism that fixes the binary complement s(1-alpha, 1-(1+rho) ) = 0,1,0,0,0,1,0,0,1,0,0....
Let psi_1 and psi_8 be the elementary Sturmian morphisms given by
psi_1(0)=01 , psi_1(1)=0; psi_8(0)=01, psi(8)1=1.
Let psi := psi_1 psi_8. Then psi is given by
psi(0)=010 , psi(1)=0.
We see that psi fixes the Octanacci sequence A324772.
That psi is the right morphism can be proved by checking that (x,y) = (1-alpha, -rho) is fixed point of the composition T_1 T_8 of the fractional linear maps
T_1(x,y) = ((1-x)/(2-x), (1-y)/(2-x)),
T_8(x,y) = ((1/(2-x), y/(2-x))).
Conclusion, taking the binary complement of psi: the Sturmian word equals A104521. (End)

Crossrefs

Programs

  • Haskell
    a258703 = floor . (/ 2) . subtract 1 . (* sqrt 2) . fromIntegral
    -- Reinhard Zumkeller, Jun 09 2015
    
  • Magma
    [Floor(n/Sqrt(2) - 1/2): n in [1..80]]; // Vincenzo Librandi, Jun 09 2015
    
  • Mathematica
    Table[Floor[n/Sqrt[2] - 1/2], {n, 1, 100}] (* Vincenzo Librandi, Jun 09 2015 *)
  • PARI
    vector(100, n, n--; floor(n/sqrt(2) - 1/2)) \\ G. C. Greubel, Sep 30 2018

Formula

a(n) = floor(1/(exp(sqrt(2)/n)-1)) for all positive integers n [O'Bryant].
a(n) = floor((n*sqrt(2) - 1) / 2). - Reinhard Zumkeller, Jun 09 2015

Extensions

Offset changed from 0 to 1 Michel Dekking, Aug 11 2022

A342831 a(n) is the smallest positive integer k such that the n-dimensional cube [0,k]^n contains at least as many internal lattice points as external lattice points.

Original entry on oeis.org

3, 6, 9, 12, 15, 18, 21, 24, 26, 29, 32, 35, 38, 41, 44, 47, 50, 52, 55, 58, 61, 64, 67, 70, 73, 76, 78, 81, 84, 87, 90, 93, 96, 99, 101, 104, 107, 110, 113, 116, 119, 122, 125, 127, 130, 133, 136, 139, 142, 145, 148, 151, 153, 156, 159, 162, 165, 168, 171, 174, 177, 179, 182
Offset: 1

Views

Author

Gary Yane, Mar 23 2021

Keywords

Examples

			a(2) > 5 because the number of internal lattice points = 4^2 = 16 < 20 = 6^2 - 16 = the number of external lattice points, therefore a(2)=6 because the number of internal lattice points = 5^2 = 25 > 24 = 7^2 - 25 = number of external lattice points.
		

Crossrefs

Cf. A078608.

Programs

  • Maple
    a:= n-> ceil(1+2/(2^(1/n)-1)):
    seq(a(n), n=1..65);  # Alois P. Heinz, Apr 20 2021
  • Mathematica
    a[1] = 3; a[n_] := Floor[2^(1/n + 1)/(2^(1/n) - 1)]; Array[a, 100] (* Amiram Eldar, Mar 31 2021 *)

Formula

a(1) = 3 and a(n) = floor(2^(1/n+1)/(2^(1/n)-1)) for n > 1.
a(n) = A078608(n) + 1.
Showing 1-5 of 5 results.