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

A022328 Exponent of 2 (value of i) in n-th number of form 2^i*3^j, i >= 0, j >= 0 (see A003586).

Original entry on oeis.org

0, 1, 0, 2, 1, 3, 0, 2, 4, 1, 3, 0, 5, 2, 4, 1, 6, 3, 0, 5, 2, 7, 4, 1, 6, 3, 0, 8, 5, 2, 7, 4, 1, 9, 6, 3, 0, 8, 5, 2, 10, 7, 4, 1, 9, 6, 3, 11, 0, 8, 5, 2, 10, 7, 4, 12, 1, 9, 6, 3, 11, 0, 8, 5, 13, 2, 10, 7, 4, 12, 1, 9, 6, 14, 3, 11, 0, 8, 5, 13, 2, 10, 7, 15, 4, 12, 1, 9, 6, 14, 3, 11, 0, 8, 16, 5, 13, 2
Offset: 1

Views

Author

Keywords

Comments

From Clark Kimberling, Mar 18 2015 and May 21 2015: (Start)
This is the signature sequence of log(3)/log(2) and is a fractal sequence; e.g., if the first occurrence of each n is removed, the resulting sequence is the original sequence.
Moreover, if the sequence is partitioned into segments starting with 0 as follows:
0,1
0,2,1,3
0,2,4,1,3
0,5,2,4,1,6,3,
and so on, then deleting the greatest number in each segment leaves
0
0,2,1
0,2,1,3
0,5,2,4,1,3,
and so on, which, concatenated to (0,0,2,1,0,2,1,3,0,5,2,4,1,3,...), is another fractal sequence, in today's usual meaning of that term. When introduced in 1995, one of the defining properties of a fractal sequence was, essentially, that before each n appears, every k < n must have already appeared; this requirement ensures that the sequence yields a dispersion; e.g., A114577 yields A114537. However, the usual meaning of "fractal sequence" nowadays is simply "a sequence that contains itself as a proper subsequence". It is proposed here that the original version be renamed "strongly fractal". Thus, the operations called upper trimming and lower trimming (e.g., A084531, A167237), when applied to strongly fractal sequences, yield strongly fractal sequences. The operation introduced here, which can be called "segment-upper trimming", carries fractal sequences to fractal sequences, but not strongly fractal to strongly fractal.
Associated with the signature sequence S of each positive irrational number is an interspersion (or equivalently, a dispersion), in which row n >= 0 consists of the positions of n in S. The interspersion associated with the signature sequence of log(3)/log(2) is A255975.
(End)
Comment from Allan C. Wechsler, May 26 2024 (Start):
More generally, the "signature sequence" of an irrational number H can be defined as follows. Consider all the numbers of the form a + bH, where a and b are positive integers, and sort them into increasing order (there are no cluster points or other obstacles). The sequence of a-values is then the *signature sequence of H.
If the coefficients a and b are allowed to be 0, you get the same sequence but with all the entries decremented by 1.
(End)
a(n) = A069352(n) - A022329(n). - Reinhard Zumkeller, May 16 2015

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a022328 n = a022328_list !! (n-1)
    (a022328_list, a022329_list) = unzip $ f $ singleton (1, (0, 0)) where
       f s = (i, j) :
             f (insert (2 * y, (i + 1, j)) $ insert (3 * y, (i, j + 1)) s')
             where ((y, (i, j)), s') = deleteFindMin s
    -- Reinhard Zumkeller, Nov 19 2015, May 16 2015
    
  • Mathematica
    t = Sort[Flatten[Table[2^i 3^j, {i, 0, 200}, {j, 0, 200}]]];
    Table[IntegerExponent[t[[n]], 2], {n, 1, 200}]  (* A022338 *)
    (* Clark Kimberling, Mar 18 2015 *)
  • Python
    from sympy import integer_log
    def A022328(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum((x//3**i).bit_length() for i in range(integer_log(x,3)[0]+1))
        return (~(m:=bisection(f,n,n))&m-1).bit_length() # Chai Wah Wu, Sep 15 2024

Formula

a(n) = A191475(n) - 1. - Franklin T. Adams-Watters, Mar 19 2009 [Corrected by N. J. A. Sloane, May 26 2024]
A003586(n) = 2^a(n)*3^A022329(n). - N. J. A. Sloane, Mar 19 2009

A084532 Signature sequence of 1/phi = phi-1 = (sqrt(5)-1)/2 = 0.61803...

Original entry on oeis.org

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

Views

Author

Henry Bottomley, May 28 2003

Keywords

Comments

Arrange the numbers i+j*x (i,j >= 1) in increasing order; the sequence of i's is the signature of x; the sequence of j's is the signature of 1/x.

Crossrefs

Cf. A084531.

Formula

a(A054347(n) + A255977(m) + m*n) = n - 1. - Alan Michael Gómez Calderón, Dec 09 2024

A118276 Signature sequence of Phi^2 = 2.618033989... (A104457), where Phi is the golden ratio A001622.

Original entry on oeis.org

1, 2, 3, 1, 4, 2, 5, 3, 6, 1, 4, 7, 2, 5, 8, 3, 6, 1, 9, 4, 7, 2, 10, 5, 8, 3, 11, 6, 1, 9, 4, 12, 7, 2, 10, 5, 13, 8, 3, 11, 6, 14, 1, 9, 4, 12, 7, 15, 2, 10, 5, 13, 8, 16, 3, 11, 6, 14, 1, 9, 17, 4, 12, 7, 15, 2, 10, 18, 5, 13, 8, 16, 3, 11, 19, 6, 14, 1, 9, 17, 4, 12, 20, 7, 15, 2, 10, 18, 5, 13
Offset: 1

Views

Author

Casey Mongoven, Apr 21 2006

Keywords

Comments

Equals A023119 in the first 98 terms, then the sequences differ. [From R. J. Mathar, Aug 08 2008]

References

  • C. Kimberling, "Fractal Sequences and Interspersions", Ars Combinatoria, vol. 45 p 157 1997.

Crossrefs

Programs

  • Mathematica
    terms = 90; m = Ceiling[Sqrt[terms]]; s0 = {}; While[s = (Table[i + j*GoldenRatio^2, {i, 1, m}, {j, 1, m}] // Flatten // SortBy[#, N] &)[[1 ;; terms]] /. GoldenRatio -> 0; s != s0, s0 = s; m = 2 m]; s (* Jean-François Alcover, Jan 08 2017 *)

A167267 Interspersion of the signature sequence of (1+sqrt(5))/2.

Original entry on oeis.org

1, 3, 2, 7, 5, 4, 12, 10, 8, 6, 19, 16, 14, 11, 9, 28, 24, 21, 18, 15, 13, 38, 34, 30, 26, 23, 20, 17, 50, 45, 41, 36, 32, 29, 25, 22, 63, 58, 53, 48, 43, 39, 35, 31, 27, 78, 72, 67, 61, 56, 51, 46, 42, 37, 33
Offset: 1

Views

Author

Clark Kimberling, Oct 31 2009

Keywords

Comments

Row n is the ordered sequence of numbers k such that A084531(k)=n. Is the difference sequence of column 1 equal to A019446? Is the difference sequence of row 1 essentially equal to A026351?
As a sequence, A167267 is a permutation of the positive integers. As an array, A167267 is the joint-rank array (defined at A182801) of the numbers {i+j*r}, for i>=1, j>=1, where r = golden ratio = (1+sqrt(5))/2. - Clark Kimberling, Nov 10 2012
This is a transposable interspersion; i.e., its transpose, A283734, is also an interspersion. - Clark Kimberling, Mar 16 2017

Examples

			Northwest corner:
1....3....7....12...19...28...38
2....5....10...16...24...34...45
4....8....14...21...30...41...53
6....11...18...26...36...48...61
9....15...23...32...43...56...70
13...20...29...39...51...65...80
		

References

  • Clark Kimberling, "Fractal Sequences and Interspersions," Ars Combinatoria 45 (1997) 157-168.

Crossrefs

Programs

  • Mathematica
    v = GoldenRatio;
    x = Table[Sum[Ceiling[i*v], {i, q}], {q, 0, end = 35}];
    y = Table[Sum[Ceiling[i*1/v], {i, q}], {q, 0, end}];
    tot[p_, q_] := x[[p + 1]] + p q + 1 + y[[q + 1]]
    row[r_] := Table[tot[n, r], {n, 0, (end - 1)/v}]
    Grid[Table[row[n], {n, 0, (end - 1)}]]
    (* Norman Carey, Jul 03 2012 *)
  • PARI
    \\ Produces the triangle when the array is read by antidiagonals
    r = (1+sqrt(5))/2;
    z = 100;
    s(n) = if(n<1, 1, s(n - 1) + 1 + floor(n*r));
    p(n) = n + 1 + sum(k=0, n, floor((n - k)/r));
    u = v = vector(z + 1);
    for(n=1, 101, (v[n] = s(n - 1)));
    for(n=1, 101, (u[n] = p(n - 1)));
    w(i, j) = v[i] + u[j] + (i - 1) * (j - 1) - 1;
    tabl(nn) = {for(n=1, nn, for(k=1, n, print1(w(n - k + 1, k), ", "); ); print(); ); };
    tabl(10) \\ Indranil Ghosh, Mar 26 2017
    
  • Python
    # Produces the triangle when the array is read by antidiagonals
    import math
    from sympy import sqrt
    r=(1 + sqrt(5))/2
    def s(n): return 1 if n<1 else s(n - 1) + 1 + int(math.floor(n*r))
    def p(n): return n + 1 + sum(int(math.floor((n - k)/r)) for k in range(n+1))
    v=[s(n) for n in range(101)]
    u=[p(n) for n in range(101)]
    def w(i, j): return u[i - 1] + v[j - 1] + (i - 1) * (j - 1) - 1
    for n in range(1, 11):
        print([w(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, Mar 26 2017

Formula

R(m,n) = sum{[(m-i+n+r)/r], i=1,2,...z(m,n)}, where r = (1+sqrt(5))/2 and z(m,n) = m + [(n-1)*r]. - Clark Kimberling, Nov 10 2012

A215344 Value of x in the n-th number of the form x+y*(1+sqrt(5))/2.

Original entry on oeis.org

0, 1, 0, 2, 1, 3, 0, 2, 4, 1, 3, 0, 5, 2, 4, 1, 6, 3, 0, 5, 2, 7, 4, 1, 6, 3, 8, 0, 5, 2, 7, 4, 9, 1, 6, 3, 8, 0, 5, 10, 2, 7, 4, 9, 1, 6, 11, 3, 8, 0, 5, 10, 2, 7, 12, 4, 9, 1, 6, 11, 3, 8, 0, 13, 5, 10, 2, 7, 12, 4, 9, 1, 14, 6, 11, 3, 8, 0, 13, 5, 10, 2, 15, 7, 12, 4, 9, 1, 14, 6, 11, 3, 16, 8, 0, 13, 5, 10, 2, 15, 7, 12, 4, 17, 9, 1, 14, 6, 11, 3, 16, 8, 0, 13, 5
Offset: 1

Views

Author

Peter G. Anderson, Aug 08 2012

Keywords

Comments

Let x>=0, y>=0 be integers, sort according to x+y*(1+sqrt(5))/2, this sequence gives the x-values. [Joerg Arndt, Aug 16 2012]
The positive elements of this sequence are A084531. [Peter G. Anderson, Aug 28 2012]

Examples

			Let g = (1+sqrt(5))/2, sequences A215344 (x) and A215345 (y) start as:
[x+y*g, x, y]
[0.0000000, 0, 0]
[1.0000000, 1, 0]
[1.6180340, 0, 1]
[2.0000000, 2, 0]
[2.6180340, 1, 1]
[3.0000000, 3, 0]
[3.2360680, 0, 2]
[3.6180340, 2, 1]
[4.0000000, 4, 0]
[4.2360680, 1, 2]
[4.6180340, 3, 1]
[4.8541020, 0, 3]
[5.0000000, 5, 0]
[5.2360680, 2, 2]
[5.6180340, 4, 1]
- _Joerg Arndt_, Aug 17 2012.
		

Crossrefs

A215345 is the value of y.

Programs

  • PARI
    default(realprecision,99); /* using floats */
    g=(1+sqrt(5))/2; /* golden ratio */
    M = 100.0;  /* search limit:  x + y * g <= M */
    v=vector(ceil(M)^2);
    ct=0;
    { for (x=0, M,
        for (y=0, (M-x)/g,
            ct += 1;
            v[ct] = [x+y*g, x, y];
        );
    ); }
    v=vector(ct, n, v[n]);
    v=vecsort(v,1); /* sort according to x + y * g */
    v215344=vector(#v,n,v[n][2])
    v215345=vector(#v,n,v[n][3])
    /* Joerg Arndt, Aug 17 2012 */

A215345 Value of y in the n-th number of the form x+y*(1+sqrt(5))/2.

Original entry on oeis.org

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

Views

Author

Peter G. Anderson, Aug 08 2012

Keywords

Comments

Let x>=0, y>=0 be integers, sort according to x+y*(1+sqrt(5))/2, this sequence gives the y-values. - Joerg Arndt, Aug 16 2012

Examples

			Let g = (1+sqrt(5))/2, sequences A215344 (x) and A215345 (y) start as:
[x+y*g, x, y]
[0.0000000, 0, 0]
[1.0000000, 1, 0]
[1.6180340, 0, 1]
[2.0000000, 2, 0]
[2.6180340, 1, 1]
[3.0000000, 3, 0]
[3.2360680, 0, 2]
[3.6180340, 2, 1]
[4.0000000, 4, 0]
[4.2360680, 1, 2]
[4.6180340, 3, 1]
[4.8541020, 0, 3]
[5.0000000, 5, 0]
[5.2360680, 2, 2]
[5.6180340, 4, 1]
- _Joerg Arndt_, Aug 17 2012.
		

Crossrefs

A215344 is the value of x.

Programs

A167288 Signature sequence of Salem number 1.1762808182599176...

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 4, 3, 2, 1, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 8, 1, 7, 6, 5, 4, 3, 9, 2, 8, 1, 7, 6, 5, 4, 10, 3, 9, 2, 8, 1, 7, 6, 5, 11, 4, 10, 3, 9, 2, 8, 1, 7, 6, 12, 5, 11, 4, 10, 3, 9, 2, 8, 1, 7, 13, 6, 12, 5, 11, 4, 10, 3, 9, 2, 8, 1, 14, 7, 13, 6, 12, 5, 11, 4, 10, 3, 9
Offset: 1

Views

Author

Roger L. Bagula, Nov 01 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Mathematica code based on that for A007337 by Robert G. Wilson v.:
    m = x /. Solve[x^( 10) + x^9 - x^7 - x^6 - x^5 - x^4 - x^3 + x + 1 == 0, x][[2]]
    Take[Transpose[Sort[Flatten[Table[{i + j*m, i}, {i, 25}, {j, 17}], 1], #1[[1]] < #2[[1]] &]][[2]], 95]

A167968 Signature sequence of phi^4 = 0.14589803375032..., where phi is the golden ratio minus 1 (0.61803398874989...).

Original entry on oeis.org

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

Views

Author

Casey Mongoven, Nov 15 2009

Keywords

References

  • Clark Kimberling, "Fractal Sequences and Interspersions," Ars Combinatoria 45 (1997) 157-168.

Crossrefs

Programs

  • Mathematica
    terms = 105; m = Ceiling[Sqrt[terms]]; s0 = {}; While[s = (Table[i + j*(GoldenRatio-1)^4, {i, 1, m}, {j, 1, m}] // Flatten // SortBy[#, N]&)[[1 ;; terms]] /. GoldenRatio -> 1; s != s0, s0 = s; m = 2m]; s (* Jean-François Alcover, Jan 08 2017 *)

A167969 Signature sequence of phi^3 = 0.23606797749979..., where phi is the golden ratio 0.61803398874989... .

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 6, 2, 3, 4, 5, 1, 6, 2, 3, 4, 5, 1, 6, 2, 3, 4, 5, 1, 6, 2, 3, 4, 5, 1, 6, 2, 7, 3, 4, 5, 1, 6, 2, 7, 3, 4, 5, 1, 6
Offset: 1

Views

Author

Casey Mongoven, Nov 15 2009

Keywords

References

  • Clark Kimberling, "Fractal Sequences and Interspersions," Ars Combinatoria 45 (1997) 157-168.

Crossrefs

Programs

  • Mathematica
    terms = 105; m = Ceiling[Sqrt[terms]]; s0 = {}; While[s = (Table[i + j/GoldenRatio^3, {i, 1, m}, {j, 1, m}] // Flatten // SortBy[#, N] &)[[1 ;; terms]] /. GoldenRatio -> \[Infinity]; s != s0, s0 = s; m = 2 m]; s (* Jean-François Alcover, Jan 08 2017 *)

A167970 Signature sequence of phi^2 = 0.38196601125011..., where phi is the golden ratio 0.61803398874989... .

Original entry on oeis.org

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

Views

Author

Casey Mongoven, Nov 15 2009

Keywords

References

  • Clark Kimberling, "Fractal Sequences and Interspersions," Ars Combinatoria 45 (1997) 157-168.

Crossrefs

Programs

  • Mathematica
    terms = 105; m = Ceiling[Sqrt[terms]]; s0 = {}; While[s = (Table[i + j/GoldenRatio^2, {i, 1, m}, {j, 1, m}] // Flatten // SortBy[#, N] &)[[1 ;; terms]] /. GoldenRatio -> \[Infinity]; s != s0, s0 = s; m = 2 m]; s (* Jean-François Alcover, Jan 08 2017 *)
Showing 1-10 of 21 results. Next