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

A254053 Square array: A(row,col) = 2^(row-1) * ((2*A249745(col))-1) = A064216(A254051(row,col)), read by antidiagonals 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, 5, 6, 4, 7, 10, 12, 8, 11, 14, 20, 24, 16, 13, 22, 28, 40, 48, 32, 17, 26, 44, 56, 80, 96, 64, 19, 34, 52, 88, 112, 160, 192, 128, 9, 38, 68, 104, 176, 224, 320, 384, 256, 23, 18, 76, 136, 208, 352, 448, 640, 768, 512, 29, 46, 36, 152, 272, 416, 704, 896, 1280, 1536, 1024, 15, 58, 92, 72, 304, 544, 832, 1408, 1792, 2560, 3072, 2048, 31, 30
Offset: 1

Views

Author

Antti Karttunen, Jan 24 2015

Keywords

Comments

Shares with A135764 and A253551 the property that A001511(n) = k for all terms n on row k and when going downward in each column, terms grow by doubling.

Examples

			The top left corner of the array:
   1,  3,  5,   7,  11,  13,  17,  19,   9,  23,  29,  15,  31,  37,  41,  43,
   2,  6, 10,  14,  22,  26,  34,  38,  18,  46,  58,  30,  62,  74,  82,  86,
   4, 12, 20,  28,  44,  52,  68,  76,  36,  92, 116,  60, 124, 148, 164, 172,
   8, 24, 40,  56,  88, 104, 136, 152,  72, 184, 232, 120, 248, 296, 328, 344,
  16, 48, 80, 112, 176, 208, 272, 304, 144, 368, 464, 240, 496, 592, 656, 688,
...
		

Crossrefs

Inverse: A254054.
Similar or related permutations: A135764, A253551, A064216, A254051.

Formula

A(row,col) = A135764(row, A249745(col)). [Is otherwise the same array as A135764, but the column positions have been permuted by A249745.]
A(row,col) = 2^(row-1) * ((2*A249745(col))-1) = 2^(row-1) * A254050(col). [The above expands to this.]
a(n) = A064989(A135765(n)).
As a composition of other permutations:
a(n) = A064216(A254051(n)). [As an array: A(row,col) = A064216(A254051(row,col)).]

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

A254055 Square array: A(row,col) = A003602(A254051(row,col)), read by antidiagonals A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

1, 2, 1, 1, 1, 3, 2, 6, 12, 4, 4, 9, 1, 9, 21, 5, 3, 13, 48, 102, 31, 3, 7, 30, 75, 36, 10, 183, 2, 15, 39, 6, 112, 426, 912, 274, 7, 18, 22, 58, 264, 669, 160, 684, 1641, 8, 10, 7, 129, 345, 198, 1003, 3828, 8202, 2461, 1, 6, 57, 156, 193, 517, 2370, 6015, 2871, 3076, 14763, 5, 24, 66, 85, 117, 1155, 3099, 889, 9022, 34446, 73812, 22144
Offset: 1

Views

Author

Antti Karttunen, Jan 27 2015

Keywords

Comments

Starting with an odd number x = A135765(row,col), the result after one combined Collatz step (3x+1)/2 is found in A254051(row+1,col), and after iterated [i.e., we divide all powers of 2 out] Collatz step: x_new <- A139391(x) = A000265(3x+1) the resulting odd number x_new is located A135764(1,A(row+1,col)).
What the resulting odd number will be, is given by A254101(row+1,col).

Examples

			The top left corner of the array:
    1,   2,    1,    2,    4,    5,     3,     2,    7,    8,     1, ...
    1,   1,    6,    9,    3,    7,    15,    18,   10,    6,    24, ...
    3,  12,    1,   13,   30,   39,    22,     7,   57,   66,    18, ...
    4,   9,   48,   75,    6,   58,   129,   156,   85,   25,   210, ...
   21, 102,   36,  112,  264,  345,   193,   117,  507,  588,    79, ...
   31,  10,  426,  669,  198,  517,  1155,  1398,  760,  441,  1884, ...
  183, 912,  160, 1003, 2370, 3099,  1732,    66, 4557, 5286,  1413, ...
  274, 684, 3828, 6015,  889, 4648, 10389, 12576, 6835,  496, 16950, ...
etc.
		

Crossrefs

A254101 Square array A(row,col) = A000265(A254051(row,col)).

Original entry on oeis.org

1, 3, 1, 1, 1, 5, 3, 11, 23, 7, 7, 17, 1, 17, 41, 9, 5, 25, 95, 203, 61, 5, 13, 59, 149, 71, 19, 365, 3, 29, 77, 11, 223, 851, 1823, 547, 13, 35, 43, 115, 527, 1337, 319, 1367, 3281, 15, 19, 13, 257, 689, 395, 2005, 7655, 16403, 4921, 1, 11, 113, 311, 385, 1033, 4739, 12029, 5741, 6151, 29525
Offset: 1

Views

Author

Antti Karttunen, Jan 28 2015

Keywords

Comments

Starting with an odd number x = A135765(row,col), the result after one combined Collatz step (3x+1)/2 is found in A254051(row+1,col), and after iterated [i.e., we divide all powers of 2 out] Collatz step: x_new <- A139391(x) = A000265(3x+1) the resulting odd number x_new is located at the first row of array A135764 as x_new = A135764(1,A254055(row+1,col)) and it is given here as A(row+1,col) = A000265(A254051(row+1,col)).
That number's column index in array A135765 is then given by A254102(row+1,col).

Examples

			The top left corner of the array:
    1,    3,    1,     3,    7,    9,     5,     3,    13,    15,     1, ...
    1,    1,   11,    17,    5,   13,    29,    35,    19,    11,    47, ...
    5,   23,    1,    25,   59,   77,    43,    13,   113,   131,    35, ...
    7,   17,   95,   149,   11,  115,   257,   311,   169,    49,   419, ...
   41,  203,   71,   223,  527,  689,   385,   233,  1013,  1175,   157, ...
   61,   19,  851,  1337,  395, 1033,  2309,  2795,  1519,   881,  3767, ...
  365, 1823,  319,  2005, 4739, 6197,  3463,   131,  9113, 10571,  2825, ...
  547, 1367, 7655, 12029, 1777, 9295, 20777, 25151, 13669,   991, 33899, ...
etc.
		

Crossrefs

Programs

Formula

A(row,col) = A000265(A254051(row,col)).
A(row,col) = (2*A254055(row,col))-1.
A(row,col) = A003961(A254055(row, A249745(col))).
A(row+1,col) = A139391(A135765(row,col)).
As compositions of one-dimensional sequences:
a(n) = A000265(A254051(n)).
a(n) = (2*A254055(n))-1.

A032766 Numbers that are congruent to 0 or 1 (mod 3).

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40, 42, 43, 45, 46, 48, 49, 51, 52, 54, 55, 57, 58, 60, 61, 63, 64, 66, 67, 69, 70, 72, 73, 75, 76, 78, 79, 81, 82, 84, 85, 87, 88, 90, 91, 93, 94, 96, 97, 99, 100, 102, 103
Offset: 0

Views

Author

Patrick De Geest, May 15 1998

Keywords

Comments

Omitting the initial 0, a(n) is the number of 1's in the n-th row of the triangle in A118111. - Hans Havermann, May 26 2002
Binomial transform is A053220. - Michael Somos, Jul 10 2003
Smallest number of different people in a set of n-1 photographs that satisfies the following conditions: In each photograph there are 3 women, the woman in the middle is the mother of the person on her left and is a sister of the person on her right and the women in the middle of the photographs are all different. - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Sep 22 2006
Partial sums of A000034. - Richard Choulet, Jan 28 2010
Starting with 1 = row sums of triangle A171370. - Gary W. Adamson, Feb 15 2010
a(n) is the set of values for m in which 6k + m can be a perfect square (quadratic residues of 6 including trivial case of 0). - Gary Detlefs, Mar 19 2010
For n >= 2, a(n) is the smallest number with n as an anti-divisor. - Franklin T. Adams-Watters, Oct 28 2011
Sequence is also the maximum number of floors with 3 elevators and n stops in a "Convenient Building". See A196592 and Erich Friedman link below. - Robert Price, May 30 2013
a(n) is also the total number of coins left after packing 4-curves patterns (4c2) into a fountain of coins base n. The total number of 4c2 is A002620 and voids left is A000982. See illustration in links. - Kival Ngaokrajang, Oct 26 2013
Number of partitions of 6n into two even parts. - Wesley Ivan Hurt, Nov 15 2014
Number of partitions of 3n into exactly 2 parts. - Colin Barker, Mar 23 2015
Nonnegative m such that floor(2*m/3) = 2*floor(m/3). - Bruno Berselli, Dec 09 2015
For n >= 3, also the independence number of the n-web graph. - Eric W. Weisstein, Dec 31 2015
Equivalently, nonnegative numbers m for which m*(m+2)/3 and m*(m+5)/6 are integers. - Bruno Berselli, Jul 18 2016
Also the clique covering number of the n-Andrásfai graph for n > 0. - Eric W. Weisstein, Mar 26 2018
Maximum sum of degeneracies over all decompositions of the complete graph of order n+1 into three factors. The extremal decompositions are characterized in the Bickle link below. - Allan Bickle, Dec 21 2021
Also the Hadwiger number of the n-cocktail party graph. - Eric W. Weisstein, Apr 30 2022
The number of integer rectangles with a side of length n+1 and the property: the bisectors of the angles form a square within its limits. - Alexander M. Domashenko, Oct 17 2024
The maximum possible number of 5-cycles in an outerplanar graph on n+4 vertices. - Stephen Bartell, Jul 10 2025

Crossrefs

Cf. A006578 (partial sums), A000034 (first differences), A016789 (complement).
Essentially the same: A049624.
Column 1 (the second leftmost) of triangular table A026374.
Column 1 (the leftmost) of square array A191450.
Row 1 of A254051.
Row sums of A171370.
Cf. A066272 for anti-divisors.
Cf. A253888 and A254049 (permutations of this sequence without the initial zero).
Cf. A254103 and A254104 (pair of permutations based on this sequence and its complement).

Programs

  • Haskell
    a032766 n = div n 2 + n  -- Reinhard Zumkeller, Dec 13 2014
    (MIT/GNU Scheme) (define (A032766 n) (+ n (floor->exact (/ n 2)))) ;; Antti Karttunen, Jan 24 2015
    
  • Magma
    &cat[ [n, n+1]: n in [0..100 by 3] ]; // Vincenzo Librandi, Nov 16 2014
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=a[n-2]+3 od: seq(a[n], n=0..69); # Zerinvary Lajos, Mar 16 2008
    seq(floor(n/2)+n, n=0..69); # Gary Detlefs, Mar 19 2010
    select(n->member(n mod 3,{0,1}), [$0..103]); # Peter Luschny, Apr 06 2014
  • Mathematica
    a[n_] := a[n] = 2a[n - 1] - 2a[n - 3] + a[n - 4]; a[0] = 0; a[1] = 1; a[2] = 3; a[3] = 4; Array[a, 60, 0] (* Robert G. Wilson v, Mar 28 2011 *)
    Select[Range[0, 200], MemberQ[{0, 1}, Mod[#, 3]] &] (* Vladimir Joseph Stephan Orlovsky, Feb 11 2012 *)
    Flatten[{#,#+1}&/@(3Range[0,40])] (* or *) LinearRecurrence[{1,1,-1}, {0,1,3}, 100] (* or *) With[{nn=110}, Complement[Range[0,nn], Range[2,nn,3]]] (* Harvey P. Dale, Mar 10 2013 *)
    CoefficientList[Series[x (1 + 2 x) / ((1 - x) (1 - x^2)), {x, 0, 100}], x] (* Vincenzo Librandi, Nov 16 2014 *)
    Floor[3 Range[0, 69]/2] (* L. Edson Jeffery, Jan 14 2017 *)
    Drop[Range[0,110],{3,-1,3}] (* Harvey P. Dale, Sep 02 2023 *)
  • PARI
    {a(n) = n + n\2}
    
  • PARI
    concat(0, Vec(x*(1+2*x)/((1-x)*(1-x^2)) + O(x^100))) \\ Altug Alkan, Dec 09 2015
    
  • SageMath
    [int(3*n//2) for n in range(101)] # G. C. Greubel, Jun 23 2024

Formula

G.f.: x*(1+2*x)/((1-x)*(1-x^2)).
a(-n) = -A007494(n).
a(n) = A049615(n, 2), for n > 2.
From Paul Barry, Sep 04 2003: (Start)
a(n) = (6n - 1 + (-1)^n)/4.
a(n) = floor((3n + 2)/2) - 1 = A001651(n) - 1.
a(n) = sqrt(2) * sqrt( (6n-1) (-1)^n + 18n^2 - 6n + 1 )/4.
a(n) = Sum_{k=0..n} 3/2 - 2*0^k + (-1)^k/2. (End)
a(n) = 3*floor(n/2) + (n mod 2) = A007494(n) - A000035(n). - Reinhard Zumkeller, Apr 04 2005
a(n) = 2 * A004526(n) + A004526(n+1). - Philippe Deléham, Aug 07 2006
a(n) = 1 + ceiling(3*(n-1)/2). - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Sep 22 2006
Row sums of triangle A133083. - Gary W. Adamson, Sep 08 2007
a(n) = (cos(Pi*n) - 1)/4 + 3*n/2. - Bart Snapp (snapp(AT)coastal.edu), Sep 18 2008
A004396(a(n)) = n. - Reinhard Zumkeller, Oct 30 2009
a(n) = floor(n/2) + n. - Gary Detlefs, Mar 19 2010
a(n) = 3n - a(n-1) - 2, for n>0, a(0)=0. - Vincenzo Librandi, Nov 19 2010
a(n) = n + (n-1) - (n-2) + (n-3) - ... 1 = A052928(n) + A008619(n-1). - Jaroslav Krizek, Mar 22 2011
a(n) = a(n-1) + a(n-2) - a(n-3). - Robert G. Wilson v, Mar 28 2011
a(n) = Sum_{k>=0} A030308(n,k) * A003945(k). - Philippe Deléham, Oct 17 2011
a(n) = 2n - ceiling(n/2). - Wesley Ivan Hurt, Oct 25 2013
a(n) = A000217(n) - 2 * A002620(n-1). - Kival Ngaokrajang, Oct 26 2013
a(n) = Sum_{i=1..n} gcd(i, 2). - Wesley Ivan Hurt, Jan 23 2014
a(n) = 2n + floor((-n - (n mod 2))/2). - Wesley Ivan Hurt, Mar 31 2014
A092942(a(n)) = n for n > 0. - Reinhard Zumkeller, Dec 13 2014
a(n) = floor(3*n/2). - L. Edson Jeffery, Jan 18 2015
a(n) = A254049(A249745(n)) = (1+A007310(n)) / 2 for n >= 1. - Antti Karttunen, Jan 24 2015
E.g.f.: (3*x*exp(x) - sinh(x))/2. - Ilya Gutkovskiy, Jul 18 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(6*sqrt(3)) + log(3)/2. - Amiram Eldar, Dec 04 2021

Extensions

Better description from N. J. A. Sloane, Aug 01 1998

A254049 Odd bisection of A048673: a(n) = A048673(2*n-1).

Original entry on oeis.org

1, 3, 4, 6, 13, 7, 9, 18, 10, 12, 28, 15, 25, 63, 16, 19, 33, 39, 21, 43, 22, 24, 88, 27, 61, 48, 30, 46, 58, 31, 34, 138, 60, 36, 73, 37, 40, 123, 72, 42, 313, 45, 67, 78, 49, 94, 93, 81, 51, 163, 52, 54, 193, 55, 57, 103, 64, 102, 213, 105, 85, 108, 172, 66, 118, 69, 127, 438, 70, 75, 133, 111, 109, 303
Offset: 1

Views

Author

Antti Karttunen, Jan 24 2015

Keywords

Comments

Shift the prime factorization of odd numbers one step towards larger primes, add one and divide by two.

Examples

			For n = 8, the eighth odd number is 2*8 - 1 = 15 = 3*5 = prime(2) * prime(3). By adding one to both prime indices, we get prime(3) * prime(4) = 5*7 = 35, and (35+1)/2 = 18, thus a(8) = 18. Here prime(n) = A000040(n).
		

Crossrefs

Cf. A032766 (omitting the initial 0, the same sequence sorted into ascending order).
Also a permutation of A253888.

Formula

a(n) = A048673(2*n-1) = (1+A003961(2*n-1)) / 2 = (1+A249735(n)) / 2.
a(n) = A032766(A249746(n)).

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

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

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

Original entry on oeis.org

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, 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, 6, 1, 1, 2, 1, 1, 2
Offset: 1

Views

Author

Antti Karttunen, Jan 24 2015

Keywords

Comments

Equally, the row index of n in A254051.
a(n) is the 3-adic valuation of A087289(n-1). - Fred Daniel Kline, Jan 11 2017

Crossrefs

One more than A253786.
Cf. A253887 (the corresponding row index).
Odd bisection of A051064.

Programs

  • Mathematica
    With[{nmax=200},IntegerExponent[6Range[nmax]-3,3]] (* Paolo Xausa, Nov 10 2023 *)

Formula

a(3n) = 1, a(3n+1) = 1, a(3n+2) = 1 + a(n+1).
a(n) = A253786(n) + 1.
a(n) = A253786(3n-1). - Cyril Damamme, Aug 04 2015
a(n) = A051064(2n-1), i.e., the 3-adic valuation of 6n-3. - Cyril Damamme, Aug 04 2015
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/2. - Amiram Eldar, Nov 16 2023

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