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

A059650 First differences of A059649.

Original entry on oeis.org

5, 2, 3, 2, 5, 5, 2, 5, 5, 2, 3, 2, 5, 2, 3, 2, 5, 5, 2, 3, 2, 5, 2, 3, 2, 5, 5, 2, 5, 5, 2, 3, 2, 5, 5, 2, 5, 5, 2, 3, 2, 5, 2, 3, 2, 5, 5, 2, 5, 5, 2, 3, 2, 5, 5, 2, 5, 5, 2, 3, 2, 5, 2, 3, 2, 5, 5, 2, 3, 2, 5, 2, 3, 2, 5, 5, 2, 5, 5, 2, 3, 2, 5, 2, 3, 2, 5, 5, 2, 3, 2, 5, 2, 3, 2, 5, 5, 2, 5, 5, 2, 3, 2, 5, 5
Offset: 1

Views

Author

Antti Karttunen, Feb 03 2001

Keywords

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

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 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..20, with k=sqrt(2), are 0, 0.585786, 1.171572, 0.343144, 0.928930, 0.100502, 0.68629, 1.27207, 0.44365, 1.02943, 0.20100, 0.78679, 1.37258, 0.54415, 1.12993, 0.30151, 0.88729, 0.05886, 0.64465, 1.23044, 0.40201

Crossrefs

Cf. A007069. Positions of ones: A059649.
Cf. A002193 (sqrt(2)).

Programs

  • Magma
    [Floor(Floor(n*Sqrt(2)^2) - Sqrt(2)*Floor(n*Sqrt(2))): n in [0..100]]; // G. C. Greubel, Jan 27 2018
    
  • Maple
    Digits := 89; floor_diffs_floored(sqrt(2),120); floor_diffs_floored := proc(k,upto_n) local j; [seq(floor(floor((k^2)*j)-(k*(floor(k*j)))),j=0..upto_n)]; end;
  • Mathematica
    With[{k = Sqrt[2]}, Table[Floor[Floor[k^2*j] - k*Floor[k*j]], {j, 0, 104}]] (* Jean-François Alcover, Mar 06 2016 *)
  • PARI
    for(n=0, 100, print1(floor(floor(n*sqrt(2)^2) - sqrt(2)*floor(n*sqrt(2))), ", ")) \\ G. C. Greubel, Jan 27 2018
    
  • Python
    from math import isqrt
    def A059648(n): return (m:=n<<1)-1-isqrt(isqrt(n*m)**2<<1) if n else 0 # Chai Wah Wu, Aug 29 2022

A059877 Those n for which the absolute value of A059876[n] is prime.

Original entry on oeis.org

1, 3, 4, 5, 6, 10, 11, 12, 13, 15, 16, 17, 18, 21, 22, 24, 26, 27, 28, 30, 32, 33, 34, 38, 39, 40, 41, 42, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 59, 60, 63, 64, 67, 68, 69, 70, 72, 74, 75, 76, 78, 79, 80, 81, 83, 84, 85, 87, 89, 93, 94, 96, 98, 102, 103, 104, 105, 109, 111
Offset: 1

Views

Author

Antti Karttunen, Feb 05 2001

Keywords

Comments

Of the first 511 terms of A059876, 278 are primes.

Crossrefs

Cf. A059879.

Programs

  • Maple
    positions(true,map(isprime,map(abs, A059876))); # positions function given in A059649.
  • Mathematica
    a[n_] := With[{s = Floor[Log[2, n]]}, (-1)^(n+1) + Sum[(-1)^(Floor[n/2^i] + 1)*Prime[i], {i, 1, s}] + If[1 == n, 1, Mod[s + 1, 2]*Prime[s]]];
    A059877 = Position[Array[a, 120], p_ /; PrimeQ[Abs[p]]] // Flatten (* Jean-François Alcover, Mar 07 2016 *)

A059879 Those n for which the absolute value of A059878[n] is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 14, 16, 18, 20, 21, 24, 27, 31, 34, 37, 39, 41, 43, 46, 47, 48, 50, 51, 53, 54, 55, 57, 60, 61, 65, 67, 68, 71, 78, 83, 84, 86, 87, 101, 103, 105, 106, 109, 112, 114, 117, 126, 127, 128, 129, 141, 143, 145, 154, 155, 158, 161, 168, 179, 181
Offset: 1

Views

Author

Antti Karttunen, Feb 05 2001

Keywords

Comments

Of the first 511 terms of A059878, 128 are primes.

Crossrefs

Cf. A059877.

Programs

  • Maple
    positions(true,map(isprime,map(abs, A059878))); # positions function given in A059649.
Showing 1-4 of 4 results.