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.

A252169 Beatty sequence for sqrt(Pi*phi) where phi is the golden ratio A001622.

Original entry on oeis.org

2, 4, 6, 9, 11, 13, 15, 18, 20, 22, 24, 27, 29, 31, 33, 36, 38, 40, 42, 45, 47, 49, 51, 54, 56, 58, 60, 63, 65, 67, 69, 72, 74, 76, 78, 81, 83, 85, 87, 90, 92, 94, 96, 99, 101, 103, 105, 108, 110, 112, 114, 117, 119, 121, 124, 126, 128, 130
Offset: 1

Views

Author

Karl V. Keller, Jr., Dec 15 2014

Keywords

Examples

			For n = 5, floor(5*sqrt(Pi*(1+sqrt(5))/2)) = 11.
		

Crossrefs

Cf. A000796 (Pi), A001622 (golden ratio, phi), A094886 (Pi*phi).
Cf. A253301 (complement).

Programs

  • Mathematica
    a252169[n_] := Floor[#*Sqrt[Pi*((1 + Sqrt[5])/2)]] & /@ Range@n; a252169[58] (* Michael De Vlieger, Dec 27 2014 *)
  • PARI
    vector(100,n,floor(n*sqrt(Pi*(1+sqrt(5))/2))) \\ Derek Orr, Dec 30 2014
  • Python
    from sympy import *
    for n in range(1,3001): print(floor(n*sqrt(pi*(1+sqrt(5))/2)),end=', ')
    

Formula

a(n) = floor(n*sqrt(Pi*phi)) = floor(n*sqrt(Pi*(1+sqrt(5))/2)).