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

A190427 a(n) = [(b*n+c)*r] - b*[n*r] - [c*r], where (r,b,c)=(golden ratio,2,1) and []=floor.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 10 2011

Keywords

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,0): A078588, A005653, A005652
(golden ratio,2,1): A190427 - A190430
(golden ratio,3,0): A140397 - A190400
(golden ratio,3,1): A140431 - A190435
(golden ratio,3,2): A140436 - A190439

Examples

			a(1)=[3r]-2[r]-1=4-3-1=1.
a(2)=[5r]-2[2r]-1=8-6-1=1.
a(3)=[7r]-2[3r]-1=11-8-1=2.
		

Crossrefs

Programs

  • Magma
    [Floor((2*n+1)*(1+Sqrt(5))/2) - 2*Floor(n*(1+Sqrt(5))/2) - 1: n in [1..100]]; // G. C. Greubel, Apr 06 2018
  • Mathematica
    r = GoldenRatio; b = 2; c = 1;
    f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
    t = Table[f[n], {n, 1, 320}] (* A190427 *)
    Flatten[Position[t, 0]] (* A190428 *)
    Flatten[Position[t, 1]] (* A190429 *)
    Flatten[Position[t, 2]] (* A190430 *)
    Table[Floor[(2*n+1)*GoldenRatio] - 2*Floor[n*GoldenRatio] -1, {n,1,100}] (* G. C. Greubel, Apr 06 2018 *)
  • PARI
    for(n=1,100, print1(floor((2*n+1)*(1+sqrt(5))/2) - 2*floor(n*(1+sqrt(5))/2) - 1, ", ")) \\ G. C. Greubel, Apr 06 2018
    
  • Python
    from mpmath import mp, phi
    from sympy import floor
    mp.dps=100
    def a(n): return floor((2*n + 1)*phi) - 2*floor(n*phi) - 1
    print([a(n) for n in range(1, 132)]) # Indranil Ghosh, Jul 02 2017
    

Formula

a(n) = [(2*n+1)*r] - 2*[n*r] - 1, where r=(1+sqrt(5))/2.

A190440 [(bn+c)r]-b[nr]-[cr], where (r,b,c)=(golden ratio,4,0) and []=floor.

Original entry on oeis.org

2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 2, 1, 3, 2, 0
Offset: 1

Views

Author

Clark Kimberling, May 10 2011

Keywords

Comments

Write a(n)=[(bn+c)r]-b[nr]-[cr]. 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,0): A078588, A005653, A005652
(golden ratio,2,1): A190427-A190430
(golden ratio,3,0): A140397-A190400
(golden ratio,3,1): A140431-A190435
(golden ratio,3,2): A140436-A190439

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio;
    f[n_] := Floor[4*n*r] - 4*Floor[n*r];
    t = Table[f[n], {n, 1, 320}] (* A190440 *)
    Flatten[Position[t, 0]]  (* A190240 *)
    Flatten[Position[t, 1]]  (* A190249 *)
    Flatten[Position[t, 2]]  (* A190442 *)
    Flatten[Position[t, 3]]  (* A190443 *)
    Flatten[Position[t, 4]]  (* A190248 *)

Formula

a(n)=[4nr]-4[nr], where r=golden ratio.

A190431 a(n) = [(b*n+c)*r] - b*[n*r] - [c*r], where (r,b,c)=(golden ratio,3,1) and []=floor.

Original entry on oeis.org

2, 1, 3, 2, 0, 2, 1, 3, 2, 1, 3, 1, 0, 2, 1, 3, 2, 0, 2, 1, 3, 2, 1, 3, 1, 0, 2, 1, 3, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 3, 2, 1, 3, 1, 0, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 3, 2, 0, 2, 1, 3, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 3, 2, 1, 3, 1, 0, 2, 1, 3, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 3, 2, 1, 3, 1, 0, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 3, 1, 0, 2, 1, 3, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 3, 2, 1, 3, 1, 0
Offset: 1

Views

Author

Clark Kimberling, May 10 2011

Keywords

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,0): A078588, A005653, A005652
(golden ratio,2,1): A190427 - A190430
(golden ratio,3,0): A140397 - A190400
(golden ratio,3,1): A140431 - A190435
(golden ratio,3,2): A140436 - A190439

Crossrefs

Programs

  • Magma
    [Floor((3*n+1)*(1+Sqrt(5))/2) - 3*Floor(n*(1+Sqrt(5))/2) - 1: n in [1..100]]; // G. C. Greubel, Apr 06 2018
  • Mathematica
    r = GoldenRatio; b = 3; c = 1;
    f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
    t = Table[f[n], {n, 1, 320}] (* A190431 *)
    Flatten[Position[t, 0]] (* A190432 *)
    Flatten[Position[t, 1]] (* A190433 *)
    Flatten[Position[t, 2]] (* A190434 *)
    Flatten[Position[t, 3]] (* A190435 *)
  • PARI
    for(n=1,100, print1(floor((3*n+1)*(1+sqrt(5))/2) - 3*floor(n*(1+sqrt(5))/2) - 1, ", ")) \\ G. C. Greubel, Apr 06 2018
    

Formula

a(n) = floor((3*n+1)*(1+sqrt(5))/2) - 3*floor(n*(1+sqrt(5))/2) - 1. - G. C. Greubel, Apr 06 2018

A190436 a(n) = [(b*n+c)*r] - b*[n*r] - [c*r], where (r,b,c)=(golden ratio,3,2) and []=floor.

Original entry on oeis.org

2, 0, 2, 1, 0, 2, 1, 3, 1, 0, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 0, 2, 1, 3, 1, 0, 2, 1, 0, 2, 0, 2, 1, 0, 2, 1, 3, 1, 0, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 0, 2, 1, 3, 1, 0, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 0, 2, 0, 2, 1, 0, 2, 1, 3, 1, 0, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 0
Offset: 1

Views

Author

Clark Kimberling, May 10 2011

Keywords

Comments

Write a(n)=[(bn+c)r]-b[nr]-[cr]. 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,0): A078588, A005653, A005652
(golden ratio,2,1): A190427 - A190430
(golden ratio,3,0): A140397 - A190400
(golden ratio,3,1): A140431 - A190435
(golden ratio,3,2): A140436 - A190439
(golden ratio,4,c): A140440 - A190461

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; b = 3; c = 2;
    f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
    t = Table[f[n], {n, 1, 320}]
    Flatten[Position[t, 0]] (* A190437 *)
    Flatten[Position[t, 1]] (* A190438 *)
    Flatten[Position[t, 2]] (* A190439 *)
    Flatten[Position[t, 3]] (* A302253 *)

A190445 [(bn+c)r]-b[nr]-[cr], where (r,b,c)=(golden ratio,4,1) and []=floor.

Original entry on oeis.org

3, 1, 4, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 1, 4, 2, 1, 3, 2, 0
Offset: 1

Views

Author

Clark Kimberling, May 10 2011

Keywords

Comments

Write a(n)=[(bn+c)r]-b[nr]-[cr]. 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,0): A078588, A005653, A005652
(golden ratio,2,1): A190427-A190430
(golden ratio,3,0): A140397-A190400
(golden ratio,3,1): A140431-A190435
(golden ratio,3,2): A140436-A190439
(golden ratio,4,c): A190440-A190461

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; b = 4; c = 1;
    f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
    t = Table[f[n], {n, 1, 320}]
    Flatten[Position[t, 0]]
    Flatten[Position[t, 1]]
    Flatten[Position[t, 2]]
    Flatten[Position[t, 3]]
    Flatten[Position[t, 4]]

A190457 a(n) = [(bn+c)r]-b[nr]-[cr], where (r,b,c)=(golden ratio,4,3) and []=floor.

Original entry on oeis.org

3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 1, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 1, 3, 2, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 1, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3
Offset: 1

Views

Author

Clark Kimberling, May 10 2011

Keywords

Comments

Write a(n)=[(bn+c)r]-b[nr]-[cr]. 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,0): A078588, A005653, A005652
(golden ratio,2,1): A190427-A190430
(golden ratio,3,0): A140397-A190400
(golden ratio,3,1): A140431-A190435
(golden ratio,3,2): A140436-A190439
(golden ratio,4,c): A190440-A190461

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; b = 4; c = 3;
    f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
    t = Table[f[n], {n, 1, 320}]
    Flatten[Position[t, 0]]
    Flatten[Position[t, 1]]
    Flatten[Position[t, 2]]
    Flatten[Position[t, 3]]
    Flatten[Position[t, 4]]

A302253 Positions of 3 in A190436.

Original entry on oeis.org

8, 21, 29, 42, 55, 63, 76, 97, 110, 118, 131, 144, 152, 165, 186, 199, 207, 220, 241, 254, 262, 275, 288, 296, 309, 330, 343, 351, 364, 377, 385, 398, 406, 419, 432, 440, 453, 474, 487, 495, 508, 521, 529, 542, 563, 576, 584, 597, 618, 631, 639, 652, 665, 673, 686, 707, 720, 728
Offset: 1

Views

Author

G. C. Greubel, Apr 04 2018

Keywords

Comments

Write a(n) = [(bn+c)r] - b[nr] - [cr]. 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,0): A078588, A005653, A005652
(golden ratio,2,1): A190427-A190430
(golden ratio,3,0): A140397-A190400
(golden ratio,3,1): A140431-A190435
(golden ratio,3,2): A140436-A190439
(golden ratio,4,c): A140440-A190461

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; b = 3; c = 2;
    f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
    t = Table[f[n], {n, 1, 500}] (* A190436 *)
    Flatten[Position[t, 0]] (* A190437 *)
    Flatten[Position[t, 1]] (* A190438 *)
    Flatten[Position[t, 2]] (* A190439 *)
    Flatten[Position[t, 3]] (* A302253 *)

A190451 [(bn+c)r]-b[nr]-[cr], where (r,b,c)=(golden ratio,4,2) and []=floor.

Original entry on oeis.org

2, 1, 3, 2, 0, 3, 1, 4, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 4, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 3, 2, 0, 3, 1, 0
Offset: 1

Views

Author

Clark Kimberling, May 10 2011

Keywords

Comments

Write a(n)=[(bn+c)r]-b[nr]-[cr]. 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,0): A078588, A005653, A005652
(golden ratio,2,1): A190427-A190430
(golden ratio,3,0): A140397-A190400
(golden ratio,3,1): A140431-A190435
(golden ratio,3,2): A140436-A190439

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; b = 4; c = 2;
    f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
    t = Table[f[n], {n, 1, 320}]
    Flatten[Position[t, 0]]
    Flatten[Position[t, 1]]
    Flatten[Position[t, 2]]
    Flatten[Position[t, 3]]
    Flatten[Position[t, 4]]

A190401 Number of ways to place 6 nonattacking grasshoppers on a toroidal chessboard of size n x n.

Original entry on oeis.org

0, 0, 0, 384, 19100, 557808, 5841780, 41338400, 209264796, 859752800, 2982181004, 9131392296, 25196132260, 63968987264, 151223202900, 336724832384, 711538908572, 1437022315440, 2787781494732, 5219454908200, 9464698212228
Offset: 1

Views

Author

Vaclav Kotesovec, May 10 2011

Keywords

Comments

The Grasshopper moves on the same lines as a queen, but must jump over a hurdle to land on the square immediately beyond.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- 4 x^3 (128 x^24 - 768 x^23 - 8 x^22 + 9258 x^21 - 17442 x^20 - 25593 x^19 + 103542 x^18 - 19695 x^17 - 252858 x^16 + 225766 x^15 + 297416 x^14 - 465166 x^13 - 63474 x^12 + 488076 x^11 + 515008 x^10 + 582376 x^9 + 2358586 x^8 + 2976026 x^7 + 6280504 x^6 + 4731396 x^5 + 2785972 x^4 + 664045 x^3 + 111570 x^2 + 4199 x + 96) / ((x - 1)^13 (x + 1)^7), {x, 0, 50}], x] (* Vincenzo Librandi, Jun 03 2013 *)

Formula

Explicit formula: a(n) = 1/720*n^2*(n^10 -15n^8 -480n^7 +2245n^6 + 2400n^5 +27255n^4 -342480n^3 +639934n^2 +471600n -865080) + 1/4*n^2*(-1)^n*(8n^4 -40n^3 +17n^2 -272n +1608), n>8.
G.f.: -4x^4*(128x^24 -768x^23 -8x^22 +9258x^21 -17442x^20 -25593x^19 +103542x^18 -19695x^17 -252858x^16 +225766x^15 +297416x^14 -465166x^13 -63474x^12 +488076x^11 +515008x^10 +582376x^9 +2358586x^8 +2976026x^7 +6280504x^6 +4731396x^5 +2785972x^4 +664045x^3 +111570x^2 +4199x +96)/((x-1)^13*(x+1)^7).
Showing 1-9 of 9 results.