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

A371097 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(A371095(n, k)), n,k >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 21 2024

Keywords

Comments

A(n, k) gives the column index of A371095(n, k) [or equally, of A371096(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, 2, 1, 5, 4,  8, 2, 11, 7, 14,  4, 17, 10, 20,  1,  23, 13,
3  | 1, 3, 1, 2, 5, 12, 2,  9, 2, 21,  6,  4, 14, 30,  1,  18, 10,
4  | 1, 3, 1, 3, 2, 18, 3,  7, 2,  8,  9,  5, 21, 45,  1,  26, 14,
5  | 1, 1, 1, 3, 3, 27, 3,  2, 3, 12,  1,  2,  8, 17,  1,  39, 21,
6  | 1, 1, 1, 1, 3, 21, 1,  2, 3, 18,  1,  3, 12,  4,  1,  30,  8,
7  | 1, 1, 1, 1, 1, 16, 1,  3, 1, 27,  1,  3, 18,  5,  1,  44, 12,
8  | 1, 1, 1, 1, 1, 23, 1,  3, 1, 21,  1,  1, 27,  2,  1,  66, 18,
9  | 1, 1, 1, 1, 1, 18, 1,  1, 1, 16,  1,  1, 21,  3,  1,  99, 27,
10 | 1, 1, 1, 1, 1, 26, 1,  1, 1, 23,  1,  1, 16,  3,  1,  75, 21,
11 | 1, 1, 1, 1, 1, 39, 1,  1, 1, 18,  1,  1, 23,  1,  1,  28, 16,
12 | 1, 1, 1, 1, 1, 30, 1,  1, 1, 26,  1,  1, 18,  1,  1,  42, 23,
13 | 1, 1, 1, 1, 1, 44, 1,  1, 1, 39,  1,  1, 26,  1,  1,  63, 18,
14 | 1, 1, 1, 1, 1, 66, 1,  1, 1, 30,  1,  1, 39,  1,  1,  48, 26,
15 | 1, 1, 1, 1, 1, 99, 1,  1, 1, 44,  1,  1, 30,  1,  1,  71, 39,
16 | 1, 1, 1, 1, 1, 75, 1,  1, 1, 66,  1,  1, 44,  1,  1,  54, 30,
17 | 1, 1, 1, 1, 1, 28, 1,  1, 1, 99,  1,  1, 66,  1,  1,  80, 44,
18 | 1, 1, 1, 1, 1, 42, 1,  1, 1, 75,  1,  1, 99,  1,  1, 120, 66,
19 | 1, 1, 1, 1, 1, 63, 1,  1, 1, 28,  1,  1, 75,  1,  1, 180, 99,
20 | 1, 1, 1, 1, 1, 48, 1,  1, 1, 42,  1,  1, 28,  1,  1, 270, 75,
21 | 1, 1, 1, 1, 1, 71, 1,  1, 1, 63,  1,  1, 42,  1,  1, 405, 28,
		

Crossrefs

Cf. also arrays A371101, A371103.

Programs

  • PARI
    up_to = 105;
    A000265(n) = (n>>valuation(n,2));
    A371092(n) = floor((A000265(1+(3*n))+5)/6);
    R(n) = { n = 1+3*n; n>>valuation(n, 2); };
    A371095sq(n,k) = if(1==n,8*k-7,R(A371095sq(n-1,k)));
    A371097sq(n,k) = A371092(A371095sq(n,k));
    A371097list(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] = A371097sq((a-(col-1)),col))); (v); };
    v371097 = A371097list(up_to);
    A371097(n) = v371097[n];

Formula

A(n, k) = A371092(A371095(n, k)) = A371092(A371096(n, k)).

A017077 a(n) = 8*n + 1.

Original entry on oeis.org

1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97, 105, 113, 121, 129, 137, 145, 153, 161, 169, 177, 185, 193, 201, 209, 217, 225, 233, 241, 249, 257, 265, 273, 281, 289, 297, 305, 313, 321, 329, 337, 345, 353, 361, 369, 377, 385, 393, 401, 409, 417, 425, 433
Offset: 0

Views

Author

Keywords

Comments

Cf. A007519 (primes), subsequence of A047522.
a(n-1), n >= 1, gives the first column of the triangle A238475 related to the Collatz problem. - Wolfdieter Lang, Mar 12 2014
First differences of A054552. - Wesley Ivan Hurt, Jul 08 2014
An odd number is congruent to a perfect square modulo every power of 2 iff it is in this sequence. Sketch of proof: Suppose the modulus is 2^k with k at least three and note that the only odd quadratic residue (mod 8) is 1. By application of difference of squares and the fact that gcd(x-y,x+y)=2 we can show that for odd x,y, we have x^2 and y^2 congruent mod 2^k iff x is congruent to one of y, 2^(k-1)-y, 2^(k-1)+y, 2^k-y. Now when we "lift" to (mod 2^(k+1)) we see that the degeneracy between a^2 and (2^(k-1)-a)^2 "breaks" to give a^2 and a^2-2^ka+2^(2k-2). Since a is odd, the latter is congruent to a^2+2^k (mod 2^(k+1)). Hence we can form every binary number that ends with '001' by starting modulo 8 and "lifting" while adding digits as necessary. But this sequence is exactly the set of binary numbers ending in '001', so our claim is proved. - Rafay A. Ashary, Oct 23 2016
For n > 3, also the number of (not necessarily maximal) cliques in the n-antiprism graph. - Eric W. Weisstein, Nov 29 2017
Bisection of A016813. - L. Edson Jeffery, Apr 26 2022

Examples

			Illustration of initial terms:
.                                          o       o       o
.                          o     o     o     o     o     o
.              o   o   o     o   o   o         o   o   o
.      o o o     o o o         o o o             o o o
.  o   o o o   o o o o o   o o o o o o o   o o o o o o o o o
.      o o o     o o o         o o o             o o o
.              o   o   o     o   o   o         o   o   o
.                          o     o     o     o     o     o
.                                          o       o       o
--------------------------------------------------------------
.  1       9          17              25                  33
- _Bruno Berselli_, Feb 28 2014
		

Crossrefs

Cf. A002189 (subsequence), A004768, A007519, A010731 (first differences), A016813, A047522, A054552.
Column 1 of A093565. Column 5 of triangle A130154. Second leftmost column of triangle A281334.
Row 1 of the arrays A081582, A238475, A371095, and A371096.
Row 2 of A257852.
Apart from the initial term, row sums of triangle A278480.

Programs

Formula

G.f.: (1+7*x)/(1-x)^2.
a(n+1) = A004768(n). - R. J. Mathar, May 28 2008
a(n) = 2*a(n-1) - a(n-2). - Vincenzo Librandi, Mar 14 2014
E.g.f.: exp(x)*(1 + 8*x). - Stefano Spezia, May 13 2021
From Elmo R. Oliveira, Apr 10 2025: (Start)
a(n) = a(n-1) + 8 with a(0)=1.
a(n) = A016813(2*n). (End)

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

A372283 Array read by upward antidiagonals: A(n, k) = R(A(n-1, k)) for n > 1, k >= 1; A(1, k) = 2*k-1, where Reduced Collatz function R(n) gives the odd part of 3n+1.

Original entry on oeis.org

1, 1, 3, 1, 5, 5, 1, 1, 1, 7, 1, 1, 1, 11, 9, 1, 1, 1, 17, 7, 11, 1, 1, 1, 13, 11, 17, 13, 1, 1, 1, 5, 17, 13, 5, 15, 1, 1, 1, 1, 13, 5, 1, 23, 17, 1, 1, 1, 1, 5, 1, 1, 35, 13, 19, 1, 1, 1, 1, 1, 1, 1, 53, 5, 29, 21, 1, 1, 1, 1, 1, 1, 1, 5, 1, 11, 1, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, 1, 35, 25
Offset: 1

Views

Author

Antti Karttunen, Apr 28 2024

Keywords

Comments

Collatz conjecture is equal to the claim that in each column 1 will eventually appear. See also arrays A372287 and A372288.

Examples

			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, 5,  7,  9, 11, 13, 15, 17, 19, 21, 23, 25,  27, 29,  31, 33, 35,
2  | 1, 5, 1, 11,  7, 17,  5, 23, 13, 29,  1, 35, 19,  41, 11,  47, 25, 53,
3  | 1, 1, 1, 17, 11, 13,  1, 35,  5, 11,  1, 53, 29,  31, 17,  71, 19,  5,
4  | 1, 1, 1, 13, 17,  5,  1, 53,  1, 17,  1,  5, 11,  47, 13, 107, 29,  1,
5  | 1, 1, 1,  5, 13,  1,  1,  5,  1, 13,  1,  1, 17,  71,  5, 161, 11,  1,
6  | 1, 1, 1,  1,  5,  1,  1,  1,  1,  5,  1,  1, 13, 107,  1, 121, 17,  1,
7  | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  5, 161,  1,  91, 13,  1,
8  | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 121,  1, 137,  5,  1,
9  | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  91,  1, 103,  1,  1,
10 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 137,  1, 155,  1,  1,
11 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 103,  1, 233,  1,  1,
12 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 155,  1, 175,  1,  1,
13 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 233,  1, 263,  1,  1,
14 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 175,  1, 395,  1,  1,
15 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 263,  1, 593,  1,  1,
16 | 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 395,  1, 445,  1,  1,
		

Crossrefs

Cf. A005408 (row 1), A075677 (row 2), A372443 (column 14).
Arrays derived from this one or related to:
A372287 the column index of A(n, k) in array A257852,
A372361 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,
A372360 binary weights of A372361.
Cf. also array A371095 (giving every fourth column, 1, 5, 9, ...) and irregular array A256598 which gives the terms of each column, but only down to the first 1.

Programs

  • Mathematica
    With[{dmax = 15}, Table[#[[k, n-k+1]], {n, dmax}, {k, n}] & [Array[NestList[(3*# + 1)/2^IntegerExponent[3*# + 1, 2] &, 2*# - 1, dmax - #] &, dmax]]] (* Paolo Xausa, Apr 29 2024 *)
  • PARI
    up_to = 91;
    R(n) = { n = 1+3*n; n>>valuation(n, 2); };
    A372283sq(n,k) = if(1==n,2*k-1,R(A372283sq(n-1,k)));
    A372283list(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] = A372283sq((a-(col-1)),col))); (v); };
    v372283 = A372283list(up_to);
    A372283(n) = v372283[n];

Formula

For n > 1, A(n, k) = R(A372282(n-1, k)), where R(n) = (3*n+1)/2^A371093(n).
For all k >= 1, A(A258145(k-1), k) = 1 [which is the topmost 1 in each column].
Showing 1-4 of 4 results.