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 32 results. Next

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)).

A372286 a(n) = number of terms of A086893 that are in the interval [n, A371094(n)].

Original entry on oeis.org

1, 5, 2, 4, 2, 7, 1, 2, 2, 4, 2, 3, 2, 6, 1, 3, 1, 4, 2, 3, 2, 9, 1, 2, 1, 3, 1, 2, 2, 4, 2, 2, 2, 4, 2, 3, 2, 6, 2, 3, 2, 4, 2, 3, 2, 5, 2, 3, 2, 4, 2, 3, 2, 8, 1, 2, 1, 3, 1, 3, 1, 5, 1, 3, 1, 3, 1, 3, 1, 6, 1, 3, 2, 4, 2, 3, 2, 5, 2, 3, 2, 4, 2, 3, 2, 11, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3
Offset: 0

Views

Author

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

Keywords

Comments

a(n) is the number of nonzero terms of A096773 that are found in the interval [n, A371094(n)], inclusive.

Examples

			A086893 = 1, 3, 5, 13, 21, 53, 85, 213, 341, 853, 1365, 3413, 5461, ...
For n=0, A371094(0) = 1, and only the initial term of A086893 is in the interval [0, 1], therefore a(0) = 1.
For n=1, A371094(1) = 21, so the first five terms of A086893 are in the interval [1, 21], thus a(1) = 5.
For n=6, A371094(6) = 19, and in the interval [6, 19] there is only term 13 of A086893, thus a(6) = 1.
For n=35, A371094(35) = 213, so we count terms 53, 85, 213 of A086893, therefore a(35) = 3.
		

Crossrefs

Cf. A002450 (seems to give the positions of records).

Programs

  • PARI
    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)); };
    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))); };

A372358 a(n) = n XOR A086893(1+A000523(n)), where XOR is a bitwise-XOR, A003987.

Original entry on oeis.org

0, 1, 0, 1, 0, 3, 2, 5, 4, 7, 6, 1, 0, 3, 2, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 21, 20, 23, 22, 17, 16, 19, 18, 29, 28, 31, 30, 25, 24, 27, 26, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 21, 20, 23, 22, 17, 16, 19, 18, 29, 28, 31, 30, 25, 24, 27, 26, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15
Offset: 1

Views

Author

Antti Karttunen, May 01 2024

Keywords

Comments

a(n) gives n xored with the unique term of A086893 that has the same binary length as n itself. The binary expansions of the terms of A086893 are of the form 10101...0101 (i.e., alternating 1's and 0's starting and ending with 1) when the binary length is odd, and of the form 110101...0101 (i.e., 1 followed by alternating 1's and 0's, and ending with 1) when the binary length is even. In other words, a(n) is n with its all its even-positioned bits (indexing starts from 0 which stands for the least significant bit) inverted, and additionally also the odd-positioned most significant bit inverted if the number of significant bits is even (i.e., n is a nonzero term of A053754).

Examples

			25 in binary is 11001_2, and inverting all the even-positioned bits gives 01100_2, and as A007088(12) = 1100, a(25) = 12.
46 in binary is 101110_2, so we flip all the even-positioned bits (starting from the rightmost, with position 0), and because there are even number of bits in the binary expansion, we flip also the most significant bit, thus we obtain 011011_2, and as A007088(27) = 11011, a(46) = 27.
		

Crossrefs

Programs

A372453 a(n) = A372443(n) - A086893(1+A372447(n)).

Original entry on oeis.org

6, -12, 10, -6, -14, 22, -52, 36, 6, -76, 18, -58, 20, -38, -78, 54, -260, 104, -46, 38, 36, -58, 84, -22, 138, -134, -286, 254, -984, 58, 2, -1362, -336, -276, 92, -16, 8, 2, -18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Antti Karttunen, May 05 2024

Keywords

Comments

These are the differences obtained when the term of A086893 that has the same binary length as A372443(n) is subtracted from the latter. Here A372443(n) gives the n-th iterate of 27 with Reduced Collatz-function R, where R(n) = A000265(3*n+1).
Note that for all n >= 1, R(A086893(2n-1)) = 1, and R(A086893(2n)) = 5 (with R(5) = 1), so the first zero here, a(39) = 0 indicates that the iteration will soon have reached the terminal 1, and indeed, A372443(41) = 1.

Examples

			The term of A086893 that has same binary length as A372443(0) = 27 is 21 [as 21 = 10101_2 in binary, and 27 = 11011_2 in binary], therefore a(0) = 27-21 = 6.
The term of A086893 that has same binary length as A372443(1) = 41 is 53, therefore a(1) = 41-53 = -12.
		

Crossrefs

Programs

Formula

a(n) = A372443(n) - A086893(1+A000523(A372443(n))).

A372352 The difference between n and the largest term of A086893 <= n.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 1, 2, 3, 4, 5, 6
Offset: 1

Views

Author

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

Keywords

Comments

The terms a(n) grow from 0 (whenever n is in A086893) by 1 until the next element of A086893 is reached. - M. F. Hasler, May 08 2025

Crossrefs

Cf. also A372286.

Programs

Formula

a(n) = n - max ( A086893 intersect [1..n] ) (= 0 iff n in A086893). - M. F. Hasler, May 08 2025

A372452 Number of terms of A086893 in the interval [A372444(n), A372444(1+n)].

Original entry on oeis.org

2, 6, 10, 21, 41, 80, 162, 324, 646, 1294, 2586, 5173, 10345, 20691, 41381, 82760, 165522, 331044, 662089, 1324177, 2648353, 5296707, 10593413, 21186827, 42373652, 84747305, 169494609, 338989216, 677978435, 1355956869, 2711913736, 5423827472, 10847654948, 21695309896, 43390619791, 86781239586, 173562479173, 347124958344
Offset: 0

Views

Author

Antti Karttunen, May 05 2024

Keywords

Comments

The formula involving A372451 and A372453 shows that each term is at most +-1 from the corresponding term of A372451, that are the first differences of A372449.

Examples

			Between A372444(0)=27 and A372444(1)=165 there are two terms (53 and 85) of A086893, therefore a(0) = 2.
Between A372444(1)=165 and A372444(2)=8021 there are six terms (213, 341, 853, 1365, 3413, 5461) of A086893, therefore a(1) = 6.
Between A372444(2)=8021 and A372444(3)=12408149 there are 10 terms (13653, 21845, 54613, 87381, 218453, 349525, 873813, 1398101, 3495253, 5592405) of A086893, therefore a(2) = 10.
		

Crossrefs

Programs

Formula

a(n) = A372286(A372444(n)).
a(n) = A372451(n) + [A372453(n)<=0] - [A372453(1+n)<0], where [ ] is the Iverson bracket, yielding 1 or 0 depending on whether the given inequivalence holds or does not hold.

A372454 a(n) = A372444(n) - A086893(1+A372449(n)).

Original entry on oeis.org

6, -48, 2560, -1572864, -3848290697216, 6649092007880460460883968, -18999521285301737936647902825311679255527123058688, 76895533293152762966220781422103876125697362804839499718093497881599910128103059800826635129716736
Offset: 0

Views

Author

Antti Karttunen, May 05 2024

Keywords

Comments

The difference between A372444(n) and the term of A086893 with the same binary length.

Examples

			The term of A086893 that has same binary length as A372444(0) = 27 is 21 [as 21 = 10101_2 in binary, and 27 = 11011_2 in binary], therefore a(0) = 27-21 = 6.
The term of A086893 that has same binary length as A372444(1) = 165 is 213, therefore a(1) = 165-213 = -48.
		

Crossrefs

Programs

Formula

a(n) = A372444(n) - A086893(1+A000523(A372444(n))).
a(0) = A372453(0) = 6; and for n > 0, a(n) = 4^A372448(n-1) * A372453(n).

A372450 a(n) = k, if A086893(k) is the first term of A086893 reached on the trajectory of reduced Collatz-function R, when starting from 2n-1, or -1 if no term of A086893 is ever encountered.

Original entry on oeis.org

1, 2, 3, 4, 4, 4, 4, 6, 4, 4, 5, 6, 4, 6, 4, 6, 4, 6, 4, 4, 6, 4, 4, 6, 4, 4, 6, 6, 4, 4, 6, 6, 4, 4, 4, 6, 6, 7, 4, 4, 6, 6, 7, 4, 4, 6, 6, 6, 6, 4, 4, 6, 4, 6, 6, 6, 7, 4, 4, 4, 6, 4, 6, 4, 6, 4, 4, 4, 6, 4, 6, 6, 6, 6, 4, 9, 4, 6, 4, 6, 6, 6, 6, 6, 4, 6, 4, 6, 4, 4, 4, 6, 4, 4, 6, 4, 6, 6, 4, 6, 9, 4, 4, 6, 4, 4, 8, 6
Offset: 1

Views

Author

Antti Karttunen, May 03 2024

Keywords

Comments

The length of the binary expansion of the first term of A086893 that comes along when starting from x = 2*n-1 and then repeating the operation x -> A000265(3*x+1). If 2n-1 itself is in A086893, then its binary length is used.
Terms A016789(n) = 2, 5, 8, 11, 14, 17, ... occur only once in this sequence because A086893(A016789(n)) are all multiples of 3: 3, 21, 213, 1365, 13653, 87381, 873813, 5592405, 55924053, 357913941, ..., while the terms of A075677 never are. Note that all terms > 1 of A086893 are just one or two invocations of R away from 1.

Examples

			a(11) = 5 because the first term of A086893 that occurs on the trajectory of 21 (= 2*11-1) is 21 = A086893(5).
a(14) = 6 because the first term of A086893 that occurs on the trajectory of 27 (= 2*14-1) is A372443(39) = 53 = A086893(6).
		

Crossrefs

Programs

A083329 a(0) = 1; for n > 0, a(n) = 3*2^(n-1) - 1.

Original entry on oeis.org

1, 2, 5, 11, 23, 47, 95, 191, 383, 767, 1535, 3071, 6143, 12287, 24575, 49151, 98303, 196607, 393215, 786431, 1572863, 3145727, 6291455, 12582911, 25165823, 50331647, 100663295, 201326591, 402653183, 805306367, 1610612735, 3221225471, 6442450943
Offset: 0

Views

Author

Paul Barry, Apr 27 2003

Keywords

Comments

Apart from leading term (which should really be 3/2), same as A055010.
Binomial transform of A040001. Inverse binomial transform of A053156.
a(n) = A105728(n+1,2). - Reinhard Zumkeller, Apr 18 2005
Row sums of triangle A133567. - Gary W. Adamson, Sep 16 2007
Row sums of triangle A135226. - Gary W. Adamson, Nov 23 2007
a(n) = number of partitions Pi of [n+1] (in standard increasing form) such that the permutation Flatten[Pi] avoids the patterns 2-1-3 and 3-1-2. Example: a(3)=11 counts all 15 partitions of [4] except 13/24, 13/2/4 which contain a 2-1-3 and 14/23, 14/2/3 which contain a 3-1-2. Here "standard increasing form" means the entries are increasing in each block and the blocks are arranged in increasing order of their first entries. - David Callan, Jul 22 2008
An elephant sequence, see A175654. For the corner squares four A[5] vectors, with decimal values 42, 138, 162, 168, lead to this sequence. For the central square these vectors lead to the companion sequence A003945. - Johannes W. Meijer, Aug 15 2010
The binary representation of a(n) has n+1 digits, where all digits are 1's except digit n-1. For example: a(4) = 23 = 10111 (2). - Omar E. Pol, Dec 02 2012
Row sums of triangle A209561. - Reinhard Zumkeller, Dec 26 2012
If a Stern's sequence based enumeration system of positive irreducible fractions is considered (for example, A007305/A047679, A162909/A162910, A071766/A229742, A245325/A245326, ...), and if it is organized by blocks or levels (n) with 2^n terms (n >= 0), and the fractions, term by term, are summed at each level n, then the resulting sequence of integers is a(n) + 1/2, apart from leading term (which should be 1/2). - Yosu Yurramendi, May 23 2015
For n >= 2, A083329(n) in binary representation is a string [101..1], also 10 followed with (n-1) 1's. For n >= 3, A036563(n) in binary representation is a string [1..101], also (n-2) 1's followed with 01. Thus A083329(n) is a reflection of the binary representation of A036563(n+1). Example: A083329(5) = 101111 in binary, A036563(6) = 111101 in binary. - Ctibor O. Zizka, Nov 06 2018
For n > 0, a(n) is the minimum number of turns in (n+1)-dimensional Euclidean space needed to visit all 2^(n+1) vertices of the (n+1)-cube (e.g., {0,1}^(n+1)) and return to the starting point, moving along straight-line segments between turns (turns may occur elsewhere in R^(n+1)). - Marco Ripà, Aug 14 2025

Examples

			a(0) = (3*2^0 - 2 + 0^0)/2 = 2/2 = 1 (use 0^0=1).
		

Crossrefs

Essentially the same as A055010 and A052940.
Cf. A007505 (primes).
Cf. A266550 (independence number of the n-Mycielski graph).

Programs

  • Haskell
    a083329 n = a083329_list !! n
    a083329_list = 1 : iterate ((+ 1) . (* 2)) 2
    -- Reinhard Zumkeller, Dec 26 2012, Feb 22 2012
    
  • Magma
    [1] cat [3*2^(n-1)-1: n in [1..40]]; // Vincenzo Librandi, Jan 01 2016
  • Maple
    seq(ceil((2^i+2^(i+1)-2)/2), i=0..31); # Zerinvary Lajos, Oct 02 2007
  • Mathematica
    a[1] = 2; a[n_] := 2a[n - 1] + 1; Table[ a[n], {n, 31}] (* Robert G. Wilson v, May 04 2004 *)
    Join[{1}, LinearRecurrence[{3, -2}, {2, 5}, 40]] (* Vincenzo Librandi, Jan 01 2016 *)
  • PARI
    a(n)=(3*2^n-2+0^n)/2 \\ Charles R Greathouse IV, Sep 24 2015
    

Formula

a(n) = (3*2^n - 2 + 0^n)/2.
G.f.: (1-x+x^2)/((1-x)*(1-2*x)). [corrected by Martin Griffiths, Dec 01 2009]
E.g.f.: (3*exp(2*x) - 2*exp(x) + exp(0))/2.
a(0) = 1, a(n) = sum of all previous terms + n. - Amarnath Murthy, Jun 20 2004
a(n) = 3*a(n-1) - 2*a(n-2) for n > 2, a(0)=1, a(1)=2, a(2)=5. - Philippe Deléham, Nov 29 2013
From Bob Selcoe, Apr 25 2014: (Start)
a(n) = (...((((((1)+1)*2+1)*2+1)*2+1)*2+1)...), with n+1 1's, n >= 0.
a(n) = 2*a(n-1) + 1, n >= 2.
a(n) = 2^n + 2^(n-1) - 1, n >= 2. (End)
a(n) = A086893(n) + A061547(n+1), n > 0. - Yosu Yurramendi, Jan 16 2017

A077925 Expansion of 1/((1-x)*(1+2*x)).

Original entry on oeis.org

1, -1, 3, -5, 11, -21, 43, -85, 171, -341, 683, -1365, 2731, -5461, 10923, -21845, 43691, -87381, 174763, -349525, 699051, -1398101, 2796203, -5592405, 11184811, -22369621, 44739243, -89478485, 178956971, -357913941, 715827883, -1431655765, 2863311531, -5726623061
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

a(n+1) is the reflection of a(n) through a(n-1) on the numberline. - Floor van Lamoen, Aug 31 2004
If a zero is added as the (new) a(0) in front, the sequence represents the inverse binomial transform of A001045. Partial sums are in A077898. - R. J. Mathar, Aug 30 2008
a(n) = A077953(2*n+3). - Reinhard Zumkeller, Oct 07 2008
Related to the Fibonacci sequence by an INVERT transform: if A(x) = 1+x^2*g(x) is the generating function of the a(n) prefixed with 1, 0, then 1/A(x) = 2+(x+1)/(x^2-x+1) is the generating function of 1, 0, -1, 1, -2, 3, ..., the signed Fibonacci sequence A000045 prefixed with 1. - Gary W. Adamson, Jan 07 2011
Also: Gaussian binomial coefficients [n+1,1], or q-integers, for q=-2, diagonal k=1 in the triangular (or column r=1 in the square) array A015109. - M. F. Hasler, Nov 04 2012
With a leading zero, 0, 1, -1, 3, -5, 11, -21, 43, -85, 171, -341, 683, ... we obtain the Lucas U(-1,-2) sequence. - R. J. Mathar, Jan 08 2013
Let m = a(n). Then 18*m^2 - 12*m + 1 = A000225(2n+3). - Roderick MacPhee, Jan 17 2013

Examples

			G.f. = 1 - x + 3*x^2 - 5*x^3 + 11*x^4 - 21*x^5 + 43*x^6 - 85*x^7 + ...
		

Crossrefs

Cf. A001045 (unsigned version).
Cf. A014983, A014985, A014986. - Zerinvary Lajos, Dec 16 2008

Programs

Formula

G.f.: 1/(1+x-2*x^2).
a(n) = (1-(-2)^(n+1))/3. - Vladeta Jovovic, Apr 17 2003
a(n) = Sum_{k=0..n} (-2)^k. - Paul Barry, May 26 2003
a(n+1) - a(n) = A122803(n). - R. J. Mathar, Aug 30 2008
a(n) = Sum_{k=0..n} A112555(n,k)*(-2)^k. - Philippe Deléham, Sep 11 2009
a(n) = A082247(n+1) - 1. - Philippe Deléham, Oct 07 2009
G.f.: Q(0)/(3*x), where Q(k) = 1 - 1/(4^k - 2*x*16^k/(2*x*4^k + 1/(1 + 1/(2*4^k - 8*x*16^k/(4*x*4^k - 1/Q(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, May 22 2013
G.f.: Q(0)/2 , where Q(k) = 1 + 1/(1 - x*(4*k-1 + 2*x)/( x*(4*k+1 + 2*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 08 2013
E.g.f.: (2*exp(-2*x) + exp(x))/3. - Ilya Gutkovskiy, Nov 12 2016
a(n) = A086893(n+2) - A061547(n+3), n >= 0. - Yosu Yurramendi, Jan 16 2017
a(n) = (-1)^n*A001045(n+1). - M. F. Hasler, Feb 13 2020
a(n) - a(n-1) = a(n-1) - a(n+1) = (-2)^n, a(n+1) = - a(n) + 2*a(n-1) = 1 - 2*a(n). - Michael Somos, Feb 22 2023
Showing 1-10 of 32 results. Next