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.

A063957 Numbers not of the form round(m*sqrt(2)) for any integer m, i.e., complement of A022846.

Original entry on oeis.org

2, 5, 9, 12, 15, 19, 22, 26, 29, 32, 36, 39, 43, 46, 50, 53, 56, 60, 63, 67, 70, 73, 77, 80, 84, 87, 90, 94, 97, 101, 104, 108, 111, 114, 118, 121, 125, 128, 131, 135, 138, 142, 145, 149, 152, 155, 159, 162, 166, 169, 172, 176, 179, 183, 186, 189, 193, 196, 200
Offset: 1

Views

Author

Henry Bottomley, Sep 04 2001

Keywords

Comments

Consider natural numbers A000027 as a triangle 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, etc., then the a(n) indicate rows without a square.
Similar to Beatty sequences: where a pair of complementary Beatty sequences are floor(n*c) and floor(n*c/(c-1)) for c an irrational constant > 1, these pairs of complementary sequences are in general round(n*c) and round((n-1/2)*c/(c-1)) for c an irrational constant > 1.
This sequence is an inhomogeneous Beatty sequence s(alpha,rho) with slope alpha = 2 + sqrt(2), and intercept rho = -1/2 - sqrt(2)/2. - Michel Dekking, Sep 15 2022
Let D := 3,4,3,3,4,3,4,3,3,4,3,4,3,4,3,3,4,3,... be the sequence of first differences of (a(n)). It follows from Yasutomi's criterion that D is NOT the fixed point of a morphism. - Michel Dekking, Sep 20 2022

Examples

			round(m*sqrt(2)) starts 1,3,4,6,7,8,10,11,13,... so this sequence must start 2,5,9,12,...
		

Crossrefs

Programs

  • PARI
    { f=2 + sqrt(2); t=f/2; for (n=1, 1000, write("b063957.txt", n, " ", round(n*f - t)) ) } \\ Harry J. Smith, Sep 03 2009
    
  • Python
    from math import isqrt
    def A063957(n): return (a:=(n<<1)-1)+(m:=isqrt(k:=a**2<<1)>>1)+int(((m<<1)+1)**2Chai Wah Wu, Feb 11 2025

Formula

a(n) = round((n - 1/2)*(2 + sqrt(2))) = round(n*3.4142...-1.7071...).