A097509 a(n) is the number of times that n occurs as floor(k * sqrt(2)) - k.
3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2
Offset: 0
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
- Manjul Bhargava, Kiran Kedlaya, and Lenny Ng, Solutions to the 81st William Lowell Putnam Mathematical Competition
- Putnam Competitions, The 81st William Lowell Putnam Mathematical Competition, Saturday, February 20, 2021, Problems.
- Putnam Competitions, The 81st William Lowell Putnam Mathematical Competition, Saturday, February 20, 2021, Problems [Local copy of Problem B6.]
- Putnam Competitions, The 81st William Lowell Putnam Mathematical Competition, Saturday, February 20, 2021, Solutions from Manjul Bhargava, Kiran Kedlaya, and Lenny Ng.
- Putnam Competitions, The 81st William Lowell Putnam Mathematical Competition, Saturday, February 20, 2021, Solutions from Manjul Bhargava, Kiran Kedlaya, and Lenny Ng [Local copy of first solution to Problem B6.]
- Luke Schaeffer, Jeffrey Shallit, and Stefan Zorcic, Beatty Sequences for a Quadratic Irrational: Decidability and Applications, arXiv:2402.08331 [math.NT], 2024. See pp. 17-19.
- N. J. A. Sloane, Families of Essentially Identical Sequences, Mar 24 2021 (Includes this sequence)
Crossrefs
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
Programs
-
Maple
S:= [seq(floor(n*sqrt(2))-n, n=0..1000)]: seq(numboccur(i,S),i=0..max(S)); # Robert Israel, Mar 13 2016
-
Mathematica
f[n_] := Floor[n/Cos[Pi/4]] - n; d = Array[f, 500, 0]; Tally[ Array[ f, 254, 0]][[All, 2]] (* Robert G. Wilson v, Aug 21 2014 *)
-
Python
from math import isqrt def A097509(n): return 1-isqrt(m:=n**2<<1)+isqrt(m+(n<<2)+2) if n else 3 # Chai Wah Wu, May 24 2025
Formula
a(n) = A006337(n)-1. - Robert G. Wilson v, Aug 21 2014
Conjecture: a(n+1) = A082844(n). - Benedict W. J. Irwin, Mar 13 2016
A245219 appears to be another sequence identical to this one.
Extensions
More terms from Robert G. Wilson v, Aug 21 2014
Comments