[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a197879 -id:a197879
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = 1 if the integer multiple of phi nearest n is greater than n, otherwise 0, where phi = (1+sqrt(5))/2.
+10
28
0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1
OFFSET
0,1
COMMENTS
From Fred Lunnon, Jun 20 2008: (Start)
Partition the positive integers into two sets A_0 and A_1 defined by A_k == { n | a(n) = k }; so A_0 = A005653 = { 2, 4, 5, 7, 10, 12, 13, 15, 18, 20, ... }, A_1 = A005652 = { 1, 3, 6, 8, 9, 11, 14, 16, 17, 19, 21, ... }.
Then form the sets of sums of pairs of distinct elements from each set and take the complement of their union: this is the Fibonacci numbers { 1, 2, 3, 5, 8, 13, 21, 34, 55, ... } (see the Chow article). (End)
The Chow-Long paper gives a connection with continued fractions, as well as generalizations and other references for this and related sequences.
This is the complement of A089809; also a(n) = 1 iff A024569(n) = 1. - Gary W. Adamson, Nov 11 2003
Since (n*phi) is equidistributed, s(n):=(Sum_{k=1..n}a(k))/n converges to 1/2, but actually s(n) is exactly equal to 1/2 for many values of n. These values are given by A194402. - Michel Dekking, Sep 30 2016
From Clark Kimberling and Jianing Song, Sep 09 2019: (Start)
Suppose that k >= 2, and let a(n) = floor(n*k*r) - k*floor(n*r) = k*{n*r} - {n*k*r}, an integer strictly between 0 and k, where {} denotes fractional part. For h = 0,1,...,k-1, let s(h) be the sequence of positions of h in {a(n)}. The sets s(h) partition the positive integers. Although a(n)/n -> k, the sequence a(n)-k*n appears to be unbounded.
Guide to related sequences, for k = 2:
** r ********* {a(n)} positions of 0's positions of 1's
(1+sqrt(5))/2 A078588 A005653 A005652
Guide to related sequences, for k = 3:
** r ********* {a(n)} pos. of 0's pos. of 1's pos. of 2's
Guide to related sequences, for k = 4:
** r ********* {a(n)} pos. of 0's pos. of 1's pos. of 2's pos. of 3's
(End)
REFERENCES
D. L. Silverman, J. Recr. Math. 9 (4) 208, problem 567 (1976-77).
LINKS
K. Alladi et al., On additive partitions of integers, Discrete Math., 22 (1978), 201-211.
T. Y. Chow and C. D. Long, Additive partitions and continued fractions, Ramanujan J., 3 (1999), 55-72 [set alpha=(1+sqrt(5))/2 in Theorem 2 to get A005652 and A005653].
FORMULA
a(n) = floor(2*phi*n) - 2*floor(phi*n) where phi denotes the golden ratio (1 + sqrt(5))/2. - Fred Lunnon, Jun 20 2008
a(n) = 2{n*phi} - {2n*phi}, where { } denotes fractional part. - Clark Kimberling, Jan 01 2007
a(n) = n + 1 + ceiling(n*sqrt(5)) - 2*ceiling(n*phi) where phi = (1+sqrt(5))/2. - Benoit Cloitre, Dec 05 2002
a(n) = round(phi*n) - floor(phi*n). - Michel Dekking, Sep 30 2016
a(n) = (n+floor(n*sqrt(5))) mod 2. - Chai Wah Wu, Aug 17 2022
MATHEMATICA
f[n_] := Block[{k = Floor[n/GoldenRatio]}, If[n - k*GoldenRatio > (k + 1)*GoldenRatio - n, 1, 0]]; Table[ f[n], {n, 0, 105}]
r = (1 + Sqrt[5])/2; z = 300;
t = Table[Floor[2 n*r] - 2 Floor[n*r], {n, 0, z}]
(* Clark Kimberling, Aug 26 2019 *)
PROG
(PARI) a(n)=if(n, n+1+ceil(n*sqrt(5))-2*ceil(n*(1+sqrt(5))/2), 0) \\ (changed by Jianing Song, Sep 10 2019 to include a(0) = 0)
(Python)
from math import isqrt
def A078588(n): return (n+isqrt(5*n**2))&1 # Chai Wah Wu, Aug 17 2022
KEYWORD
easy,nonn
AUTHOR
Robert G. Wilson v, Dec 02 2002
EXTENSIONS
Edited by N. J. A. Sloane, Jun 20 2008, at the suggestion of Fred Lunnon
Edited by Jianing Song, Sep 09 2019
Offset corrected by Jianing Song, Sep 10 2019
STATUS
approved
a(n) = floor(n*(sqrt(2)-1)).
+10
7
0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 16, 16, 16, 17, 17, 18, 18, 19, 19, 19, 20, 20, 21, 21, 21, 22, 22, 23, 23, 24, 24, 24, 25, 25, 26, 26, 26, 27, 27, 28, 28, 28, 29, 29, 30, 30, 31, 31, 31
OFFSET
0,6
COMMENTS
Old name was: Differences between floor(n*sqrt(2)) and n.
LINKS
Heinz H. Bauschke, Minh N. Dao, and Scott B. Lindstrom, The Douglas-Rachford algorithm for a hyperplane and a doubleton, arXiv:1804.08880 [math.OC], 2018.
Marcel Celaya and Frank Ruskey, Morphic Words and Nested Recurrence Relations, arXiv preprint arXiv:1307.0153 [math.CO], 2013.
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-18.
FORMULA
a(n) = (floor(n / cos(45 degrees))) - n.
a(n) = A001951(n) - n. - R. J. Mathar, Sep 19 2010
a(n) = floor((sqrt(2)-1)*n). [Celaya-Ruskey] - N. J. A. Sloane, Nov 14 2013
a(2*n) = 2*a(n) + A197879(n). - Robert Israel, Aug 21 2014
MAPLE
seq(floor(n*sqrt(2)) - n, n = 0 .. 100); # Robert Israel, Aug 21 2014
MATHEMATICA
Table[Floor[n Sqrt[2]]-n, {n, 0, 80}] (* Harvey P. Dale, Dec 04 2014 *)
PROG
(PARI) a(n)=sqrtint(2*n^2)-n \\ Charles R Greathouse IV, Sep 02 2015
(Magma) [Floor(n*Sqrt(2)) - n: n in [0..100]]; // G. C. Greubel, Mar 27 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Odimar Fabeny, Aug 26 2004
EXTENSIONS
Extended by R. J. Mathar, Sep 19 2010
Definition edited by Robert Israel, Aug 21 2014
Name changed by Michel Dekking, Jul 01 2023
STATUS
approved
a(n) = [(b*n+c)*r] - b*[n*r] - [c*r], where (r,b,c)=(sqrt(3),2,0) and [ ] = floor.
+10
4
1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1
OFFSET
1
COMMENTS
Write a(n) = [(b*n+c)*r] - b*[n*r] - [c*r]. If r>0 and b and c are integers satisfying b >= 2 and 0 <= c <= b-1, then 0 <= a(n) <= b. The positions of 0 in the sequence a are of interest, as are the position sequences for 1,2,...,b. These b+1 position sequences comprise a partition of the positive integers.
Examples:
(golden ratio,2,1): A190427-A190430
(sqrt(2),2,0): A197879, A120243, A120749
(sqrt(2),2,1): A190483-A190486
(sqrt(2),3,0): A190487-A190490
(sqrt(2),3,1): A190491-A190495
(sqrt(2),3,2): A190496-A190500
(sqrt(2),4,c): A190544-A190566
(sqrt(3),2,0): A190669-A190671
LINKS
FORMULA
a(n) = floor(2*n*sqrt(3)) - 2*floor(n*sqrt(3)).
MATHEMATICA
r = Sqrt[3]; b = 2; c = 0;
f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
t = Table[f[n], {n, 1, 200}] (* A190669 *)
Flatten[Position[t, 0]] (* A190670 *)
Flatten[Position[t, 1]] (* A190671 *)
PROG
(PARI) for(n=1, 100, print1(floor(2*n*sqrt(3)) - 2*floor(n*sqrt(3)), ", ")) \\ G. C. Greubel, Apr 20 2018
(Magma) [Floor(2*n*Sqrt(3)) - 2*Floor(n*Sqrt(3)): n in [1..100]]; // G. C. Greubel, Apr 20 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 16 2011
STATUS
approved
a(n) = floor(2*(1 + sqrt(2))*n).
+10
3
4, 9, 14, 19, 24, 28, 33, 38, 43, 48, 53, 57, 62, 67, 72, 77, 82, 86, 91, 96, 101, 106, 111, 115, 120, 125, 130, 135, 140, 144, 149, 154, 159, 164, 168, 173, 178, 183, 188, 193, 197, 202, 207, 212, 217, 222, 226, 231, 236, 241, 246, 251, 255, 260, 265, 270
OFFSET
1,1
COMMENTS
First differences are 4 and 5. Also, there is no immediate pattern in parity of a(n).
Are similar sequences well defined (in terms of rounding problems)? See also A086843, A086844, A196468.
Answer: I would not call the sequences A086843, A086844, A196468 'similar' to (a(n)). The first differences d =5,5,5,5,4,5,5,5,5,4,... are a Sturmian sequence (d(n)) with slope alpha = 2 + sqrt(8) and intercept 0. We give d offset 0 by setting d(0):=4. By Hofstadter's Fundamental Theorem of eta-sequences, the chunks 45555 and 455555 occur following a Sturmian sequence with density beta = (sqrt(8) - 2)/(3 - sqrt(8)). Since beta = 2 + sqrt(8) = alpha, the sequence (d(n)) is fixed point of the substitution 4->45555, 5->455555. See A197879 for a complete description of the parity pattern of (a(n)). - Michel Dekking, Jan 24 2017
LINKS
D. R. Hofstadter, Eta-Lore [Cached copy, with permission]
N. J. A. Sloane, Families of Essentially Identical Sequences, Mar 24 2021 (Includes this sequence)
FORMULA
a(n) = A003151(2n). - R. J. Mathar, Oct 20 2011
MATHEMATICA
Table[Floor[((2+Sqrt[8]))*n], {n, 100}]
PROG
(PARI) a(n)=2*n+sqrtint(8*n^2) \\ Charles R Greathouse IV, Oct 25 2011
(Magma) [Floor(2*(1 + Sqrt(2))*n): n in [1..100]]; // G. C. Greubel, Aug 18 2018
CROSSREFS
Cf. A001030. - Michel Dekking, Jan 24 2017
A bisection of A003151.
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Oct 18 2011
STATUS
approved
Let c(1) = c(2) = 0, c(3) = 1, and c(n + 3) = (c(n) - 2*c(n + 1) + c(n + 2))/n, then a(n) = ceiling (c(n)).
+10
0
0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1
OFFSET
0,1
COMMENTS
Conjectured quasiperiodicity with autocorrelation function R(x) = 1/2 if x = 0, 1/4 if x > 0.
Some other proved or conjectured (or suspected) nonperiodic binary sequences where there are no more than two consecutive 0's or 1's include: A083035, A285305, A190843, A286059, A288213, A288551, A288473, A176405, A188321, A188398, A191162, A272170, A197879, A078588, A272532, A273129, A074937, A188297, A289128. Others?
MATHEMATICA
c[n_]:=c[n]=(c[n-1]-2c[n-2]+c[n-3])/n;
c[1] = 0; c[2] = 0; c[3] = 1;
Table[Ceiling@c[j], {j, 1, 2^7}]
KEYWORD
nonn
AUTHOR
Andres Cicuttin, Oct 11 2020
STATUS
approved

Search completed in 0.009 seconds