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

A371101 Array A read by upward antidiagonals in which the entry A(n,k) = A371092(A371100(n, k)), n,k >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 19 2024

Keywords

Comments

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

Examples

			The array begins:
n\k|  1  2  3  4  5  6  7   8  9  10 11  12  13  14  15  16  17  18
---+--------------------------------------------------------------------
1  |  1, 3, 3, 6, 2, 9, 6, 12, 1, 15, 9, 18,  5, 21, 12, 24,  4, 27, ...
2  |  1, 2, 1, 5, 4, 8, 2, 11, 7, 14, 4, 17, 10, 20,  1, 23, 13, 26, ...
3  |  1, 3, 3, 6, 2, 9, 6, 12, 1, 15, 9, 18,  5, 21, 12, 24,  4, 27, ...
4  |  1, 2, 1, 5, 4, 8, 2, 11, 7, 14, 4, 17, 10, 20,  1, 23, 13, 26, ...
5  |  1, 3, 3, 6, 2, 9, 6, 12, 1, 15, 9, 18,  5, 21, 12, 24,  4, 27, ...
6  |  1, 2, 1, 5, 4, 8, 2, 11, 7, 14, 4, 17, 10, 20,  1, 23, 13, 26, ...
7  |  1, 3, 3, 6, 2, 9, 6, 12, 1, 15, 9, 18,  5, 21, 12, 24,  4, 27, ...
8  |  1, 2, 1, 5, 4, 8, 2, 11, 7, 14, 4, 17, 10, 20,  1, 23, 13, 26, ...
...
		

Crossrefs

Programs

  • PARI
    up_to = 105;
    A000265(n) = (n>>valuation(n,2));
    A371092(n) = floor((A000265(1+(3*n))+5)/6);
    A371100sq(n,k) = 4^n*(6*k - 3 - 2*(-1)^n) + (4^n - 1)/3;
    A371101sq(n,k) = A371092(A371100sq(n,k));
    A371101list(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] = A371101sq((a-(col-1)),col))); (v); };
    v371101 = A371101list(up_to);
    A371101(n) = v371101[n];

Formula

A(n, k) = A371092(A371100(n, k)).
A(n, k) = A(n+2, k).

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];

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];

A371102 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) = 4*k-1, and A(n+1, k) = A371094(A(n, k)), n,k >= 1.

Original entry on oeis.org

3, 21, 7, 5461, 45, 11, 357913941, 1109, 69, 15, 1537228672809129301, 873813, 3413, 93, 19, 28356863910078205288614550619314017621, 1466015503701, 22369621, 2261, 117, 23, 9649340769776349618630915417390658987772498722136713669954798667326094136661, 25790417485112089060398421, 6004799503160661, 873813, 11605, 141, 27
Offset: 1

Views

Author

Antti Karttunen, Apr 21 2024

Keywords

Examples

			Array begins:
n\k|         1       2         3       4         5         6         7
---+--------------------------------------------------------------------
1  |         3,      7,       11,     15,       19,       23,       27,
2  |        21,     45,       69,     93,      117,      141,      165,
3  |      5461,   1109,     3413,   2261,    11605,     3413,     8021,
4  | 357913941, 873813, 22369621, 873813, 72701269, 22369621, 12408149,
		

Crossrefs

Cf. A004767 (row 1), A102603 (row 2), A371094.
Cf. also arrays A257852, A371096, A371100, A371103.

Programs

  • PARI
    up_to = 105;
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A371102sq(n,k) = if(1==n,4*k-1,A371094(A371102sq(n-1,k)));
    A371102list(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] = A371102sq((a-(col-1)),col))); (v); };
    v371102 = A371102list(up_to);
    A371102(n) = v371102[n];

A372290 Numbers that occur in the odd bisection of A371094.

Original entry on oeis.org

21, 45, 69, 93, 117, 141, 165, 189, 213, 237, 261, 285, 309, 333, 341, 357, 381, 405, 429, 453, 477, 501, 525, 549, 573, 597, 621, 645, 669, 693, 717, 725, 741, 765, 789, 813, 837, 861, 885, 909, 933, 957, 981, 1005, 1029, 1053, 1077, 1101, 1109, 1125, 1149, 1173, 1197, 1221, 1245, 1269, 1293, 1317, 1341, 1365, 1389
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2024

Keywords

Comments

Numbers that occur in array A371100.

Examples

			21 is present because A371094(1) = A371094(3) = 21.
45 is present because A371094(7) = 45.
87381 is present because A371094(85) = A371094(213) = A371094(7281) = A371094(14563) = 87381.
		

Crossrefs

Union of A372291 and A372292.
Cf. A102603 (subsequence), A371094, A371100.

Programs

  • PARI
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    isA372290(n) = if(!(n%2),0,forstep(k=1,n,2,if(A371094(k)==n,return(1))); (0));
    
  • PARI
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A372290list(up_to_n) = { my(v=vector((1+up_to_n)/2), x, lista=List([])); forstep(k=1,up_to_n,2,x=A371094(k); if(x <= up_to_n, v[(x+1)/2]++)); for(i=1,(1+up_to_n)/2,if(v[i]>0, listput(lista,i+i-1))); Vec(lista); };

A372351 Odd bisection of A371094.

Original entry on oeis.org

21, 21, 341, 45, 117, 69, 341, 93, 213, 117, 5461, 141, 309, 165, 725, 189, 405, 213, 1877, 237, 501, 261, 1109, 285, 597, 309, 5461, 333, 693, 357, 1493, 381, 789, 405, 3413, 429, 885, 453, 1877, 477, 981, 501, 87381, 525, 1077, 549, 2261, 573, 1173, 597, 4949, 621, 1269, 645, 2645, 669, 1365, 693, 11605, 717
Offset: 1

Views

Author

Antti Karttunen, Apr 28 2024

Keywords

Crossrefs

Row 2 of A372282.
Cf. A371094, and array A371100 (gives the same terms, in different order).
Cf. A372290 (the range of this sequence), A372291 (numbers that occur only once), A372292 (more than once), A372293 (odd numbers not occurring here).

Programs

  • Mathematica
    Table[With[{e = IntegerExponent[6*n - 2, 2]}, (6*n - 2)*2^e + (4^e - 1)/3], {n, 100}] (* Paolo Xausa, Apr 29 2024 *)
  • PARI
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A372351(n) = A371094(n+n-1);
    
  • Python
    def A372351(n): return ((m:=6*n-2)<<(e:=(~m & m-1).bit_length()))+((1<<(e<<1))-1)//3 # Chai Wah Wu, Apr 28 2024

Formula

a(n) = A371094(2*n-1).

A372291 Numbers that occur exactly once in the odd bisection of A371094.

Original entry on oeis.org

45, 69, 93, 141, 165, 189, 237, 261, 285, 333, 357, 381, 429, 453, 477, 525, 549, 573, 621, 645, 669, 717, 725, 741, 765, 813, 837, 861, 909, 933, 957, 1005, 1029, 1053, 1101, 1109, 1125, 1149, 1197, 1221, 1245, 1293, 1317, 1341, 1389, 1413, 1437, 1485, 1493, 1509, 1533, 1581, 1605, 1629, 1677, 1701, 1725, 1773, 1797
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2024

Keywords

Comments

Numbers that occur exactly once in array A371100.

Examples

			45 is present because A371094(k) = 45 for no other odd number than k=7.
		

Crossrefs

Setwise difference A372290 \ A372292.

Programs

  • PARI
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    isA372291(n) = if(!(n%2),0,my(c=0); forstep(k=1,n,2,if(A371094(k)==n,c++;if(c>1,return(0)))); (c));

A372292 Numbers that occur more than once in the odd bisection of A371094.

Original entry on oeis.org

21, 117, 213, 309, 341, 405, 501, 597, 693, 789, 885, 981, 1077, 1173, 1269, 1365, 1461, 1557, 1653, 1749, 1845, 1877, 1941, 2037, 2133, 2229, 2325, 2421, 2517, 2613, 2709, 2805, 2901, 2997, 3093, 3189, 3285, 3381, 3413, 3477, 3573, 3669, 3765, 3861, 3957, 4053, 4149, 4245, 4341, 4437, 4533, 4629, 4725, 4821, 4917
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2024

Keywords

Comments

Numbers that occur more than once in array A371100.

Examples

			21 is present because A371094(1) = A371094(3) = 21.
87381 is present because A371094(85) = A371094(213) = A371094(7281) = A371094(14563) = 87381.
185685 is present because A371094(469) = A371094(15473) = A371094(30947) = 185685.
		

Crossrefs

Setwise difference A372290 \ A372291.
Cf. A144864 (subsequence after its initial 1), A371094, A371100.

Programs

  • PARI
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    isA372292(n) = if(!(n%2),0,my(c=0); forstep(k=1,n,2,if(A371094(k)==n,c++)); (c>1));
    
  • PARI
    search_up_to = 1398101;
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A372292list(up_to_n) = { my(v=vector((1+up_to_n)/2), x, lista=List([])); forstep(k=1,up_to_n,2,x=A371094(k); if(x <= up_to_n, v[(x+1)/2]++)); for(i=1,(1+up_to_n)/2,if(v[i]>1, listput(lista,i+i-1))); Vec(lista); };
    v372292 = A372292list(search_up_to);
    A372292(n) = v372292[n];
Showing 1-10 of 11 results. Next