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.

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)

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

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

A371095 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) = R(A(n, k)), n,k >= 1, where Reduced Collatz function R(n) gives the odd part of 3n+1.

Original entry on oeis.org

1, 1, 9, 1, 7, 17, 1, 11, 13, 25, 1, 17, 5, 19, 33, 1, 13, 1, 29, 25, 41, 1, 5, 1, 11, 19, 31, 49, 1, 1, 1, 17, 29, 47, 37, 57, 1, 1, 1, 13, 11, 71, 7, 43, 65, 1, 1, 1, 5, 17, 107, 11, 65, 49, 73, 1, 1, 1, 1, 13, 161, 17, 49, 37, 55, 81, 1, 1, 1, 1, 5, 121, 13, 37, 7, 83, 61, 89, 1, 1, 1, 1, 1, 91, 5, 7, 11, 125, 23, 67, 97
Offset: 1

Views

Author

Antti Karttunen, Apr 24 2024

Keywords

Examples

			Array begins:
n\k|  1   2   3   4   5    6   7   8   9   10  11   12   13   14   15   16
---+------------------------------------------------------------------------
1  |  1,  9, 17, 25, 33,  41, 49, 57, 65,  73, 81,  89,  97, 105, 113, 121,
2  |  1,  7, 13, 19, 25,  31, 37, 43, 49,  55, 61,  67,  73,  79,  85,  91,
3  |  1, 11,  5, 29, 19,  47,  7, 65, 37,  83, 23, 101,  55, 119,   1, 137,
4  |  1, 17,  1, 11, 29,  71, 11, 49,  7, 125, 35,  19,  83, 179,   1, 103,
5  |  1, 13,  1, 17, 11, 107, 17, 37, 11,  47, 53,  29, 125, 269,   1, 155,
6  |  1,  5,  1, 13, 17, 161, 13,  7, 17,  71,  5,  11,  47, 101,   1, 233,
7  |  1,  1,  1,  5, 13, 121,  5, 11, 13, 107,  1,  17,  71,  19,   1, 175,
8  |  1,  1,  1,  1,  5,  91,  1, 17,  5, 161,  1,  13, 107,  29,   1, 263,
9  |  1,  1,  1,  1,  1, 137,  1, 13,  1, 121,  1,   5, 161,  11,   1, 395,
10 |  1,  1,  1,  1,  1, 103,  1,  5,  1,  91,  1,   1, 121,  17,   1, 593,
11 |  1,  1,  1,  1,  1, 155,  1,  1,  1, 137,  1,   1,  91,  13,   1, 445,
12 |  1,  1,  1,  1,  1, 233,  1,  1,  1, 103,  1,   1, 137,   5,   1, 167,
13 |  1,  1,  1,  1,  1, 175,  1,  1,  1, 155,  1,   1, 103,   1,   1, 251,
14 |  1,  1,  1,  1,  1, 263,  1,  1,  1, 233,  1,   1, 155,   1,   1, 377,
15 |  1,  1,  1,  1,  1, 395,  1,  1,  1, 175,  1,   1, 233,   1,   1, 283,
16 |  1,  1,  1,  1,  1, 593,  1,  1,  1, 263,  1,   1, 175,   1,   1, 425,
		

Crossrefs

Cf. A017077 (row 1), A016921 (row 2), A075677.
Cf. also A371096, A371097.

Programs

  • PARI
    up_to = 91;
    R(n) = { n = 1+3*n; n>>valuation(n, 2); };
    A371095sq(n,k) = if(1==n,8*k-7,R(A371095sq(n-1,k)));
    A371095list(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] = A371095sq((a-(col-1)),col))); (v); };
    v371095 = A371095list(up_to);
    A371095(n) = v371095[n];

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)).
Showing 1-7 of 7 results.