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.

Showing 1-10 of 23 results. Next

A080764 First differences of A049472, floor(n/sqrt(2)).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0
Offset: 0

Views

Author

Matthew Vandermast, Mar 25 2003

Keywords

Comments

Fixed point of the morphism 0->1, 1->110. - Benoit Cloitre, May 31 2004
As binary constant 0.1101101110110... = 0.85826765646... (A119812), see Fxtbook link. - Joerg Arndt, May 15 2011
Characteristic word with slope 1/sqrt(2) [see J. L. Ramirez et al.]. - R. J. Mathar, Jul 09 2013
From Peter Bala, Nov 22 2013: (Start)
Sturmian word: equals the limit word S(infinity) where S(0) = 0, S(1) = 1 and for n >= 1, S(n+1) = S(n)S(n)S(n-1).
More generally, for k = 0,1,2,..., we can define a sequence of words S_k(n) by S_k(0) = 0, S_k(1) = 0...01 (k 0's) and for n >= 1, S_k(n+1) = S_k(n)S_k(n)S_k(n-1). Then the limit word S_k(infinity) is a Sturmian word whose terms are given by a(n) = floor((n + 2)/(k + sqrt(2))) - floor((n + 1)/(k + sqrt(2))).
This sequence corresponds to the case k = 0. See A159684 (case k = 1) and A171588 (case k = 2). Compare with the Fibonacci words A005614, A221150, A221151 and A221152. See also A230901. (End)
For n > 0: a(A001951(n)) = 1, a(A001952(n)) = 0. - Reinhard Zumkeller, Jul 03 2015
Binary complement of the Pell word A171588. - Michel Dekking, Feb 22 2018

Examples

			From _Peter Bala_, Nov 22 2013: (Start)
The first few Sturmian words S(n) are
S(0) = 0
S(1) = 1
S(2) = 110
S(3) = 110 110 1
S(4) = 1101101 1101101 110
S(5) = 11011011101101110 11011011101101110 1101101
The lengths of the words are [1, 1, 3, 7, 17, 41, ...] = A001333.  (End)
		

Crossrefs

Programs

  • Haskell
    a080764 n = a080764_list !! n
    a080764_list = tail $ zipWith (-) (tail a049472_list) a049472_list
    -- Reinhard Zumkeller, Jul 03 2015
    
  • Maple
    A080764 := proc(n)
        alpha := 1/sqrt(2) ;
        floor((n+2)*alpha)-floor((n+1)*alpha) ;
    end proc: # R. J. Mathar, Jul 09 2013
  • Mathematica
    Nest[ Flatten[ # /. {0 -> 1, 1 -> {1, 1, 0}}] &, {1}, 7] (* Robert G. Wilson v, Apr 16 2005 *)
    NestList[ Flatten[ # /. {0 -> {1}, 1 -> {1, 0, 1}}] &, {1}, 5] // Flatten (* or *)
    t = Table[Floor[n/Sqrt[2]], {n, 111}]; Drop[t, 1] - Drop[t, -1] (* Robert G. Wilson v, Nov 03 2005 *)
    a[ n_] := With[{m = n + 1}, Floor[(m + 1) / Sqrt[2]] - Floor[m / Sqrt[2]]]; (* Michael Somos, Aug 19 2018 *)
  • PARI
    {a(n) = n++; my(k = sqrtint(n*n\2)); n*(n+2) > 2*k*(k+2)}; /* Michael Somos, Aug 19 2018 */
    
  • Python
    from math import isqrt
    def A080764(n): return (isqrt((m:=(n+2)**2)<<1)>>1)-(isqrt(m-(n<<1)-3<<1)>>1) # Chai Wah Wu, May 19 2025

Formula

a(n) = floor((n+2)*sqrt(2)/2) - floor((n+1)*sqrt(2)/2).
a(n) = A188295(n+2) for all n in Z. - Michael Somos, Aug 19 2018

A119812 Decimal expansion of the constant defined by binary sums involving Beatty sequences: c = Sum_{n>=1} A049472(n)/2^n = Sum_{n>=1} 1/2^A001951(n).

Original entry on oeis.org

8, 5, 8, 2, 6, 7, 6, 5, 6, 4, 6, 1, 0, 0, 2, 0, 5, 5, 7, 9, 2, 2, 6, 0, 3, 0, 8, 4, 3, 3, 3, 7, 5, 1, 4, 8, 6, 6, 4, 9, 0, 5, 1, 9, 0, 0, 8, 3, 5, 0, 6, 7, 7, 8, 6, 6, 7, 6, 8, 4, 8, 6, 7, 8, 8, 7, 8, 4, 5, 5, 3, 7, 9, 1, 9, 1, 2, 1, 1, 1, 9, 5, 4, 8, 7, 0, 4, 9, 8, 2, 7, 6, 0, 6, 4, 3, 1, 5, 3, 1, 0, 2, 5, 2
Offset: 0

Views

Author

Paul D. Hanna, May 26 2006

Keywords

Comments

Dual constant: A119809 = Sum_{n>=1} 1/2^A049472(n) = Sum_{n>=1} A001951(n)/2^n. The binary expansion of this constant is given by A080764 with offset n=1. Plouffe's Inverter describes approximations to this constant as "polylogarithms type of series with the floor function [ ]."

Examples

			c = 0.858267656461002055792260308433375148664905190083506778667684867..
Continued fraction (A119813):
c = [0;1,6,18,1032,16777344,288230376151842816,...]
where partial quotients are given by:
PQ[n] = 4^A000129(n-2) + 2^A001333(n-3) (n>2), with PQ[1]=0, PQ[2]=1.
The following are equivalent expressions for the constant:
(1) Sum_{n>=1} A049472(n)/2^n; A049472(n)=[n/sqrt(2)];
(2) Sum_{n>=1} 1/2^A001951(n); A001951(n)=[n*sqrt(2)];
(3) Sum_{n>=1} A080764(n)/2^n; A080764(n)=[(n+1)/sqrt(2)]-[n/sqrt(2)];
where [x] = floor(x).
These series illustrate the above expressions:
(1) c = 0/2^1 + 1/2^2 + 2/2^3 + 2/2^4 + 3/2^5 + 4/2^6 + 4/2^7 +...
(2) c = 1/2^1 + 1/2^2 + 1/2^4 + 1/2^5 + 1/2^7 + 1/2^8 + 1/2^9 +...
(3) c = 1/2^1 + 1/2^2 + 0/2^3 + 1/2^4 + 1/2^5 + 0/2^6 + 1/2^7 +...
		

Crossrefs

Cf. A119813 (continued fraction), A119814 (convergents); A119809 (dual constant); A000129 (Pell), A001333; Beatty sequences: A049472, A001951, A080764; variants: A014565 (rabbit constant), A073115.

Programs

  • PARI
    {a(n)=local(t=sqrt(2)/2,x=sum(m=1,10*n,floor(m*t)/2^m));floor(10^n*x)%10}

Extensions

Removed leading zero and corrected offset R. J. Mathar, Feb 05 2009

A119809 Decimal expansion of the constant defined by binary sums involving Beatty sequences: c = Sum_{n>=1} 1/2^A049472(n) = Sum_{n>=1} A001951(n)/2^n.

Original entry on oeis.org

2, 3, 2, 2, 5, 8, 8, 5, 2, 2, 5, 8, 8, 0, 6, 7, 7, 3, 0, 1, 2, 1, 4, 4, 0, 6, 8, 2, 7, 8, 7, 9, 8, 4, 0, 8, 0, 1, 1, 9, 5, 0, 2, 5, 0, 8, 0, 0, 4, 3, 2, 9, 2, 5, 6, 6, 5, 7, 1, 8, 0, 6, 2, 3, 9, 4, 4, 0, 5, 2, 1, 7, 5, 6, 0, 9, 6, 9, 5, 3, 9, 2, 0, 6, 2, 3, 5, 5, 7, 5, 0, 0, 7, 2, 3, 9, 1, 7, 7, 2, 2, 4, 7, 9, 7
Offset: 1

Views

Author

Paul D. Hanna, May 26 2006

Keywords

Comments

Dual constant: A119812 = Sum_{n>=1} A049472(n)/2^n = Sum_{n>=1} 1/2^A001951(n). Since this constant c = 2 + Sum_{n>=1} 1/2^A003151(n), where A003151(n) = n + floor(n*sqrt(2)), then the binary expansion of the fractional part of c has 1's only at positions given by Beatty sequence A003151(n) and zeros elsewhere. Plouffe's Inverter describes approximations to the fractional part of c as "polylogarithms type of series with the floor function [ ]."

Examples

			c = 2.32258852258806773012144068278798408011950250800432925665718...
Continued fraction (A119810):
c = [2;3,10,132,131104,2199023259648,633825300114114700748888473600,..]
where partial quotients are given by:
PQ(n) = 2^A001333(n-1) + 2^A000129(n-2) (n>1), with PQ(1)=2.
The following are equivalent expressions for the constant:
(1) Sum_{n>=1} 1/2^A049472(n); A049472(n)=[n/sqrt(2)];
(2) Sum_{n>=1} A001951(n)/2^n; A001951(n)=[n*sqrt(2)];
(3) Sum_{n>=1} 1/2^A003151(n) + 2; A003151(n)=[n*sqrt(2)]+n;
(4) Sum_{n>=1} 1/2^A097508(n) - 2; A097508(n)=[n*sqrt(2)]-n;
(5) Sum_{n>=1} A006337(n)/2^n + 1; A006337(n)=[(n+1)*sqrt(2)]-[n*sqrt(2)];
where [x] = floor(x).
These series illustrate the above expressions:
(1) c = 1/2^0 + 1/2^1 + 1/2^2 + 1/2^2 + 1/2^3 + 1/2^4 + 1/2^4 +...
(2) c = 1/2^1 + 2/2^2 + 4/2^3 + 5/2^4 + 7/2^5 + 8/2^6 + 9/2^7 +...
(3) c = 2 + 1/2^2 + 1/2^4 + 1/2^7 + 1/2^9 + 1/2^12 + 1/2^14 +...
(4) c =-2 + 1/2^0 + 1/2^0 + 1/2^1 + 1/2^1 + 1/2^2 + 1/2^2 + 1/2^2 +...
(5) c = 1 + 1/2^1 + 2/2^2 + 1/2^3 + 2/2^4 + 1/2^5 + 1/2^6 + 2/2^7 +...
		

Crossrefs

Cf. A119810 (continued fraction), A119811 (convergents); A119812 (dual constant); A000129 (Pell), A001333; Beatty sequences: A049472, A001951, A003151, A097508, A006337; variants: A014565 (rabbit constant), A073115.

Programs

  • PARI
    {a(n)=local(t=sqrt(2),x=sum(m=1,10*n,floor(m*t)/2^m));floor(10^n*x)%10}

Formula

Equals Sum(1/(2^q-1)) with the summation extending over all pairs of integers gcd(p,q) = 1, 0 < p/q < sqrt(2) (O'Bryant, 2002). - Amiram Eldar, May 25 2023

A119811 Numerators of the convergents to the continued fraction for the constant A119809 defined by binary sums involving Beatty sequences: c = Sum_{n>=1} 1/2^A049472(n) = Sum_{n>=1} A001951(n)/2^n.

Original entry on oeis.org

2, 7, 72, 9511, 1246930216, 2742028548141904733479, 1737967067447512977484869808775151193351704374584616
Offset: 1

Views

Author

Paul D. Hanna, May 26 2006

Keywords

Comments

The number of digits in these numerators are (beginning at n=1): [1,1,2,4,10,22,52,124,297,717,1729,4173,10074,24319,58709,141735,..].

Examples

			c = 2.32258852258806773012144068278798408011950250800432925665718...
Convergents begin:
[2/1, 7/3, 72/31, 9511/4095, 1246930216/536870911,...]
where the denominators of the convergents equal [2^A000129(n-1)-1]:
[1,3,31,4095,536870911,1180591620717411303423,...],
and A000129 is the Pell numbers.
		

Crossrefs

Cf. A119809 (constant), A119811 (continued fraction), A000129; A119812 (dual constant).

Programs

  • PARI
    {a(n)=local(M=contfracpnqn(vector(n,k,if(k==1,2, 2^round(((1+sqrt(2))^(k-1)+(1-sqrt(2))^(k-1))/2) +2^round(((1+sqrt(2))^(k-2)-(1-sqrt(2))^(k-2))/(2*sqrt(2))))))); return(M[1,1])}

A119813 Partial quotients of the continued fraction of the constant A119812 defined by binary sums involving Beatty sequences: c = Sum_{n>=1} A049472(n)/2^n = Sum_{n>=1} 1/2^A001951(n).

Original entry on oeis.org

0, 1, 6, 18, 1032, 16777344, 288230376151842816, 1393796574908163946345982392042721617379328
Offset: 1

Views

Author

Paul D. Hanna, May 26 2006

Keywords

Comments

Convergents begin: [0/1, 1/1, 6/7, 109/127, 112494/131071,...], where the denominators of the convergents are equal to [2^A001333(n-1)-1], where A001333 are numerators of continued fraction convergents to sqrt(2). The number of digits in these partial quotients are (beginning at n=2): [1,1,2,4,8,18,43,102,246,594,1432,3457,8345,20146,48636,117417,...].

Examples

			c = 0.858267656461002055792260308433375148664905190083506778667684867..
The partial quotients start:
a(1) = 0; a(2) = 1; a(3) = 4^1 + 2^1; a(4) = 4^2 + 2^1;
a(5) = 4^5 + 2^3; a(6) = 4^12 + 2^7; a(7) = 4^29 + 2^17;
and continue as a(n) = 4^A000129(n-2) + 2^A001333(n-3) where
A000129(n) = ( (1+sqrt(2))^n - (1-sqrt(2))^n )/(2*sqrt(2));
A001333(n) = ( (1+sqrt(2))^n + (1-sqrt(2))^n )/2.
		

Crossrefs

Cf. A119812 (constant), A119814 (convergents); A119809 (dual constant).

Programs

  • PARI
    {a(n)=if(n==1,0,if(n==2,1, 4^round(((1+sqrt(2))^(n-2)+(1-sqrt(2))^(n-2))/(2*sqrt(2))) +if(n==3,2,2^round(((1+sqrt(2))^(n-3)-(1-sqrt(2))^(n-3))/2))))}

Formula

a(n) = 4^A000129(n-2) + 2^A001333(n-3) for n>2, with a(1)=0, a(2)=1.

A119814 Numerators of the convergents to the continued fraction for the constant A119812 defined by binary sums involving Beatty sequences: c = Sum_{n>=1} A049472(n)/2^n = Sum_{n>=1} 1/2^A001951(n).

Original entry on oeis.org

0, 1, 6, 109, 112494, 1887350536045, 543991754934632523092182415214, 758213844806172103575972149363453352380811718063209070444420739586832237
Offset: 1

Views

Author

Paul D. Hanna, May 26 2006

Keywords

Comments

The number of digits in these numerators are (beginning at n=2): [1,1,3,6,13,30,72,174,420,1013,2444,5901,14245,34391,83027,...].

Examples

			c = 0.858267656461002055792260308433375148664905190083506778667684867..
Convergents begin:
[0/1, 1/1, 6/7, 109/127, 112494/131071, 1887350536045/2199023255551,..]
where the denominators of the convergents equal [2^A001333(n-1)-1]:
[1,1,7,127,131071,2199023255551,633825300114114700748351602687,...]
and A001333 is numerators of continued fraction convergents to sqrt(2).
		

Crossrefs

Cf. A119812 (constant), A119813 (continued fraction), A001333; A119809 (dual constant).

Programs

  • PARI
    {a(n)=local(M=contfracpnqn(vector(n,k,if(k==1,0,if(k==2,1, 4^round(((1+sqrt(2))^(k-2)+(1-sqrt(2))^(k-2))/(2*sqrt(2))) +if(k==3,2,2^round(((1+sqrt(2))^(k-3)-(1-sqrt(2))^(k-3))/2))))))); return(M[1,1])}

A119810 Partial quotients of the continued fraction of the constant defined by binary sums involving Beatty sequences: c = Sum_{n>=1} 1/2^A049472(n) = Sum_{n>=1} A001951(n)/2^n.

Original entry on oeis.org

2, 3, 10, 132, 131104, 2199023259648, 633825300114114700748888473600, 883423532389192164791648750371459257913741948437810659652423818057613312
Offset: 1

Views

Author

Paul D. Hanna, May 26 2006

Keywords

Comments

Convergents A119811: [2/1,7/3,72/31,9511/4095,1246930216/536870911,...], where the denominators of the convergents are equal to [2^A000129(n-1)-1] and A000129 is the Pell numbers. The number of digits in these partial quotients are (beginning at n=1): [1,1,2,3,6,13,30,72,174,420,1013,2445,5901,14246,34391,83027,...].

Examples

			c = 2.32258852258806773012144068278798408011950250800432925665718...
The partial quotients start:
a(1) = 2^1; a(2) = 2^1 + 2^0; a(3) = 2^3 + 2^1;
a(4) = 2^7 + 2^2; a(5) = 2^17 + 2^5; a(6) = 2^41 + 2^12;
and continue as a(n) = 2^A001333(n-1) + 2^A000129(n-2) where
A001333(n) = ( (1+sqrt(2))^n + (1-sqrt(2))^n )/2;
A000129(n) = ( (1+sqrt(2))^n - (1-sqrt(2))^n )/(2*sqrt(2)).
		

Crossrefs

Cf. A119809 (decimal expansion), A119811 (convergents); A119812 (dual constant).

Programs

  • Mathematica
    (* b = A001333 *) b[0] = 1; b[1] = 1; b[n_] := b[n] = 2 b[n-1] + b[n-2]; a[1] = 2; a[n_] := 2^b[n-1] + 2^Fibonacci[n-2, 2]; Array[a, 10] (* Jean-François Alcover, May 04 2017 *)
  • PARI
    {a(n)=if(n==1,2,2^round(((1+sqrt(2))^(n-1)+(1-sqrt(2))^(n-1))/2) +2^round(((1+sqrt(2))^(n-2)-(1-sqrt(2))^(n-2))/(2*sqrt(2))))}

Formula

a(n) = 2^A001333(n-1) + 2^A000129(n-2) for n>1, with a(1)=2.

A006337 An "eta-sequence": a(n) = floor( (n+1)*sqrt(2) ) - floor( n*sqrt(2) ).

Original entry on oeis.org

1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1
Offset: 1

Views

Author

D. R. Hofstadter, Jul 15 1977

Keywords

Comments

Defined by: (i) a(1) = 1; (ii) sequence consists of single 2's separated by strings of 1's; (iii) the sequence of lengths of runs of 1's in the sequence is equal to the sequence.
Equals its own "derivative", which is formed by counting the strings of 1's that lie between 2's.
First differences of A001951 (with a different offset). - Philippe Deléham, May 29 2006
Or number of perfect squares in interval (2*n^2, 2*(n+1)^2). In view of the uniform distribution mod 1 of sequence {sqrt(2)*n}, the density of 1's is 2-sqrt(2). - Vladimir Shevelev, Aug 05 2011
a(n) = number of repeating n's in A049472. - Reinhard Zumkeller, Jul 03 2015
Fixed point of the morphism 1 -> 12; 2 -> 121. - Jeffrey Shallit, Jan 19 2017
Also, let S be the increasing sequence of elements of the union N U N*sqrt(2), where N = {1, 2, 3, ...}. Then a(n) = { 1 if S(n) is integer, 2 if S(n) is irrational }. See A245222 for the analog with sqrt(3). - M. F. Hasler, Feb 06 2025

References

  • Douglas Hofstadter, "Fluid Concepts and Creative Analogies", Chapter 1: "To seek whence cometh a sequence".
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A006338. Exchanging 1's and 2's gives A080763. Essentially same as A004641 + 1.
Cf. A049472.
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
Cf. A245222 (an analog with sqrt(3) instead of sqrt(2)).

Programs

  • Haskell
    a006337 n = a006337_list !! (n-1)
    a006337_list = f [1] where
       f xs = ys ++ f ys where
              ys = concatMap (\z -> if z == 1 then [1,2] else [1,1,2]) xs
    -- Reinhard Zumkeller, May 06 2012
    
  • Maple
    Digits := 100; sq2 := sqrt(2.); A006337 := n->floor((n+1)*sq2)-floor(n*sq2);
  • Mathematica
    Flatten[ Table[ Nest[ Flatten[ # /. {1 -> {1, 2}, 2 -> {1, 1, 2}}] &, {1}, n], {n, 5}]] (* Robert G. Wilson v, May 06 2005 *)
    Differences[ Table[ Floor[ n*Sqrt[2]], {n, 1, 106}]] (* Jean-François Alcover, Apr 06 2012 *)
  • PARI
    a(n)=sqrt(2)*(n+1)\1-sqrt(2)*n\1 \\ Charles R Greathouse IV, Apr 06 2012
    
  • PARI
    a(n)=sqrtint(2*n^2+4*n+2)-sqrtint(2*n^2) \\ Charles R Greathouse IV, Apr 06 2012
    
  • Python
    from math import isqrt
    def A006337(n): return -isqrt(m:=n*n<<1)+isqrt(m+(n<<2)+2) # Chai Wah Wu, Aug 03 2022

Formula

Let S(0) = 1; obtain S(k) from S(k-1) by applying 1 -> 12, 2 -> 112; sequence is S(0), S(1), S(2), ... - Matthew Vandermast, Mar 25 2003
a(A003152(n)) = 1 and a(A003151(n)) = 2. - Philippe Deléham, May 29 2006
a(n) = A159684(n-1) + 1. - Filip Zaludek, Oct 28 2016

A049474 a(n) = ceiling(n/sqrt(2)).

Original entry on oeis.org

0, 1, 2, 3, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 10, 11, 12, 13, 13, 14, 15, 15, 16, 17, 17, 18, 19, 20, 20, 21, 22, 22, 23, 24, 25, 25, 26, 27, 27, 28, 29, 29, 30, 31, 32, 32, 33, 34, 34, 35, 36, 37, 37, 38, 39, 39, 40, 41, 42, 42, 43, 44, 44, 45, 46, 46, 47
Offset: 0

Views

Author

Keywords

Crossrefs

A099188(n) = 2*a(n).
Cf. A049472.

Programs

A367467 Lexicographically earliest infinite sequence of positive integers such that a(n + a(n)) is distinct for all n.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 2, 5, 6, 7, 1, 8, 9, 2, 10, 11, 12, 1, 13, 14, 2, 15, 16, 2, 17, 18, 19, 2, 20, 21, 2, 22, 23, 24, 1, 25, 26, 2, 27, 28, 2, 29, 30, 31, 2, 32, 33, 2, 34, 35, 36, 1, 37, 38, 2, 39, 40, 41, 1, 42, 43, 2, 44, 45, 2, 46, 47, 48, 1, 49, 50, 2, 51, 52, 53, 1, 54, 55, 2, 56, 57, 2, 58, 59, 60, 2, 61, 62, 2
Offset: 1

Views

Author

Neal Gersh Tolunsky, Nov 18 2023

Keywords

Comments

Consider each index i as a location from which one can jump a(i) terms forward. To find a(n) we have to check 2 conditions:
1. The value a(n) can be reached in one jump by at most one previous location.
2. Location n reaches a location in one jump that is not reached in one jump from a location before n.
Described in the above way, the sequence seems to be structured as follows:
A083051 appears to give the indices which cannot be reached from any earlier term; the terms at these indices are 1s and 2s.
A087057 appears to give the indices which can be reached from an earlier term; except for a(2), these terms are first occurrences.
From Thomas Scheuerle, Nov 26 2023: (Start)
Empirical observations:
It appears that this sequence consists of the natural numbers in ascending order interspersed by 1 and 2.
If we consider the distance between successive ones, we will observe a nonperiodic pattern: 9,7,17,17,7,10,7,17,7,10,... . It appears that there are only 7, 10 and 17 with the exception of 9 once.
If we consider the distance between successive twos, we will also observe an interesting nonperiodic pattern: 3,7,7,3,4,3,7,3,4,3,7,7,3,... . It appears that this pattern consists only of 3, 4 and 7. (End)

Examples

			Initial locations and the (by definition) distinct terms that they reach:
     n|  1  2  3  4  5  6  7  8  9
  a(n)|  1  1  2  2  3  4  2  5  6
          =>1=>2====>3
                   ====>4
                      =======>5
                            ====>6
When we evaluate a(i+a(i)) with each index i, we get a distinct value. When i=1, for example, a(1+a(1))=a(1+1)=a(2)=1;  no other i gives 1 as the solution to a(i+a(i)). When i=4, a(4+a(4))=a(4+2)=a(6)=4, and 4 is likewise a solution unique to i=4.
		

Crossrefs

Programs

  • MATLAB
    function a = A367467( max_n )
        a = [1 1:2*max_n];
        for n = 3:max_n
            a(n) = 1;
            while consistency(a, n) == false
                a(n) = a(n)+1;
            end
        end
        a = a(1:max_n);
    end
    function ok = consistency(a, n)
        v = a([1:n] + a(1:n));
        ok = (n == length(unique(v)));
    end % Thomas Scheuerle, Nov 21 2023

Formula

From Thomas Scheuerle, Nov 26 2023: (Start)
Conjectures:
a(n) = A049472(n) = floor(n*(1 + 1/sqrt(2))) - n, if n is not in A083051.
a(A083051(n)) = A184119(n+1) - A083051(n).
a(a(A083051(n)) + A083051(n)) + a(A083051(n)) + A083051(n) = A328987(n) = floor((a(A083051(n)) + A083051(n))*(1 + 1/sqrt(2))) = floor(A184119(n+1)*(1 + 1/sqrt(2))). (End)
Showing 1-10 of 23 results. Next