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-5 of 5 results.

A059649 Positions of ones in A059648.

Original entry on oeis.org

2, 7, 9, 12, 14, 19, 24, 26, 31, 36, 38, 41, 43, 48, 50, 53, 55, 60, 65, 67, 70, 72, 77, 79, 82, 84, 89, 94, 96, 101, 106, 108, 111, 113, 118, 123, 125, 130, 135, 137, 140, 142, 147, 149, 152, 154, 159, 164, 166, 171, 176, 178, 181, 183, 188, 193, 195, 200, 205
Offset: 1

Views

Author

Antti Karttunen, Feb 03 2001

Keywords

Crossrefs

First differences: A059650.

Programs

  • Maple
    positions := proc(e,ll) local a,k,l,m; l := ll; m := 1; a := []; while(member(e,l[m..nops(l)],'k')) do a := [op(a),(k+m-1)]; m := k+m; od; RETURN(a); end;
  • Mathematica
    Position[With[{k = Sqrt[2]}, Table[Floor[Floor[k^2*j] - k*Floor[k*j]], {j, 0, 300}]], 1] - 1 // Flatten (* Jean-François Alcover, Mar 06 2016 *)

A007069 First column of spectral array W(sqrt 2).

Original entry on oeis.org

1, 2, 5, 7, 9, 11, 12, 15, 16, 19, 21, 22, 25, 26, 29, 31, 33, 35, 36, 39, 41, 43, 45, 46, 49, 50, 53, 55, 57, 59, 60, 63, 65, 67, 69, 70, 73, 74, 77, 79, 80, 83, 84, 87, 89, 91, 93, 94, 97, 98, 101, 103, 104, 107, 108, 111, 113, 115, 117, 118, 121, 123, 125, 127, 128, 131
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [Floor(Sqrt(2)*Floor(Sqrt(2)*n)): n in [1..100]]; // G. C. Greubel, Aug 16 2018
    
  • Mathematica
    Table[Floor[Sqrt[2]*Floor[Sqrt[2]*n]], {n, 1, 100}] (* G. C. Greubel, Aug 16 2018 *)
  • PARI
    vector(100,n, floor(sqrt(2)*floor(n*sqrt(2)))) \\ G. C. Greubel, Aug 16 2018
    
  • Python
    from math import isqrt
    def A007069(n): return isqrt(isqrt(n**2<<1)**2<<1) # Chai Wah Wu, Aug 29 2022

Formula

From Benoit Cloitre, Apr 06 2003: (Start)
Iterated floor function: a(n) = floor(sqrt(2)*floor(sqrt(2)*n)).
a(n) = A001951(A001951(n)).
a(n) = 2*n - 1 - A059648(n). (End)

Extensions

More terms from Benoit Cloitre, Apr 06 2003

A059651 a(n) = [[(k^2)*n]-(k*[k*n])], where k = cube root of 2 and [] is the floor function.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 03 2001

Keywords

Comments

The values of (floor((k^2)*j)-(k*(floor(k*j)))) for j=0..50, where k=2^(1/3), are 0, -0.259921, 0.480158, 0.220237, -0.299605, -0.559526, 0.180553, 0.92063, -0.59921, ...

Crossrefs

A059648 gives similar sequence for k=sqrt(2). Positions of +1's: A059657, positions of -1's A059659.

Programs

  • Maple
    Digits := 89; floor_diffs_floored(evalf(2^(1/3)),120);

A059652 a(n) = [[(k^2)*n]-(k*[k*n])], where k = sqrt(3/2) and [] is the floor function.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 03 2001

Keywords

Comments

The values of (floor((k^2)*j)-(k*(floor(k*j)))) for j=0..45, with k=2^(1/3), are 0, -0.224746, 0.550508, 0.325762, 1.101016, -0.348476, 0.426778, 0.202032, 0.97729, ...

Crossrefs

A059648 gives similar sequence for k=sqrt(2). Positions of ones: A059653, positions of minus ones: A059655.

Programs

  • Maple
    Digits := 89; floor_diffs_floored(sqrt(3/2),120);

A138330 Beatty discrepancy (defined in A138253) giving the closeness of the pair (A136497,A136498) to the Beatty pair (A001951,A001952).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Mar 14 2008

Keywords

Comments

Old definition was "Beatty discrepancy of the complementary equation b(n) = a(a(n)) + a(n)".

Examples

			d(1) - c(c(1)) - c(1) =  3 - 1 - 1 = 1;
d(2) - c(c(2)) - c(2) =  6 - 2 - 2 = 2;
d(3) - c(c(3)) - c(3) = 10 - 5 - 4 = 1;
d(4) - c(c(4)) - c(4) = 13 - 7 - 5 = 1.
		

Crossrefs

Programs

  • Magma
    [2*n - Floor(Sqrt(2)*Floor(Sqrt(2)*n)): n in [1..100]]; // Vincenzo Librandi, Nov 12 2018
    
  • Maple
    a:=n->2*n-floor(sqrt(2)*floor(sqrt(2)*n)): seq(a(n),n=1..120); # Muniru A Asiru, Nov 11 2018
  • Mathematica
    Table[2 n - Floor[Sqrt[2] Floor[Sqrt[2] n]], {n, 1, 100}] (* Vincenzo Librandi, Nov 12 2018 *)
  • PARI
    a(n)=2*n-floor(sqrt(2)*floor(sqrt(2)*n)) \\ Benoit Cloitre, May 08 2008
    
  • Python
    from math import isqrt
    def A138330(n): return (m:=n<<1)-isqrt(isqrt(n*m)**2<<1) # Chai Wah Wu, Aug 29 2022

Formula

a(n) = d(n) - c(c(n)) - c(n), where c(n) = A001951 and d(n) = A001952.
a(n) = 2*n - A007069(n). - Benoit Cloitre, May 08 2008
a(n) = A059648(n+1) + 1. - Michel Dekking, Nov 11 2018

Extensions

Definition revised by N. J. A. Sloane, Dec 16 2018
Showing 1-5 of 5 results.