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-7 of 7 results.

A371103 Array A read by upward antidiagonals in which the entry A(n,k) in row n and column k is defined by A(n, k) = A371092(A371102(n, k)), n,k >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 21 2024

Keywords

Comments

A(n, k) gives the column index of A371102(n, k) in array A257852.

Examples

			Array begins:
n\k| 1  2   3   ...
---+--------------------------------------------------------------------
1  | 1, 2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,
2  | 1, 3,  3,  6,  2,  9,  6, 12,  1, 15,  9, 18,  5, 21, 12, 24,  4,
3  | 1, 3,  1,  9,  3,  1,  8, 18,  1, 12,  7, 27,  2,  8, 17, 36,  5,
4  | 1, 1,  1,  1,  3,  1, 12, 27,  1, 17,  2, 21,  3, 12,  4, 54,  2,
5  | 1, 1,  1,  1,  1,  1, 18, 21,  1,  4,  2, 16,  3, 18,  5, 81,  3,
6  | 1, 1,  1,  1,  1,  1, 27, 16,  1,  5,  3, 23,  1, 27,  2, 16,  3,
7  | 1, 1,  1,  1,  1,  1, 21, 23,  1,  2,  3, 18,  1, 21,  3, 23,  1,
8  | 1, 1,  1,  1,  1,  1, 16, 18,  1,  3,  1, 26,  1, 16,  3, 18,  1,
9  | 1, 1,  1,  1,  1,  1, 23, 26,  1,  3,  1, 39,  1, 23,  1, 26,  1,
10 | 1, 1,  1,  1,  1,  1, 18, 39,  1,  1,  1, 30,  1, 18,  1, 39,  1,
11 | 1, 1,  1,  1,  1,  1, 26, 30,  1,  1,  1, 44,  1, 26,  1, 30,  1,
12 | 1, 1,  1,  1,  1,  1, 39, 44,  1,  1,  1, 66,  1, 39,  1, 44,  1,
13 | 1, 1,  1,  1,  1,  1, 30, 66,  1,  1,  1, 99,  1, 30,  1, 66,  1,
14 | 1, 1,  1,  1,  1,  1, 44, 99,  1,  1,  1, 75,  1, 44,  1, 99,  1,
15 | 1, 1,  1,  1,  1,  1, 66, 75,  1,  1,  1, 28,  1, 66,  1, 75,  1,
16 | 1, 1,  1,  1,  1,  1, 99, 28,  1,  1,  1, 42,  1, 99,  1, 28,  1,
17 | 1, 1,  1,  1,  1,  1, 75, 42,  1,  1,  1, 63,  1, 75,  1, 42,  1,
18 | 1, 1,  1,  1,  1,  1, 28, 63,  1,  1,  1, 48,  1, 28,  1, 63,  1,
19 | 1, 1,  1,  1,  1,  1, 42, 48,  1,  1,  1, 71,  1, 42,  1, 48,  1,
20 | 1, 1,  1,  1,  1,  1, 63, 71,  1,  1,  1, 54,  1, 63,  1, 71,  1,
21 | 1, 1,  1,  1,  1,  1, 48, 54,  1,  1,  1, 80,  1, 48,  1, 54,  1,
		

Crossrefs

Cf. A000027 (row 1), A257852, A371092, A371102.
Cf. also arrays A371097, A371101.

Programs

A371094 a(n) = m*(2^e) + ((4^e)-1)/3, where m = 3n+1, and e is the 2-adic valuation of m.

Original entry on oeis.org

1, 21, 7, 21, 13, 341, 19, 45, 25, 117, 31, 69, 37, 341, 43, 93, 49, 213, 55, 117, 61, 5461, 67, 141, 73, 309, 79, 165, 85, 725, 91, 189, 97, 405, 103, 213, 109, 1877, 115, 237, 121, 501, 127, 261, 133, 1109, 139, 285, 145, 597, 151, 309, 157, 5461, 163, 333, 169, 693, 175, 357, 181, 1493, 187, 381, 193, 789, 199
Offset: 0

Views

Author

Antti Karttunen (proposed by Ali Sada), Apr 19 2024

Keywords

Comments

Construction: take the binary expansion of 3n+1 (A016777(n)), and substitute "01" for all trailing 0-bits that follow after its odd part (= A067745(1+n)), of which there are A371093(n) in total. See the examples.

Examples

			For n=1, 3*n+1 = 4, "100" in binary, when we substitute 01's for the two trailing 0's, we obtain 21, "10101" in binary, therefore a(1) = 21.
For n=6, 3*6+1 = 19, "10011" in binary, and there are no trailing 0's, and no changes, therefore a(6) = 19.
For n=7, 3*7+1 = 22, "10110" in binary, with one trailing 0, which when replaced with 01 gives us 45, "101101" in binary, therefore a(7) = 45.
For n=229, there are e=4 trailing bit expansions 0 -> 01,
  3n+1 = binary  101011  0 0 0 0
  a(n) = binary  101011 01010101
		

Crossrefs

Cf. A016921, A372351 (even and odd bisection), A372290 (numbers occurring in the latter).
Cf. also A302338.

Programs

  • Mathematica
    Array[#2*(2^#3) + ((4^#3) - 1)/3 & @@ {#1, #2, IntegerExponent[#2, 2]} & @@ {#, 3 #1 + 1} &, 67, 0] (* Michael De Vlieger, Apr 19 2024 *)
  • PARI
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    
  • Python
    def A371094(n): return ((m:=3*n+1)<<(e:=(~m & m-1).bit_length()))+((1<<(e<<1))-1)//3 # Chai Wah Wu, Apr 28 2024

Formula

a(n) = A372289(A016777(n)).
a(2n) = A016777(2n) = A016921(n).

A257852 Array A read by upward antidiagonals in which the entry A(n,k) in row n and column k is defined by A(n,k) = (2^n*(6*k - 3 - 2*(-1)^n) - 1)/3, n,k >= 1.

Original entry on oeis.org

3, 1, 7, 13, 9, 11, 5, 29, 17, 15, 53, 37, 45, 25, 19, 21, 117, 69, 61, 33, 23, 213, 149, 181, 101, 77, 41, 27, 85, 469, 277, 245, 133, 93, 49, 31, 853, 597, 725, 405, 309, 165, 109, 57, 35, 341, 1877, 1109, 981, 533, 373, 197, 125, 65, 39
Offset: 1

Views

Author

L. Edson Jeffery, Jul 12 2015

Keywords

Comments

Sequence is a permutation of the odd natural numbers.
Let N_1 denote the set of odd natural numbers, and let |y|_2 denote 2-adic valuation of y. Define the map F : N_1 -> N_1 by F(x) = (3*x + 1)/2^|3*x+1|_2 (cf. A075677). Then row n of A is the set of all x in N_1 for which |3*x + 1|_2 = A371093(x) = n. Hence F(A(n,k)) = 6*k - 3 - 2*(-1)^n.

Examples

			From _Ruud H.G. van Tol_, Oct 17 2023, corrected and extended by _Antti Karttunen_, Apr 18 2024: (Start)
Array A begins:
n\k|   1|   2|   3|   4|   5|   6|   7|   8| ...
---+---------------------------------------------
1  |   3,   7,  11,  15,  19,  23,  27,  31, ...
2  |   1,   9,  17,  25,  33,  41,  49,  57, ...
3  |  13,  29,  45,  61,  77,  93, 109, 125, ...
4  |   5,  37,  69, 101, 133, 165, 197, 229, ...
5  |  53, 117, 181, 245, 309, 373, 437, 501, ...
6  |  21, 149, 277, 405, 533, 661, 789, 917, ...
... (End)
		

Crossrefs

Cf. A006370, A075677, A096773 (after its initial 0, column 1 of this array).
Cf. A004767, A017077, A082285, A238477 (rows 1-4).
Cf. A371092, A371093 (column and row indices for odd numbers).

Programs

  • Mathematica
    (* Array: *)
    Grid[Table[(2^n*(6*k - 3 - 2*(-1)^n) - 1)/3, {n, 10}, {k, 10}]]
    (* Array antidiagonals flattened: *)
    Flatten[Table[(2^(n - k + 1)*(6*k - 3 - 2*(-1)^(n - k + 1)) - 1)/ 3, {n, 10}, {k, n}]]
  • PARI
    up_to = 105;
    A257852sq(n,k) = ((2^n * (6*k - 3 - 2*(-1)^n) - 1)/3);
    A257852list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A257852sq((a-(col-1)),col))); (v); };
    v257852 = A257852list(up_to);
    A257852(n) = v257852[n]; \\ Antti Karttunen, Apr 18 2024

Formula

From Ruud H.G. van Tol, Oct 17 2023: (Start)
A(n,k+1) = A(n,k) + 2^(n+1).
A(n+2,k) = A(n,k)*4 + 1.
A(1,k) = A004767(k-1).
A(2,k) = A017077(k-1).
A(3,k) = A082285(k-1).
A(4,k) = A238477(k). (End)
For all odd positive numbers n, A(A371093(n), A371092(n)) = n. - Antti Karttunen, Apr 24 2024

A372282 Array read by upward antidiagonals: A(n, k) = A371094(A(n-1, k)) for n > 1, k >= 1; A(1, k) = 2*k-1.

Original entry on oeis.org

1, 21, 3, 5461, 21, 5, 357913941, 5461, 341, 7, 1537228672809129301, 357913941, 1398101, 45, 9, 28356863910078205288614550619314017621, 1537228672809129301, 23456248059221, 1109, 117, 11, 9649340769776349618630915417390658987772498722136713669954798667326094136661, 28356863910078205288614550619314017621, 6602346876188694799461995861, 873813, 11605, 69, 13
Offset: 1

Views

Author

Antti Karttunen, Apr 28 2024

Keywords

Examples

			Array begins:
n\k|    1     2        3     4      5     6        7     8      9     10
---+----------------------------------------------------------------------
1  |    1,    3,       5,    7,     9,   11,      13,   15,    17,    19,
2  |   21,   21,     341,   45,   117,   69,     341,   93,   213,   117,
3  | 5461, 5461, 1398101, 1109, 11605, 3413, 1398101, 2261, 87381, 11605,
		

Crossrefs

Cf. A005408 (row 1), A372351 (row 2, bisection of A371094), A372444 (column 14).
Arrays derived from this one:
A372285 the number of terms of A086893 in the interval [A(n, k), A(1+n, k)],
A372287 the column index of A(n, k) in array A257852,
A372288 the sum of digits of A(n, k) in "Jacobsthal greedy base",
A372353 differences between A(n,k) and the largest term of A086893 <= A(n,k),
A372354 floor(log_2(.)) of terms, A372356 (and their columnwise first differences),
A372359 terms xored with binary words of the same length, either of the form 10101...0101 or 110101...0101, depending on whether the binary length is odd or even.
Cf. also arrays A371096, A371102 that give subsets of columns of this array, and array A371100 that gives the terms of the row 2 in different order.

Programs

  • PARI
    up_to = 28;
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A372282sq(n,k) = if(1==n,2*k-1,A371094(A372282sq(n-1,k)));
    A372282list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A372282sq((a-(col-1)),col))); (v); };
    v372282 = A372282list(up_to);
    A372282(n) = v372282[n];

A372444 The n-th iterate of 27 with A371094.

Original entry on oeis.org

27, 165, 8021, 12408149, 19607957362005, 32439509492992549521282389, 58947232705679751034215288252890081792789279233365, 259166427025070423330595967015238989905128148712607202753574381749095993394717720069452733214971221
Offset: 0

Views

Author

Antti Karttunen, May 01 2024

Keywords

Crossrefs

Cf. A371094.
Column 7 of A371102, column 14 of A372282.
Column 1 of A372560.
Sequences derived from this one:
A372443 obtained when Reduced Collatz-function R is applied to a(n-1), for n > 0,
A372445 column index of a(n) in array A257852,
A372448 the 2-adic valuation of 1 + 3*a(n), equal to row index of a(n) in array A257852,
A372449 binary lengths minus 1; their first differences: A372451,
A372452 number of terms of A086893 in the interval [a(n), a(1+n)],
A372454 the difference between a(n) and the term of A086893 with the same binary length.

Programs

  • PARI
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A372444(n) = { my(x=27); while(n, x=A371094(x); n--); (x); };

Formula

a(0) = 27; for n > 0, a(n) = A371094(a(n-1)).

A371096 Array A read by upward antidiagonals in which the entry A(n,k) in row n and column k is defined by A(1, k) = 8*k-7, and A(n+1, k) = A371094(A(n, k)), n,k >= 1.

Original entry on oeis.org

1, 21, 9, 5461, 117, 17, 357913941, 11605, 213, 25, 1537228672809129301, 72701269, 87381, 309, 33, 28356863910078205288614550619314017621, 3752999689475413, 91625968981, 30037, 405, 41, 9649340769776349618630915417390658987772498722136713669954798667326094136661, 27043212804868893898596335048021, 100743818301219097892181, 760567125, 79189, 501, 49
Offset: 1

Views

Author

Antti Karttunen, Apr 21 2024

Keywords

Examples

			Array begins:
n\k|         1         2            3          4           5          6
---+--------------------------------------------------------------------
1  |         1,        9,          17,        25,         33,        41,
2  |        21,      117,         213,       309,        405,       501,
3  |      5461,    11605,       87381,     30037,      79189,     48469,
4  | 357913941, 72701269, 91625968981, 760567125, 1968526677, 299193685,
		

Crossrefs

Cf. A371094, A017077 (row 1).
Every fourth column (1, 5, 9, 13, 17, ...) of array A372282.
Cf. also arrays A257852, A371100 and A371102.

Programs

  • PARI
    up_to = 28;
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A371096sq(n,k) = if(1==n,8*k-7,A371094(A371096sq(n-1,k)));
    A371096list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A371096sq((a-(col-1)),col))); (v); };
    v371096 = A371096list(up_to);
    A371096(n) = v371096[n];

A372285 Array read by upward antidiagonals: A(n,k) is the number of terms of A086893 in the interval [b(n, k), b(n+1, k)], n,k >= 1, where b = A372282.

Original entry on oeis.org

5, 9, 4, 17, 9, 7, 33, 17, 13, 2, 65, 33, 25, 5, 4, 129, 65, 49, 10, 6, 3, 257, 129, 97, 22, 13, 6, 6, 513, 257, 193, 45, 26, 14, 13, 3, 1025, 513, 385, 89, 54, 29, 25, 4, 4, 2049, 1025, 769, 177, 109, 57, 49, 9, 10, 3, 4097, 2049, 1537, 353, 217, 113, 97, 22, 21, 6, 9, 8193, 4097, 3073, 705, 433, 225, 193, 45, 41, 13, 17, 2
Offset: 1

Views

Author

Antti Karttunen, Apr 27 2024

Keywords

Examples

			Array begins:
n\k|    1     2      3     4     5     6      7     8      9    10     11
---+----------------------------------------------------------------------
1  |    5,    4,     7,    2,    4,    3,     6,    3,     4,    3,     9,
2  |    9,    9,    13,    5,    6,    6,    13,    4,    10,    6,    17,
3  |   17,   17,    25,   10,   13,   14,    25,    9,    21,   13,    33,
4  |   33,   33,    49,   22,   26,   29,    49,   22,    41,   26,    65,
5  |   65,   65,    97,   45,   54,   57,    97,   45,    81,   54,   129,
6  |  129,  129,   193,   89,  109,  113,   193,   89,   161,  109,   257,
7  |  257,  257,   385,  177,  217,  225,   385,  177,   321,  217,   513,
8  |  513,  513,   769,  353,  433,  449,   769,  353,   641,  433,  1025,
9  | 1025, 1025,  1537,  705,  865,  897,  1537,  705,  1281,  865,  2049,
10 | 2049, 2049,  3073, 1409, 1729, 1793,  3073, 1409,  2561, 1729,  4097,
11 | 4097, 4097,  6145, 2817, 3457, 3585,  6145, 2817,  5121, 3457,  8193,
12 | 8193, 8193, 12289, 5633, 6913, 7169, 12289, 5633, 10241, 6913, 16385,
etc.
The count includes also the starting and/or ending point, if either of them is a term of A086893. For example, when going from A372282(2,1) = 21 to A372282(3,1) = 5461, we count terms A086893(5..13) = [21, 53, 85, 213, 341, 853, 1365, 3413, 5461], nine in total, therefore A(2,1) = 9.
When going from A371102(1,8) = 15 to A371102(2,8) = 93, we count terms 21, 53, 85 of A086893 in the interval [15, 93], therefore A(1,8) = 3.
		

Crossrefs

Programs

  • PARI
    up_to = 78;
    A086893(n) = (if(n%2, 2^(n+1), 2^(n+1)+2^(n-1))\3); \\ From A086893
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A372282sq(n,k) = if(1==n,2*k-1,A371094(A372282sq(n-1,k)));
    A372286(n) = { my(u=A371094(n), k1); for(i=1,oo,if(A086893(i)>=n,k1=i-1; break)); for(i=k1,oo,if(A086893(i)>u,return(i-k1-1))); };
    A372285sq(n,k) = A372286(A372282sq(n,k));
    A372285list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A372285sq((a-(col-1)),col))); (v); };
    v372285 = A372285list(up_to);
    A372285(n) = v372285[n];

Formula

A(n, k) = A372286(A372282(n, k)).
Showing 1-7 of 7 results.