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.

A130568 Generalized Beatty sequence 1+2*floor(n*phi), which contains infinitely many primes.

Original entry on oeis.org

1, 3, 7, 9, 13, 17, 19, 23, 25, 29, 33, 35, 39, 43, 45, 49, 51, 55, 59, 61, 65, 67, 71, 75, 77, 81, 85, 87, 91, 93, 97, 101, 103, 107, 111, 113, 117, 119, 123, 127, 129, 133, 135, 139, 143, 145, 149, 153, 155, 159, 161, 165, 169, 171, 175, 177, 181, 185, 187, 191, 195
Offset: 0

Views

Author

Jonathan Vos Post, Aug 09 2007

Keywords

Comments

The primes in this entirely odd sequence begin 3, 7, 13, 17, 19, 23, 29. By the theorems in Banks, there are an infinite number of primes in this sequence.
Conjecture: Sequence gives n of A163873 whose connection to a(n) crosses (in the tree of A163873) another path. Is this generalizable in any way for A163874, A163875? - Daniel Platt (d.platt(AT)web.de), Sep 14 2009

Examples

			a(0) = 1 + 2*floor(0*phi) = 1 + 2*0 = 1.
a(1) = 1 + 2*floor(1*phi) = 1 + 2*floor(1.6180) = 1 + 2*1 = 3.
a(2) = 1 + 2*floor(2*phi) = 1 + 2*floor(3.2360) = 1 + 2*3 = 7.
a(3) = 1 + 2*floor(3*phi) = 1 + 2*floor(4.8541) = 1 + 2*4 = 9.
a(4) = 1 + 2*floor(4*phi) = 1 + 2*floor(6.4721) = 1 + 2*6 = 13.
a(5) = 1 + 2*floor(5*phi) = 1 + 2*floor(8.0901) = 1 + 2*8 = 17.
a(6) = 1 + 2*floor(6*phi) = 1 + 2*floor(9.7082) = 1 + 2*9 = 19.
a(7) = 1 + 2*floor(7*phi) = 1 + 2*floor(11.3262) = 1 + 2*11 = 23.
a(8) = 1 + 2*floor(8*phi) = 1 + 2*floor(12.9442) = 1 + 2*12 = 25.
a(9) = 1 + 2*floor(9*phi) = 1 + 2*floor(14.5623) = 1 + 2*14 = 29.
a(10) = 1 + 2*floor(10*phi) = 1 + 2*floor(16.1803) = 1 + 2*16 = 33.
		

Crossrefs

Cf. A001622.

Programs

  • Magma
    [1+2*Floor(n*((1+Sqrt(5))/2)): n in [0..60]]; // Vincenzo Librandi, Sep 17 2015
    
  • Mathematica
    Table[1 + 2*Floor[n*(Sqrt[5] + 1)/2], {n, 0, 80}] (* Stefan Steinerberger, Aug 10 2007 *)
  • Python
    from math import isqrt
    def A130568(n): return (n+isqrt(5*n**2)&-2)|1 # Chai Wah Wu, May 22 2025

Formula

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

Extensions

More terms from Stefan Steinerberger, Aug 10 2007