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

A051064 3^a(n) exactly divides 3n. Or, 3-adic valuation of 3n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) is the Hamming distance between n and n-1 in ternary representation. - Philippe Deléham, Mar 29 2004
3^a(n) divides 4^n-1. - Benoit Cloitre, Oct 25 2004
Generalized Ruler Function for k=3. - Frank Ruskey and Chris Deugau (deugaucj(AT)uvic.ca)
a(A007417(n)) is odd and a(A145204(n)) is even. - Reinhard Zumkeller, May 23 2013
First n terms comprise least cubefree word of length n using positive integers, where "cubefree" means that the word contains no three consecutive identical subwords; e.g., 1 contains no cube; 11 contains no cube; 111 does but 112 does not; ... 1,1,2,1,1,2,1,1,1 does, and 1,1,2,1,1,2,1,1,2 does, but 1,1,2,1,1,2,1,1,3 does not, etc. - Clark Kimberling, Sep 10 2013
The sequence is invariant under the "lower trim" operator: remove all ones, and subtract one from each remaining term. - Franklin T. Adams-Watters, May 25 2017
a(n) is the dimension in which the coordinates of the vertices n-1 and n differ in the ternary reflected Gray code. - Arie Bos, Jul 12 2023
The number of powers of 3 that divide n. - Amiram Eldar, Mar 29 2025

Examples

			3^2 | 3*6 = 18, so a(6) = 2.
		

References

  • Letter from Gary W. Adamson to N. J. A. Sloane concerning Prouhet-Thue-Morse sequence, Nov. 11, 1999.

Crossrefs

Cf. A007949.
Partial sums give A004128.
Cf. A254046.

Programs

  • Haskell
    a051064 = (+ 1) . length .
                      takeWhile (== 3) . dropWhile (== 2) . a027746_row
    -- Reinhard Zumkeller, May 23 2013
    
  • Maple
    seq(1+padic:-ordp(n,3), n=1..100); # Robert Israel, Aug 07 2014
  • Mathematica
    Nest[ Function[ l, {Flatten[(l /. {1 -> {1, 1, 2}, 2 -> {1, 1, 3}, 3 -> {1, 1, 4}, 4 -> {1, 1, 5}})]}], {1}, 5] (* Robert G. Wilson v, Mar 03 2005 *)
    Table[ IntegerExponent[3n, 3], {n, 1, 105}] (* Jean-François Alcover, Oct 10 2011 *)
  • PARI
    a(n)=if(n<1,0,1+valuation(n,3))
    
  • Python
    def A051064(n):
        c = 1
        a, b = divmod(n,3)
        while b == 0:
            a, b = divmod(a,3)
            c += 1
        return c # Chai Wah Wu, Apr 18 2022

Formula

a(n) = A007949(n) + 1 = A004128(n) - A004128(n-1).
Multiplicative with a(p^e) = e+1 if p = 3; 1 if p <> 3. - Vladeta Jovovic, Aug 24 2002
G.f.: Sum_{k>=0} x^3^k/(1-x^3^k). - Ralf Stephan, Apr 12 2002
Fixed point of the morphism: 1 -> 112; 2 -> 113; 3 -> 114; 4 -> 115; ...; starting from a(1) = 1. a(3n+1) = a(3n+2) = 1; a(3n) = 1 + a(n). - Philippe Deléham, Mar 29 2004
a(n) = (-1)*Sum_{d divides n} mu(3d)*tau(n/d). - Benoit Cloitre, Jun 21 2007
Dirichlet g.f.: zeta(s)/(1-1/3^s). - R. J. Mathar, Jun 13 2011
a(n) = (1/2)*(3 - A053735(n) + A053735(n-1)) for n >= 1. - Tom Edgar, Aug 06 2014
a(n) = A007949(3n). - Cyril Damamme, Aug 04 2015
a(2n) = a(n), a(2n-1) = A254046(n). - Cyril Damamme, Aug 04 2015
G.f. A(x) satisfies: A(x) = A(x^3) + x/(1 - x). - Ilya Gutkovskiy, May 03 2019
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/2. - Amiram Eldar, Sep 11 2020 [corrected by Vaclav Kotesovec, Jun 25 2024, see also A004128]
a(n) = tau(n)/(tau(3*n) - tau(n)), where tau(n) = A000005(n). - Peter Bala, Jan 06 2021
G.f.: Sum_{i>=1, j>=0} x^(i*3^j). - Seiichi Manyama, Mar 23 2025
Conjecture: a(n) = A007949(A000045(4*n)), all other 3-adic quadrisections A007949(A000045(.))=0. [Lengyel?]. - R. J. Mathar, Jun 28 2025

Extensions

More terms from James Sellers, Dec 11 1999
More terms from Vladeta Jovovic, Aug 24 2002

A087289 a(n) = 2^(2*n+1) + 1.

Original entry on oeis.org

3, 9, 33, 129, 513, 2049, 8193, 32769, 131073, 524289, 2097153, 8388609, 33554433, 134217729, 536870913, 2147483649, 8589934593, 34359738369, 137438953473, 549755813889, 2199023255553, 8796093022209, 35184372088833, 140737488355329, 562949953421313, 2251799813685249
Offset: 0

Views

Author

W. Edwin Clark, Aug 29 2003

Keywords

Comments

Number of pairs of polynomials (f,g) in GF(2)[x] satisfying deg(f) <= n, deg(g) <= n and gcd(f,g) = 1.
An unpublished result due to Stephen Suen, David desJardins, and W. Edwin Clark. This is the case k = 2, q = 2 of their formula q^((n+1)*k) * (1 - 1/q^(k-1) + (q-1)/q^((n+1)*k)) for the number of ordered k-tuples (f_1, ..., f_k) of polynomials in GF(q)[x] such that deg(f_i) <= n for all i and gcd(f_1, ..., f_k) = 1.
Apparently the same as A084508 shifted left.
Terms in binary are palindromes of the form 1x1 where x is a string of 2*n zeros (A152577). - Brad Clardy, Sep 01 2011
For n > 0, a(n) is the number k such that the number of iterations of the map k -> (3k +1)/8 == 4 (mod 8) until reaching (3k +1)/8 <> 4 (mod 8) equals n. (see the Collatz problem: the start of the parity trajectory of a(n) is n times {100} = 100100100100...100abcd...). - Michel Lagneau, Jan 23 2012
An Engel expansion of 2 to the base 4 as defined in A181565, with the associated series expansion 2 = 4/3 + 4^2/(3*9) + 4^3/(3*9*33) + 4^4/(3*9*33*129) + .... Cf. A199561 and A207262. - Peter Bala, Oct 29 2013
For x = A083420(n), y = A000079(n+1), z = a(n) then x^2 + 2*y^2 = z^2. - Vincenzo Librandi, Jun 09 2014
A254046(n+1) is the 3-adic valuation of a(n). - Fred Daniel Kline, Jan 11 2017

Examples

			a(0) = 3 since there are three pairs, (0,1), (1,0) and (1,1) of polynomials (f,g) in GF(2)[x] of degree at most 0 such that gcd(f,g) = 1.
		

Crossrefs

Programs

  • Magma
    [2^(2*n+1) + 1: n in [0..30]]; // Vincenzo Librandi, May 16 2011
    
  • Mathematica
    Table[2^(2 n + 1) + 1, {n, 0, 20}] (* or *) 3 NestList[4 # - 1 &, 1, 20]
    (* or *) CoefficientList[Series[(3 - 6 x)/((1 - x) (1 - 4 x)), {x, 0, 20}], x] (* Michael De Vlieger, Mar 03 2017 *)
  • PARI
    a(n)=2^(2*n+1)+1 \\ Charles R Greathouse IV, Sep 24 2015

Formula

G.f.: (3-6*x)/((1-x)*(1-4*x)).
a(n) = 3*A007583(n).
a(n) = 4*a(n-1) - 3. - Lekraj Beedassy, Apr 29 2005
a(n) = A099393(n+1) - 2*A099393(n). - Brad Clardy, Sep 01 2011
a(n) = 2^(2*n + 1)*a(-1-n) for all n in Z. - Michael Somos, Jan 11 2017
a(n) = A283070(n) - 1. - Peter M. Chema, Mar 02 2017
From Elmo R. Oliveira, Feb 22 2025: (Start)
E.g.f.: exp(x)*(2*exp(3*x) + 1).
a(n) = 5*a(n-1) - 4*a(n-2). (End)

A191450 Dispersion of (3*n-1), read by antidiagonals.

Original entry on oeis.org

1, 2, 3, 5, 8, 4, 14, 23, 11, 6, 41, 68, 32, 17, 7, 122, 203, 95, 50, 20, 9, 365, 608, 284, 149, 59, 26, 10, 1094, 1823, 851, 446, 176, 77, 29, 12, 3281, 5468, 2552, 1337, 527, 230, 86, 35, 13, 9842, 16403, 7655, 4010, 1580, 689, 257, 104, 38, 15, 29525
Offset: 1

Views

Author

Clark Kimberling, Jun 05 2011

Keywords

Comments

Suppose that s is an increasing sequence of positive integers, that the complement t of s is infinite, and that t(1)=1. The dispersion of s is the array D whose n-th row is (t(n), s(t(n)), s(s(t(n))), s(s(s(t(n)))), ...). Every positive integer occurs exactly once in D, so that, as a sequence, D is a permutation of the positive integers. The sequence u given by u(n) = {index of the row of D that contains n} is a fractal sequence. In this case s(n) = A016789(n-1), t(n) = A032766(n) [from term A032766(1) onward] and u(n) = A253887(n). [Author's original comment edited by Antti Karttunen, Jan 24 2015]
For other examples of such sequences, please see the Crossrefs section.

Examples

			The northwest corner of the square array:
  1,  2,  5,  14,  41,  122,  365,  1094,  3281,   9842,  29525,   88574, ...
  3,  8, 23,  68, 203,  608, 1823,  5468, 16403,  49208, 147623,  442868, ...
  4, 11, 32,  95, 284,  851, 2552,  7655, 22964,  68891, 206672,  620015, ...
  6, 17, 50, 149, 446, 1337, 4010, 12029, 36086, 108257, 324770,  974309, ...
  7, 20, 59, 176, 527, 1580, 4739, 14216, 42647, 127940, 383819, 1151456, ...
  9, 26, 77, 230, 689, 2066, 6197, 18590, 55769, 167306, 501917, 1505750, ...
  etc.
The leftmost column is A032766, and each successive column to the right of it is obtained by multiplying the left neighbor on that row by three and subtracting one, thus the second column is (3*1)-1, (3*3)-1, (3*4)-1, (3*6)-1, (3*7)-1, (3*9)-1, ... = 2, 8, 11, 17, 20, 26, ...
		

Crossrefs

Inverse: A254047.
Transpose: A254051.
Column 1: A032766.
Cf. A007051, A057198, A199109, A199113 (rows 1-4).
Cf. A253887 (row index of n in this array) & A254046 (column index, see also A253786).
Examples of other arrays of dispersions: A114537, A035513, A035506, A191449, A191426-A191455.

Programs

  • Maple
    A191450 := proc(r, c)
        option remember;
        if c = 1 then
            A032766(r) ;
        else
            A016789(procname(r, c-1)-1) ;
        end if;
    end proc: # R. J. Mathar, Jan 25 2015
  • Mathematica
    (* Program generates the dispersion array T of increasing sequence f[n] *)
    r=40; r1=12; c=40; c1=12;
    f[n_] :=3n-1 (* complement of column 1 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]]
    (* A191450 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191450 sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011 *)
  • PARI
    a(n,k)=3^(n-1)*(k*3\2*2-1)\2+1 \\ =3^(n-1)*(k*3\2-1/2)+1/2, but 30% faster. - M. F. Hasler, Jan 20 2015
    
  • Scheme
    (define (A191450 n) (A191450bi (A002260 n) (A004736 n)))
    (define (A191450bi row col) (if (= 1 col) (A032766 row) (A016789 (- (A191450bi row (- col 1)) 1))))
    (define (A191450bi row col) (/ (+ 3 (* (A000244 col) (- (* 2 (A032766 row)) 1))) 6)) ;; Another implementation based on L. Edson Jeffery's direct formula.
    ;; Antti Karttunen, Jan 21 2015

Formula

Conjecture: A(n,k) = (3 + (2*A032766(n) - 1)*A000244(k))/6. - L. Edson Jeffery, with slight changes by Antti Karttunen, Jan 21 2015
a(n) = A254051(A038722(n)). [When both this and transposed array A254051 are interpreted as one-dimensional sequences.] - Antti Karttunen, Jan 22 2015

Extensions

Example corrected and description clarified by Antti Karttunen, Jan 24 2015

A254051 Square array A by downward antidiagonals: A(n,k) = (3 + 3^n*(2*floor(3*k/2) - 1))/6, n,k >= 1; read as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

1, 3, 2, 4, 8, 5, 6, 11, 23, 14, 7, 17, 32, 68, 41, 9, 20, 50, 95, 203, 122, 10, 26, 59, 149, 284, 608, 365, 12, 29, 77, 176, 446, 851, 1823, 1094, 13, 35, 86, 230, 527, 1337, 2552, 5468, 3281, 15, 38, 104, 257, 689, 1580, 4010, 7655, 16403, 9842, 16, 44, 113, 311, 770, 2066, 4739, 12029, 22964, 49208, 29525, 18, 47
Offset: 1

Views

Author

Keywords

Comments

This is transposed dispersion of (3n-1), starting from its complement A032766 as the first row of square array A(row,col). Please see the transposed array A191450 for references and background discussion about dispersions.
For any odd number x = A135765(row,col), the result after one combined Collatz step (3x+1)/2 -> x (A165355) is found in this array at A(row+1,col).

Examples

			The top left corner of the array:
   1,   3,   4,   6,   7,   9,  10,  12,   13,   15,   16,   18,   19,   21
   2,   8,  11,  17,  20,  26,  29,  35,   38,   44,   47,   53,   56,   62
   5,  23,  32,  50,  59,  77,  86, 104,  113,  131,  140,  158,  167,  185
  14,  68,  95, 149, 176, 230, 257, 311,  338,  392,  419,  473,  500,  554
  41, 203, 284, 446, 527, 689, 770, 932, 1013, 1175, 1256, 1418, 1499, 1661
...
		

Crossrefs

Inverse: A254052.
Transpose: A191450.
Row 1: A032766.
Cf. A007051, A057198, A199109, A199113 (columns 1-4).
Cf. A254046 (row index of n in this array, see also A253786), A253887 (column index).
Array A135765(n,k) = 2*A(n,k) - 1.
Other related arrays: A254055, A254101, A254102.
Related permutations: A048673, A254053, A183209, A249745, A254103, A254104.

Formula

In A(n,k)-formulas below, n is the row, and k the column index, both starting from 1:
A(n,k) = (3 + ( A000244(n) * (2*A032766(k) - 1) )) / 6. - Antti Karttunen after L. Edson Jeffery's direct formula for A191450, Jan 24 2015
A(n,k) = A048673(A254053(n,k)). [Alternative formula.]
A(n,k) = (1/2) * (1 + A003961((2^(n-1)) * A254050(k))). [The above expands to this.]
A(n,k) = (1/2) * (1 + (A000244(n-1) * A007310(k))). [Which further reduces to this, equivalent to L. Edson Jeffery's original formula above.]
A(1,k) = A032766(k) and for n > 1: A(n,k) = (3 * A254051(n-1,k)) - 1. [The definition of transposed dispersion of (3n-1).]
A(n,k) = (1+A135765(n,k))/2, or when expressed one-dimensionally, a(n) = (1+A135765(n))/2.
A(n+1,k) = A165355(A135765(n,k)).
As a composition of related permutations. All sequences interpreted as one-dimensional:
a(n) = A048673(A254053(n)). [Proved above.]
a(n) = A191450(A038722(n)). [Transpose of array A191450.]

A253887 Row index of n in A191450: a(3n) = 2n, a(3n+1) = 2n+1, a(3n+2) = a(n+1).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 22 2015

Keywords

Comments

a(n) gives the row index of n in square array A191450, or equally, the column index of n in A254051.

Crossrefs

Odd bisection of A126760.
Cf. A254046 (the corresponding column index).

Programs

  • Python
    def a(n):
        if n%3==0: return 2*n//3
        elif n%3==1: return 2*(n - 1)//3 + 1
        else: return a((n - 2)//3 + 1)
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 06 2017

Formula

a(3n) = 2n, a(3n+1) = 2n+1, a(3n+2) = a(n+1).
a(n) = A126760(2n-1).
a(n) = A249746(A003602(A064216(n))). - Antti Karttunen, Feb 04 2015

A253786 a(3n) = 0, a(3n+1) = 0, a(3n+2) = 1 + a(n+1).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 22 2015

Keywords

Comments

For n >= 1, a(n) gives the distance of n in square array A191450 from its leftmost column.
The sequence 0,1,0,0,0,2,0,...,i.e., (a(n)) with the first term removed, is the unique fixed point of the constant length 3 morphism N -> 0 N+1 0 on the infinite alphabet {0,1,...,N,...}. - Michel Dekking, Sep 09 2022
a(n) is the number of trailing 1 digits of n-1 written in ternary, for n>=1. - Kevin Ryde, Sep 09 2022

Crossrefs

Programs

  • Mathematica
    With[{nmax=200},IntegerExponent[2Range[0,nmax]-1,3]] (* Paolo Xausa, Nov 09 2023 *)
  • PARI
    a(n) = n--; my(ret=0,r); while([n,r]=divrem(n,3); r==1, ret++); ret; \\ Kevin Ryde, Sep 13 2022

Formula

Other identities and observations. For all n >= 1:
a(n) = A254046(n)-1.
a(n) <= A254045(n) <= A253894(n).
a(3n-1) = A254046(n). - Cyril Damamme, Aug 04 2015
a(n) = A007949(2n-1), i.e., the 3-adic valuation of 2n-1. - Cyril Damamme, Aug 04 2015
From Antti Karttunen, Sep 12 2017: (Start)
For all n >= 1:
a(n) = A007814(A064216(n)) = A007814(A254104(n)) = A135523(A245611(n)).
a(A048673(n)) = a(A254103(n)) = A007814(n).
a(A244154(n)) = A007814(1+n).
a(A245612(n)) = A135523(n). (End)
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/2. - Amiram Eldar, Nov 16 2023

A087088 Positive ruler-type fractal sequence with 1's in every third position.

Original entry on oeis.org

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

Views

Author

Enrico T. Federighi (rico125162(AT)aol.com), Aug 08 2003

Keywords

Comments

If all the terms in the sequence are reduced by one and then all zeros are removed, the result is the same as the original sequence.
From Benoit Cloitre, Mar 07 2009: (Start)
To construct the sequence:
Step 1: start from a sequence of 1's and leave two undefined places between every pair of 1's giving: 1,(),(),1,(),(),1,(),(),1,(),(),1,(),(),1,...
Step 2: replace the first undefined place with a 2 and henceforth leave two undefined places between two 2's giving: 1,2,(),1,(),2,1,(),(),1,2,(),1,(),2,1,...
Step 3: replace the first undefined place with a 3 and henceforth leave two undefined places between two 3's giving: 1,2,3,1,(),2,1,(),3,1,2,(),1,(),2,1,...
Step 4: replace the first undefined place with a 4 and leave 2 undefined places between two 4's giving: 1,2,3,1,4,2,1,(),3,1,2,(),1,4,2,1,... Iterating the process indefinitely yields the sequence: 1,2,3,1,4,2,1,5,3,1,2,6,1,4,2,1,... (End)
From Peter Munn, Jul 10 2020: (Start)
For k >= 1, the number k occurs in a pattern with fundamental period 3^k, and with points of mirror symmetry at intervals of (3^k)/2. Those points have an extrapolated common origin (for k >= 1) at an offset 1.5 to the left of the sequence's initial "1". The snake format illustration in the example section may be useful for visualizing this.
(End)
For k >= 1, k first occurs at position A061419(k) and its k-th occurrence is at position A083045(k-1). - Peter Munn, Aug 23 2020
(a(n)) is the unique fixed point of the two-block substitution a,b -> 1,a+1,b+1, where a,b are natural numbers. - Michel Dekking, Sep 26 2022

Examples

			From _Peter Munn_, Jul 03 2020: (Start)
Listing the terms in a snake format (with period 27) illustrates periodic and mirror symmetries. Horizontal lines mark points of mirror symmetry for 3's. Vertical lines mark further points of mirror symmetry for 2's. 79 terms are shown. (Referred to the extrapolated common origin of periodic mirror symmetry, the initial term is at offset 1.5 and the last shown is at offset 79.5 = 3^4 - 1.5.) Observe also mirror symmetry of 4's (seen vertically).
    1  2  3  1  4  2  1  5   3  1  2  6
             |             |            1 --
    1  2  3  1  5  2  1  7   3  1  2  4
_ 4
  8
    1  2  3  1  6  2  1  4   3  1  2  5
             |             |            1 --
    1  2  3  1  7  2  1  4   3  1  2  9
_ 5
  4
    1  2  3  1  6  2  1 10   3  1  2  4
             |             |            1 --
    1  2  3  1  4  2  1  8   3  1  2  5
(End)
From _Peter Munn_, Aug 22 2020: (Start)
The start of the sequence is shown below in conjunction with related sequences, aligning their points of mirror symmetry. The longer, and shorter, vertical lines indicate points of mirror symmetry for terms valued less than 4, and less than 3, respectively. Note each term of A051064 is the minimum of two terms displayed nearest below it, and each term of A254046 is the minimum of the two terms displayed diagonally above it.
        |                          |                          |
A051064:| 1 1 2 1 1 2 1 1 3 1 1 2 1 1 2 1 1 3 1 1 2 1 1 2 1 1 4 1 1 2
        |        |        |        |        |        |        |
[a(n)]: |  1 2 3 1 4 2 1 5 3 1 2 6 1 4 2 1 3 7 1 2 5 1 3 2 1 4 8 1 2 3
        |        |        |        |        |        |        |
A254046:|1 2 1 1 3 1 1 2 1 1 2 1 1 4 1 1 2 1 1 2 1 1 3 1 1 2 1 1 2 1 1
        |                          |                          |
(End)
		

Crossrefs

Sequences with equivalent symmetries: A051064, A254046.
Records are given by A061419: a(A061419(n))=n.
Essentially the odd bisection of A335933.
Sequence with similar definition: A087165.
Ordinal transform of A163491, with which this sequence has a joint relationship to A083044, A083045.
See also the comment in A024629.

Programs

Formula

a(n) = 1 when n == 1 (mod 3), otherwise a(n) = a(n-ceiling(n/3)) + 1.
a(n) = 3 + A244040(3*(n-1)) - A244040(3*n). - Tom Edgar and James Van Alstine, Aug 04 2014
From Peter Munn, Aug 22 2020: (Start)
For m >= 0, a(3*m+1) = 1; a(3*m+2) = a(2*m+1) + 1; a(3*m+3) = a(2*m+2) + 1.
For n >= 1, the following identities hold.
a(n) = A335933(2*n+1).
A083044(A163491(n) - 1, a(n) - 1) = n.
A051064(n+1) = min(a(n), a(n+1)).
A254046(n+2) = min(a(n), a(n+2)). (End)

Extensions

More terms from Paul D. Hanna, Aug 21 2003
Offset changed by M. F. Hasler (following remarks by Peter Munn), Jul 13 2020
Thanks to Allan C. Wechsler for suggesting the new name. - N. J. A. Sloane, Jul 14 2020

A254052 Inverse permutation to A254051.

Original entry on oeis.org

1, 3, 2, 4, 6, 7, 11, 5, 16, 22, 8, 29, 37, 10, 46, 56, 12, 67, 79, 17, 92, 106, 9, 121, 137, 23, 154, 172, 30, 191, 211, 13, 232, 254, 38, 277, 301, 47, 326, 352, 15, 379, 407, 57, 436, 466, 68, 497, 529, 18, 562, 596, 80, 631, 667, 93, 704, 742, 24, 781, 821, 107, 862, 904, 122, 947, 991, 14, 1036, 1082, 138, 1129, 1177, 155, 1226, 1276, 31
Offset: 1

Views

Author

Antti Karttunen, Jan 24 2015

Keywords

Crossrefs

Inverse: A254051.
Related permutations: A064216, A254054.

Programs

  • Scheme
    (define (A254052 n) (let ((x (A254046 n)) (y (A253887 n))) (* (/ 1 2) (- (expt (+ x y) 2) x y y y -2))))

Formula

As a composition of other permutations:
a(n) = A254054(A064216(n)).

A189637 Positions of 1 in A116178; complement of A189636.

Original entry on oeis.org

3, 6, 8, 9, 12, 15, 17, 18, 21, 23, 24, 26, 27, 30, 33, 35, 36, 39, 42, 44, 45, 48, 50, 51, 53, 54, 57, 60, 62, 63, 66, 68, 69, 71, 72, 75, 77, 78, 80, 81, 84, 87, 89, 90, 93, 96, 98, 99, 102, 104, 105, 107, 108, 111, 114, 116, 117, 120, 123, 125, 126, 129, 131, 132, 134, 135, 138, 141, 143, 144, 147, 149, 150, 152, 153, 156, 158, 159, 161, 162, 165, 168, 170, 171, 174
Offset: 1

Views

Author

Clark Kimberling, Apr 24 2011

Keywords

Comments

See A116178.

Crossrefs

Programs

  • Mathematica
    t = Nest[Flatten[# /. {0->{0,0,1}, 1->{0,1,1}}] &, {0}, 5] (* A116178 *)
    f[n_] := t[[n]]
    Flatten[Position[t, 0]] (* A189636 *)
    Flatten[Position[t, 1]] (* A189637 *)
    s[n_] := Sum[f[i], {i, 1, n}]; s[0] = 0;
    Table[s[n], {n, 1, 120}] (* A189638 *)

Formula

A340407(a(n)) = A254046(a(n)). Discovered with help from sequencedb.net. - Thomas Scheuerle, Jun 20 2022

A254047 Inverse permutation to A191450.

Original entry on oeis.org

1, 2, 3, 6, 4, 10, 15, 5, 21, 28, 9, 36, 45, 7, 55, 66, 14, 78, 91, 20, 105, 120, 8, 136, 153, 27, 171, 190, 35, 210, 231, 13, 253, 276, 44, 300, 325, 54, 351, 378, 11, 406, 435, 65, 465, 496, 77, 528, 561, 19, 595, 630, 90, 666, 703, 104, 741, 780, 26, 820, 861, 119, 903, 946, 135, 990, 1035, 12, 1081, 1128, 152, 1176, 1225, 170, 1275, 1326, 34
Offset: 1

Views

Author

Antti Karttunen, Jan 24 2015

Keywords

Crossrefs

Programs

  • Scheme
    (define (A254047 n) (let ((x (A253887 n)) (y (A254046 n))) (* (/ 1 2) (- (expt (+ x y) 2) x y y y -2))))
Showing 1-10 of 11 results. Next