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.

A003152 A Beatty sequence: a(n) = floor(n*(1+1/sqrt(2))).

Original entry on oeis.org

1, 3, 5, 6, 8, 10, 11, 13, 15, 17, 18, 20, 22, 23, 25, 27, 29, 30, 32, 34, 35, 37, 39, 40, 42, 44, 46, 47, 49, 51, 52, 54, 56, 58, 59, 61, 63, 64, 66, 68, 69, 71, 73, 75, 76, 78, 80, 81, 83, 85, 87, 88, 90, 92, 93, 95, 97, 99, 100, 102, 104, 105, 107, 109, 110, 112, 114, 116
Offset: 1

Views

Author

Keywords

Comments

Numbers with an even number of trailing 0's in their minimal representation in terms of the positive Pell numbers (A317204). - Amiram Eldar, Mar 16 2022
The indices of the squares in the sequence of squares and twice squares: A028982(a(n)) = n^2. - Amiram Eldar, Apr 13 2025

References

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

Crossrefs

Complement of A003151.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A003151 as the parent: A003151, A001951, A001952, A003152, A006337, A080763, A082844 (conjectured), A097509, A159684, A188037, A245219 (conjectured), A276862. - N. J. A. Sloane, Mar 09 2021
Bisections: A001952, A001954.

Programs

  • Magma
    [Floor(n*(1+1/Sqrt(2))): n in [1..70]]; // Vincenzo Librandi, Dec 26 2015
    
  • Maple
    Digits := 100: t := evalf(1+sin(Pi/4)): A:= n->floor(t*n): seq(floor((t*n)),n=1..68); # Zerinvary Lajos, Mar 27 2009
  • Mathematica
    Table[Floor[n (1 + 1/Sqrt[2])], {n, 70}] (* Vincenzo Librandi, Dec 26 2015 *)
  • PARI
    a(n)=n+sqrtint(2*n^2)\2 \\ Charles R Greathouse IV, Jan 25 2022
    
  • Python
    from math import isqrt
    def A003152(n): return n+isqrt(n**2>>1) # Chai Wah Wu, May 24 2025