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 24 results. Next

A191335 Decimal expansion of sum{(1/3)^A005652(k): k>=1}.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 31 2011

Keywords

Comments

See A191329 and A191334.

Examples

			0.3719512196066283453070417349013123446242...
		

Crossrefs

Programs

A183090 Tree generated by A005652, associated with numbers which are not the sum of two Fibonacci numbers.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Dec 24 2010

Keywords

Comments

A permutation of the positive integers. See the comment at A183079.

Examples

			Top 5 rows:
  1;
  2;
  3,             4;
  6,      5,     8,      7;
  11, 12, 9, 10, 16, 15, 14, 13;
From row 3 to row 4: 3->(6,5) and 4->(8,7). For all such pairs, the 1st component is in L and the 2nd, in U.
		

Crossrefs

Formula

Let L(n)=A005652(n) and U(n)=A005653(n), these being complementary sequences, each comprising a maximal set no two of whose elements is a Fibonacci number.
The tree-array T(n,k) is then given by rows:
T(0,0)=1; T(1,0)=2;
T(n,2*j)=L(T(n-1,j));
T(n,2*j+1)=U(T(n-1,j));
for j=0,1,...,2^(n-1)-1, n>=2.

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.

A078588 a(n) = 1 if the integer multiple of phi nearest n is greater than n, otherwise 0, where phi = (1+sqrt(5))/2.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Dec 02 2002

Keywords

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).

Crossrefs

Programs

  • 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 *)
  • 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

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

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

A005653 Lexicographically least increasing sequence, starting with 2, such that the sum of two distinct terms of the sequence is never a Fibonacci number.

Original entry on oeis.org

2, 4, 5, 7, 10, 12, 13, 15, 18, 20, 23, 25, 26, 28, 31, 33, 34, 36, 38, 39, 41, 44, 46, 47, 49, 52, 54, 57, 59, 60, 62, 65, 67, 68, 70, 72, 73, 75, 78, 80, 81, 83, 86, 88, 89, 91, 93, 94, 96, 99, 101, 102, 104, 107, 109, 112, 114, 115, 117, 120, 122, 123, 125, 127, 128
Offset: 1

Views

Author

Keywords

Comments

The Chow-Long paper gives a connection with continued fractions, as well as generalizations and other references for this and related sequences.
Positions of 0's in {A078588(n) : n > 0}. - Clark Kimberling and Jianing Song, Sep 10 2019
Also positive integers k such that {k*r} < 1/2, where r = golden ratio = (1 + sqrt(5))/2 and { } = fractional part. - Clark Kimberling and Jianing Song, Sep 12 2019
Jon E. Schoenfield conjectured, and Jeffrey Shallit proved (using the Walnut theorem prover) the characterization in the title. - Jeffrey Shallit, Nov 19 2023

References

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

Crossrefs

Complement of A005652. See A078588 for further comments.

Programs

  • Mathematica
    f[n_] := Block[{k = Floor[n/GoldenRatio]}, If[n - k*GoldenRatio > (k + 1)*GoldenRatio - n, 1, 0]]; Select[ Range[130], f[ # ] == 0 &]
    r = (1 + Sqrt[5])/2; z = 300;
    t = Table[Floor[2 n*r] - 2 Floor[n*r], {n, 1, z}] (* {A078588(n) : n > 0} *)
    Flatten[Position[t, 0]] (* this sequence *)
    Flatten[Position[t, 1]] (* A005652 *)
    (* Clark Kimberling and Jianing Song, Sep 10 2019 *)
    r = GoldenRatio;
    t = Table[If[FractionalPart[n*r] < 1/2, 0, 1 ], {n, 1, 120}] (* {A078588(n) : n > 0} *)
    Flatten[Position[t, 0]] (* this sequence *)
    Flatten[Position[t, 1]] (* A005652 *)
    (* Clark Kimberling and Jianing Song, Sep 12 2019 *)

Formula

The set of all n such that the integer multiple of (1+sqrt(5))/2 nearest n is less than n (Chow-Long).
Numbers n such that 2{n*phi}={2n*phi}, where { } denotes fractional part. - Clark Kimberling, Jan 01 2007
Positive integers such that A078588(n) = 0. - Clark Kimberling and Jianing Song, Sep 10 2019

Extensions

Extended by Robert G. Wilson v, Dec 02 2002
Definition clarified by Jeffrey Shallit, Nov 19 2023

A140397 a(n) = floor(3*phi*n) - 3*floor(phi*n) where phi = (1+sqrt(5))/2.

Original entry on oeis.org

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

Views

Author

Fred Lunnon, Jun 20 2008

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=Floor[3GoldenRatio*n]-3Floor[GoldenRatio*n];Array[a,99] (* James C. McMahon, Jul 08 2025 *)
  • PARI
    a(n) = my(fhi=(1+sqrt(5))/2); floor(3*fhi*n) - 3*floor(fhi*n); \\ Michel Marcus, Aug 26 2013

Formula

a(n) = floor(n*s^2)-floor(s*floor(n*s)), where s=1+phi.

A191329 (Lower Wythoff sequence mod 2)+(Upper Wythoff sequence mod 2).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 31 2011

Keywords

Comments

Let r=(golden ratio)=(1+sqrt(5))/2 and let [ ]=floor. Let u(n)=[nr] and v(n)=n+[nr], so that u=A000201, v=A001950, the Wythoff sequences, and A191329=(u mod 2)+(v mod 2)=(number of odd numbers in {[nr],[ns]}).
The sequence A191329 can also be obtained by placing 1 before each term of 2*A078588.

Examples

			u = (1,3,4,6,8,9,...)... = (1,1,0,0,0,1,...) in mod 2
v = (2,5,7,10,13,15,...) = (0,1,1,0,1,1,...) in mod 2,
so that......... A191329 = (1,2,1,0,1,2,...).
		

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; s = r/(r - 1); h = 500;
    u = Table[Floor[n*r], {n, 1, h}]  (* A000201 *)
    v = Table[Floor[n*s], {n, 1, h}]  (* A001950 *)
    w = Mod[u, 2] + Mod[v, 2]  (* A191329 *)
    b = Flatten[Position[w, 0]]  (* A191330=2*A005653 *)
    c = Flatten[Position[w, 1]]  (* A005408, the odds *)
    d = Flatten[Position[w, 2]]  (* A191331=2*A005652 *)
    e = b/2; (* A005653 *)
    f = d/2; (* A005652 *)
    x = (1/3)^b; z = (1/3)^d;
    k[n_] := x[[n]]; x1 = Sum[k[n], {n, 1, 100}];
    N[x1, 100]
    RealDigits[x1, 10, 100]  (* A191332 *)
    k[n_] := z[[n]]; z1 = Sum[k[n], {n, 1, 100}];
    N[z1, 100]
    RealDigits[z1, 10, 100]  (* A191333 *)
    N[x1 + z1, 100] (* Checks that x1+z1=1/8 *)
    x = (1/3)^e; z = (1/3)^f;
    k[n_] := x[[n]]; x2 = Sum[k[n], {n, 1, 100}];
    N[x2, 100]
    RealDigits[x2, 10, 100]  (* A191334 *)
    k[n_] := z[[n]]; z2 = Sum[k[n], {n, 1, 100}];
    N[z2, 100]
    RealDigits[z2, 10, 100]  (* A191335 *)
    N[x2 + z2, 100] (* checks that x2+z2=1/2 *)
  • PARI
    A191329(n) = { my(y=n+sqrtint(n^2*5)); (((y+n+n)\2)%2) + ((y%4)>1); }; \\ (after programs in A001950 and A085002) - Antti Karttunen, May 19 2021
    
  • Python
    from math import isqrt
    def A191329(n): return m if (m:=((n+isqrt(5*n**2))&2)+(n&1))<3 else 1 # Chai Wah Wu, Aug 10 2022

Formula

a(n) = (A000201(n) mod 2) + (A001950(n) mod 2).
a(n) = A085002(n) + A171587(n). - Michel Dekking, Jan 28 2021

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.

A114889 a(1)=1 and, for n>1, a(n) is the smallest integer greater than a(n-1) such that a(n)+a(i) is not a power of 3, for i=1,..., n-1.

Original entry on oeis.org

1, 3, 4, 7, 9, 10, 11, 12, 13, 19, 21, 22, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 55, 57, 58, 61, 63, 64, 65, 66, 67, 73, 75, 76, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108
Offset: 1

Views

Author

John W. Layman, Jan 04 2006

Keywords

Comments

The differences of {a(n)}, together with a conjectured formula for them, is given in A114890.

Examples

			Given that a(1)=1, a(2)=3 and a(3)=4, we find that a(4)>5 since 5+4=9 and a(4)>6 since 6+3=9. But none of 7+1, 7+3, or 7+4 is a power of 3, so a(4)=7.
		

Crossrefs

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
Showing 1-10 of 24 results. Next