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.

A330002 Beatty sequence for x, where 1/x + 1/(x+1)^2 = 1.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 21, 22, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 38, 39, 41, 42, 43, 44, 46, 47, 48, 49, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 63, 64, 66, 67, 68, 69, 71, 72, 73, 74, 76, 77, 78, 79, 81, 82, 83
Offset: 1

Views

Author

Clark Kimberling, Jan 04 2020

Keywords

Comments

Let x be the solution of 1/x + 1/(x+1)^2 = 1. Then (floor(n x) and (floor(n (x+1)^2))) are a pair of Beatty sequences; i.e., every positive integer is in exactly one of the sequences. See the Guide to related sequences at A329825.
Differs from A047201 first at A047201(85)=106, a(85)=105. - R. J. Mathar, Jan 11 2020

Crossrefs

Cf. A329825, A255249, A330003 (complement).

Programs

  • Maple
    A330002 := proc(n)
        local x;
        x := -2*cos(5*Pi/7) ;
        floor(n*x) ;
    end proc: # R. J. Mathar, Jan 11 2020
  • Mathematica
    r = x /. FindRoot[1/x + 1/(x+1)^2 == 1, {x, 2, 10}, WorkingPrecision -> 120]
    RealDigits[r][[1]] (* A255249 *)
    Table[Floor[n*r], {n, 1, 250}]       (* A330002 *)
    Table[Floor[n*(1+r)^2], {n, 1, 250}] (* A330003 *)

Formula

a(n) = floor(n*x), where x = 1.24697960371... is the constant in A255249.