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.

A140868 a(n) = floor(floor(n*alpha)*alpha) where alpha = 1+sqrt(2) = A014176.

Original entry on oeis.org

4, 9, 16, 21, 28, 33, 38, 45, 50, 57, 62, 67, 74, 79, 86, 91, 98, 103, 108, 115, 120, 127, 132, 137, 144, 149, 156, 161, 168, 173, 178, 185, 190, 197, 202, 207, 214, 219, 226, 231, 236, 243, 248, 255, 260, 267, 272, 277, 284, 289, 296, 301, 306, 313, 318, 325, 330, 337, 342, 347, 354, 359, 366, 371, 376, 383
Offset: 1

Views

Author

N. J. A. Sloane, Sep 04 2008

Keywords

Comments

The sequence of first differences d = 5,7,5,7,5,5,7,... of this sequence, given by d(n) := a(n+1) - a(n), is equal to the fixed point of the morphism 5 -> 57, 7 -> 575. See Example 6 in my paper "Morphic words, Beatty sequences and integer images of the Fibonacci language". Modulo a change of alphabet, the sequence d occurs at many places in OEIS. See A006337, A159684, A080763, A276862, A276864. - Michel Dekking, Feb 18 2020

Crossrefs

Programs

  • Magma
    [Round(Floor((1+Sqrt(2))*Floor(n*(1+Sqrt(2))))): n in [1..100]]; // G. C. Greubel, Sep 27 2018
    
  • Maple
    Digits := 200: a014176:= 1+sqrt(2) : A140868 := proc(n) global a014176 ; floor(a014176*floor(n*a014176)) ; end: for n from 1 to 100 do printf("%d,",A140868(n)); end: # R. J. Mathar, Sep 05 2008
  • Mathematica
    With[{p = 1+Sqrt[2]}, Table[Floor[p*Floor[n*p]], {n, 1, 100}]] (* G. C. Greubel, Sep 27 2018 *)
  • PARI
    vector(100, n, round(floor((1+sqrt(2))*floor(n*(1+sqrt(2)))))) \\ G. C. Greubel, Sep 27 2018
    
  • Python
    from sympy import integer_nthroot
    def A140868(n):
        f = lambda n: n+integer_nthroot(2*n**2,2)[0]
        return f(f(n)) # Chai Wah Wu, Mar 17 2021

Formula

a(n)= A003151(A003151(n)). - Michel Dekking, Feb 18 2020

Extensions

Corrected definition and extended by R. J. Mathar, Sep 05 2008