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

A105425 Interpret A105424 as a binary sequence and convert to decimal.

Original entry on oeis.org

0, 1, 2, 4, 5, 8, 10, 16, 17, 18, 20, 21, 32, 34, 36, 37, 40, 42, 64, 65, 66, 68, 69, 72, 74, 80, 81, 82, 84, 85, 128, 130, 132, 133, 136, 138, 144, 145, 146, 148, 149, 160, 162, 164, 165, 168, 170, 256, 257, 258, 260, 261, 264, 266, 272, 273, 274
Offset: 0

Views

Author

Bryan Jacobs (bryanjj(AT)gmail.com), Apr 08 2005

Keywords

Comments

See A105424 for further information. - N. J. A. Sloane, Mar 01 2021

Crossrefs

Cf. A105424.

Programs

  • Mathematica
    A105425[n_]:=FromDigits[First[RealDigits[n,GoldenRatio,Floor[Log[GoldenRatio,Max[n,1]]]+1]],2];Array[A105425,100,0] (* Paolo Xausa, Oct 20 2023 *)
  • PARI
    See Links section.

A003231 a(n) = floor(n*(sqrt(5)+5)/2).

Original entry on oeis.org

3, 7, 10, 14, 18, 21, 25, 28, 32, 36, 39, 43, 47, 50, 54, 57, 61, 65, 68, 72, 75, 79, 83, 86, 90, 94, 97, 101, 104, 108, 112, 115, 119, 123, 126, 130, 133, 137, 141, 144, 148, 151, 155, 159, 162, 166, 170, 173, 177, 180, 184, 188, 191, 195, 198, 202, 206, 209
Offset: 1

Views

Author

Keywords

Comments

Let r = (5 - sqrt(5))/2 and s = (5 + sqrt(5))/2. Then 1/r + 1/s = 1, so that A249115 and A003231 are a pair of complementary Beatty sequences. Let tau = (1 + sqrt(5))/2, the golden ratio. Let R = {h*tau, h >= 1} and S = {k*(tau - 1), k >= 1}. Then A003231(n) is the position of n*tau in the ordered union of R and S. The position of n*(tau - 1) is A249115(n). - Clark Kimberling, Oct 21 2014
This is the function named c in the Carlitz-Scoville-Vaughan link. - Eric M. Schmidt, Aug 06 2015
Natural numbers whose representation in base phi differs between the Bergmann representation and the "canonical" representation described by Dekking and van Loon. See proposition 3.3 in Dekking, van Loon (2021). - Hugo Pfoertner, May 26 2023

References

  • Dekking, Michel, and Ad van Loon. "On the representation of the natural numbers by powers of the golden mean." arXiv preprint arXiv:2111.07544 (2021); Fib. Quart. 61:2 (May 2023), 105-118.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a003231 = floor . (/ 2) . (* (sqrt 5 + 5)) . fromIntegral
    -- Reinhard Zumkeller, Oct 03 2014
    
  • Magma
    [Floor(n*(Sqrt(5)+5)/2): n  in [1..100]]; // Vincenzo Librandi, Oct 23 2014
    
  • Maple
    A003231:=n->floor(n*(sqrt(5)+5)/2): seq(A003231(n), n=1..100); # Wesley Ivan Hurt, Aug 06 2015
  • Mathematica
    With[{c=(Sqrt[5]+5)/2}, Floor[c*Range[60]]] (* Harvey P. Dale, Oct 01 2012 *)
  • PARI
    a(n)=floor(n*(sqrt(5)+5)/2)
    
  • PARI
    a(n)=(5*n+sqrtint(5*n^2))\2; \\ Michel Marcus, Nov 14 2023
    
  • Python
    from math import isqrt
    def A003231(n): return (n+isqrt(5*n**2)>>1)+(n<<1) # Chai Wah Wu, Aug 25 2022

Formula

a(n) = 2*n + A000201(n). - R. J. Mathar, Aug 22 2014

Extensions

Better description and more terms from Michael Somos, Jun 07 2000

A130600 Integers written in base phi, with the "decimal point" omitted.

Original entry on oeis.org

1, 1001, 10001, 10101, 10001001, 10100001, 100000001, 100010001, 100100101, 101000101, 101010101, 100000101001, 100010001001, 100100001001, 100101001001, 101000100001, 101010000001, 1000000000001, 1000001000001
Offset: 1

Views

Author

Casey Mongoven, Aug 06 2007

Keywords

Comments

This is the "greedy" or "minimal" representation (see also A130601).

Examples

			If the decimal point were included, the sequence would read 1., 10.01, 100.01, 101.01, 1000.1001, 1010.0001, 10000.0001, 10001.0001, 10010.0101, 10100.0101, 10101.0101, ... Unfortunately these are not integers.
Examples: a(2)=1001 because phi^1+phi^-2 = 2, a(3) = 10001 because phi^2+phi^-2 = 3, a(4) = 10101 because phi^2+phi^0+phi^-2 = 4.
		

Crossrefs

Programs

  • Mathematica
    nn = 100; len = 2*Ceiling[Log[GoldenRatio, nn]]; Table[d = RealDigits[n, GoldenRatio, len]; last1 = Position[d[[1]], 1][[-1, 1]]; FromDigits[Take[d[[1]], last1]], {n, nn}] (* T. D. Noe, May 20 2011 *)

A341722 The part of n in base phi right of the decimal point (reversed), using a greedy algorithm representation (more precisely, using the Bergman-canonical representation).

Original entry on oeis.org

0, 0, 10, 10, 10, 1001, 1000, 1000, 1000, 1010, 1010, 1010, 100101, 100100, 100100, 100100, 100001, 100000, 100000, 100000, 100010, 100010, 100010, 101001, 101000, 101000, 101000, 101010, 101010, 101010, 10010101, 10010100, 10010100, 10010100, 10010001, 10010000, 10010000
Offset: 0

Views

Author

N. J. A. Sloane, Mar 01 2021

Keywords

Comments

A105424 and A105425 give the part of n in base phi left of the decimal point.

Examples

			The first few numbers written in base phi are:
0 = 0.
1 = 1.
2 = 10.01
3 = 100.01
4 = 101.01
5 = 1000.1001
6 = 1010.0001
7 = 10000.0001
8 = 10001.0001
9 = 10010.0101
10 = 10100.0101
11 = 10101.0101
12 = 100000.101001
13 = 100010.001001
14 = 100100.001001
15 = 100101.001001
16 = 101000.100001
17 = 101010.000001
18 = 1000000.000001
19 = 1000001.000001
20 = 1000010.010001
21 = 1000100.010001
22 = 1000101.010001
23 = 1001000.100101
24 = 1001010.000101
...
		

Crossrefs

Extensions

Definition clarified by N. J. A. Sloane, May 27 2023

A104605 Triangle read by rows: row n gives list of powers of phi in the representation of the integer n as a sum of increasing nonconsecutive powers of the golden ratio.

Original entry on oeis.org

0, -2, 1, -2, 2, -2, 0, 2, -4, -1, 3, -4, 1, 3, -4, 4, -4, 0, 4, -4, -2, 1, 4, -4, -2, 2, 4, -4, -2, 0, 2, 4, -6, -3, -1, 5, -6, -3, 1, 5, -6, -3, 2, 5, -6, -3, 0, 2, 5, -6, -1, 3, 5, -6, 1, 3, 5, -6, 6, -6, 0, 6, -6, -2, 1, 6, -6, -2, 2, 6, -6, -2, 0, 2, 6, -6, -4, -1, 3, 6, -6, -4, 1, 3, 6, -6, -4, 4, 6, -6, -4, 0, 4, 6, -6, -4, -2, 1, 4, 6, -6, -4
Offset: 1

Views

Author

Eric W. Weisstein, Mar 17 2005

Keywords

Comments

Let f(n) = F(n+1) = A000045(n) and extend n to include negative indices. Then each row n can equally well be thought of as a sequence a_1, a_2,..., a_k such that f(a_1) + f(a_2) + ... + f(a_k) = n. For example, the fifth row is -4 -1 3, so f(-4) + f(-1) + f(3) = 2 + 0 + 3 = 5. - Dale Gerdemann, Apr 01 2012

Examples

			   0
  -2  1
  -2  2
  -2  0  2
  -4 -1  3
  -4  1  3
  -4  4
  -4  0  4
  ...
phi^0, phi^(-2) + phi, phi^(-2) + phi^2, phi^(-2) + phi^0 + phi^2, ...
		

Crossrefs

Cf. A055778 (length of row n), A105424, A178482 (phi-antipalindromic numbers).

Programs

  • Mathematica
    nn = 100; len = 2*Ceiling[Log[GoldenRatio, nn]]; Table[d = RealDigits[n, GoldenRatio, len]; Reverse[d[[2]] - Flatten[Position[d[[1]], 1]]], {n, nn}] (* T. D. Noe, May 20 2011 *)

A130601 Integers written in base phi, with the "decimal point" omitted.

Original entry on oeis.org

1, 111, 1101, 10101, 1011111, 1110111, 10101101, 10111101, 11011101, 11110101, 101010101, 10101111111, 10111011111, 11010110111, 11011110111, 11101110111, 11111010111, 101010101101, 101011101101, 101101101101
Offset: 1

Views

Author

Casey Mongoven, Aug 06 2007

Keywords

Comments

The map 100 -> 011 is used to eliminate every 100 from the minimal representation (A130600).
Other sequences are possible for representing integers in base-phi with no occurrence of "00" in any terms - see links.

Examples

			Examples: a(2)=111 because phi^0+phi^-1+phi^-2 = 2, a(3) = 1101 because phi^1+phi^0+phi^-2 = 3, a(4) = 10101 because phi^2+phi^0+phi^-2 = 4.
		

Crossrefs

A362692 Length of the "integer part" of the phi-expansion of n.

Original entry on oeis.org

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

Views

Author

Jeffrey Shallit, May 01 2023

Keywords

Comments

The phi-representation of n is the (essentially) unique way to write n = Sum_{j=L..R} b(j)*phi^j, where b(j) is in {0,1} and -oo < L <= 0 <= R, where phi = (1+sqrt(5))/2, subject to the condition that b(j)b(j+1) != 1. The "integer" part is the string of bits b(R)b(R-1)...b(1)b(0), and its length is thus R+1.
The gaps between consecutive terms are all either 0 or 1, and a gap of 1 occurs if and only if n = 1 or n = L(2i) or n = L(2i-1) + 1 for i >= 1. This is equivalent to Theorem 2.1 of Sanchis and Sanchis (2001).

Examples

			For n = 20 we have n = phi^6 + phi^1 + phi^(-2) + phi^(-6), and the "integer part" has largest term phi^6, so a(20) = 7.
		

Crossrefs

Programs

Formula

There is a linear representation of rank 9 for a(n).
a(n) = ceiling(log_phi(n)) for n >= 2.

Extensions

a(0) changed to 1 by N. J. A. Sloane, May 26 2023

A105116 The part of n left of the decimal point when written in base e using a greedy algorithm representation.

Original entry on oeis.org

0, 1, 2, 10, 11, 12, 20, 21, 100, 101, 102, 110, 111, 120, 121, 200, 201, 202, 210, 211, 212, 1000, 1001, 1010, 1011, 1012, 1020, 1021, 1100, 1101, 1102, 1110, 1111, 1120, 1121, 1200, 1201, 1202, 1210, 1211, 1212, 2000, 2001, 2010, 2011, 2012, 2020
Offset: 0

Views

Author

Bryan Jacobs (bryanjj(AT)gmail.com), Apr 08 2005

Keywords

Examples

			3 in base e = 10.020... so a(3) = 10.
		

Crossrefs

Cf. A001113 (e digits).
Cf. A105424 (base phi), A344939 (base Pi).
Cf. A363832 (number of digits).

Programs

  • Mathematica
    A105116[n_]:=FromDigits[First[RealDigits[n,E,Floor[Log[E,Max[n,1]]]+1]]];
    Array[A105116,100,0] (* Paolo Xausa, Oct 18 2023 *)

A344939 The part of n left of the radix point when written in base Pi using a greedy algorithm representation.

Original entry on oeis.org

0, 1, 2, 3, 10, 11, 12, 20, 21, 22, 100, 101, 102, 103, 110, 111, 112, 120, 121, 122, 200, 201, 202, 210, 211, 212, 213, 220, 221, 222, 300, 301, 1000, 1001, 1002, 1010, 1011, 1012, 1020, 1021, 1022, 1100, 1101, 1102, 1103, 1110, 1111, 1112, 1120, 1121, 1122
Offset: 0

Views

Author

Paolo Xausa, Jun 03 2021

Keywords

Examples

			a(5) = 11 because 5 in base Pi is 11.22012202...
		

Crossrefs

Cf. A000796 (Pi digits). Subsequence of A007090.
Cf. A105116 (base e), A105424 (base phi).
Cf. A366721 (number of digits).

Programs

  • Maple
    A344939 := proc(n)
        local e,ntrunc,a,d;
        Digits := 1000 ;
        if n = 0 then
            return 0 ;
        end if;
        ntrunc := n ;
        e := floor(log(n)/log(Pi)) ;
        a := 0 ;
        while e >= 0 do
            d := floor(ntrunc/Pi^e) ;
            a := 10*a+d ;
            ntrunc := evalf(ntrunc-d*Pi^e) ;
            e := e-1 ;
        end do:
        a ;
    end proc:
    seq(A344939(n),n=0..15) ; # R. J. Mathar, Aug 16 2021
  • Mathematica
    A344939[n_]:=FromDigits[First[RealDigits[n,Pi,Floor[Log[Pi,Max[n,1]]]+1]]];
    Array[A344939,100,0] (* Paolo Xausa, Oct 17 2023 *)

Extensions

Name edited by Paolo Xausa, Oct 18 2023

A362917 The part of n to the left of the decimal point in the Dekking-van-Loon-canonical base phi representation of n.

Original entry on oeis.org

0, 1, 10, 11, 101, 1000, 1010, 1011, 10001, 10010, 10011, 10101, 100000, 100010, 100011, 100101, 101000, 101010, 101011, 1000001, 1000010, 1000011, 1000101, 1001000, 1001010, 1001011, 1010001, 1010010, 1010011, 1010101, 10000000
Offset: 0

Views

Author

N. J. A. Sloane, May 26 2023

Keywords

Comments

The part to the right of the decimal point, reversed, is given by A341722, that is, it is the same as in the Bergman-canonical representation. I asked Jeffrey Shallit to confirm this, and he provided the following verification using the Walnut Theorem-Prover:
[Walnut]$ eval sloane "?msd_fib An,x1,x2,y1,y2 ($saka(n,x1,y1) & $dvl(n,x2,y2)) => $equal(y1,y2)":
(saka(n,x1,y1))&dvl(n,x2,y2))):54 states - 66ms
((saka(n,x1,y1))&dvl(n,x2,y2)))=>equal(y1,y2))):2 states - 25ms
(A n , x1 , x2 , y1 , y2 ((saka(n,x1,y1))&dvl(n,x2,y2)))=>equal(y1,y2)))):1 states - 81ms
Total computation time: 264ms.
TRUE

Examples

			The canonical base phi representations of the numbers 0 through 12 are:
0 = 0.
1 = 1.
2 = 10.01
3 = 11.01
4 = 101.01
5 = 1000.1001
6 = 1010.0001
7 = 1011.0001
8 = 10001.0001
9 = 10010.0101
10 = 10011.0101
11 = 10101.0101
12 = 100000.101001
		

References

  • Dekking, Michel, and Ad van Loon. "On the representation of the natural numbers by powers of the golden mean." arXiv preprint arXiv:2111.07544 (2021); Fib. Quart. 61:2 (May 2023), 105-118.

Crossrefs

Differs from A105424 at positions given by A003231.

Extensions

a(13)-a(32) from Hugo Pfoertner, May 26 2023
Showing 1-10 of 16 results. Next