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.

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