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.

A045883 a(n) = ((3*n+1)*2^n - (-1)^n)/9.

Original entry on oeis.org

0, 1, 3, 9, 23, 57, 135, 313, 711, 1593, 3527, 7737, 16839, 36409, 78279, 167481, 356807, 757305, 1601991, 3378745, 7107015, 14913081, 31224263, 65244729, 136081863, 283348537, 589066695, 1222872633, 2535223751, 5249404473, 10856722887, 22429273657, 46290203079
Offset: 0

Views

Author

Keywords

Comments

Without the initial zero, PSumSIGN transform of A001787. - Michael Somos, Jul 10 2003
Number of rises (drops) in the compositions of n+2 with parts in N.
From Michel Lagneau, Jan 13 2012: (Start)
This sequence is connected with the Collatz problem. We consider the array T(i,j) where the i-th row gives the parity trajectory of i, for example for i = 6, the infinite trajectory is 6 -> 3 -> 10 ->5 -> 16 ->8 -> 4 -> 2 -> 1 -> 4 -> 2 -> 1 -> 4->2-> 1 ... and T(6,j) = [0,1,0,1,0,0,0,0,1,0,0,1,...,1,0,0,1,...]. Now, we consider the sum of the digits 1 of each array T(i,j), where
a(1) = sum of the digits "1" of T(i,j), i = 1..2^1 and j = 1;
a(2) = sum of the digits "1" of T(i,j), i = 1..2^2 and j = 1..2;
a(3) = sum of the digits "1" of T(i,j), i = 1..2^3 and j = 1..3;
a(n) = Sum_{i=1..2^n}(Sum_{j=1..n} T(i,j)) = Sum_{i=1..n} A001045(n)*2^(n-i) = convolution of A001045 and A000079 (see the formula below).
The number of digits "0" equals A113861(n) = n*2^n - a(n) because n and 2^n are the dimensions of each array.
An important result is that the ratio r = A113861(n) / A045883(n) tends towards 2 when n tends towards infinity. In other words, when the array tends towards infinity, the ratio r = (number of divisions by 2) / (number of multiplications by 3) tends towards 2, even if there exists divergent trajectories. That is the problem! For each possible divergent infinite trajectory, r < 2 even though the global ratio r is 2.
Conclusion:
1. For each number n with a convergent trajectory T(n,k), k = 1..infinity, or for each row of the array T(i,j), the ratio r tends towards 2 (the proof is easy because the trajectory becomes periodic from a certain index 1001001001...).
2. For each array of dimension n X 2^n, the radio r tends towards 2.
3. If there exists a number n such that the trajectory is divergent, this trajectory is random and r tends towards a real x such that 1 < = r < = x < 2.
4. In order to establish a proof of the Collatz problem from this considerations (if that is possible), it is necessary to prove that a ratio < 2 for an infinite row (or several rows) of an infinite array T(i,j) is incompatible with r = 2, the exact ratio for this array. (End)
a(n) is the distance spectral radius of the dimension-regular generalized recursive circulant graph (commonly known as multiplicative circulant graph) of order 2^n. - John Rafael M. Antalan, Sep 25 2020
Total sum over all compositions of n of the absolute differences between consecutive parts, assuming an initial part 0. - Alois P. Heinz, Apr 30 2025

Crossrefs

Partial sums of A059570, bisection: A014916.
Row sums of triangle A094953.

Programs

  • Magma
    [((3*n+1)*2^n-(-1)^n)/9: n in [0..35]]; // Vincenzo Librandi, Jun 15 2017
  • Maple
    A045883:=n->((3*n+1)*2^n-(-1)^n)/9; seq(A045883(n), n=0..30); # Wesley Ivan Hurt, Mar 21 2014
  • Mathematica
    nn=31;a=x^2(1-x)/(1-x-2x^2)/(1-2x);b=x^2/(1-2x)^2;Drop[CoefficientList[Series[(b-a)/2,{x,0,nn}],x],2] (* Geoffrey Critzer, Mar 21 2014 *)
    CoefficientList[Series[x / ((1 + x) (1 - 2 x)^2), {x, 0, 33}], x] (* Vincenzo Librandi, Jun 15 2017 *)
    LinearRecurrence[{3, 0, -4}, {0, 1, 3}, 33] (* Jean-François Alcover, Sep 27 2017 *)
  • PARI
    {a(n) = if( n<-1, 0, ((3*n + 1)*2^n - (-1)^n) / 9)};
    

Formula

G.f.: x/((1+x)*(1-2*x)^2).
a(n) = 3*a(n-1) - 4*a(n-3).
Convolution of A001045 and A000079. G.f.: x/((1-2*x)(1-x-2*x^2)). - Paul Barry, May 21 2004
Starting with "1" = triangle A049260 * the odd integers as a vector. - Gary W. Adamson, Mar 06 2012
a(n) = A140960(n)/2. - J. M. Bergot, May 21 2013
From Wolfdieter Lang, Jun 14 2017: (Start)
a(n) = f(n)*2^n, where f(n) is a rational Fibonacci type sequence based on fuse(a,b) = (a+b+1)/2 with f(0) = 0, f(1) = 1/2 and f(n) = fuse(f(n-1), f(n-2)), for n >= 2. For fuse(a,b) see the Jeff Erickson link under A188545. Proof with f(n) = (3*n+1 - (-1)^n/2^n)/9, n >= 0, by induction.
a(n) = a(n-1) + 2*a(n-2) + 2^(n-1), n >= 0, with input a(-2) = 1/4 and a(-1) = 0. See also A127984. (End)
E.g.f.: (exp(2*x)*(1 + 6*x) - cosh(x) + sinh(x))/9. - Stefano Spezia, Apr 09 2025
a(n) = Sum_{k=0..n+2} k * A238343(n+2,k). - Alois P. Heinz, Apr 30 2025

Extensions

Simpler description from Vladeta Jovovic, Jul 18 2002

A140642 Triangle of sorted absolute values of Jacobsthal successive differences.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 11, 12, 16, 20, 21, 22, 24, 32, 40, 42, 43, 44, 48, 64, 80, 84, 85, 86, 88, 96, 128, 160, 168, 170, 171, 172, 176, 192, 256, 320, 336, 340, 341, 342, 344, 352, 384, 512, 640, 672, 680, 682, 683, 684, 688, 704, 768, 1024, 1280, 1344, 1360
Offset: 0

Views

Author

Paul Curtz, Jul 08 2008

Keywords

Comments

The triangle is generated from the set of Jacobsthal numbers A001045 and all the iterated differences (see A078008, A084247), taking the absolute values and sorting into natural order.
The first differences generated individually along any row of this triangle here are all in A000079.

Examples

			The triangle starts
   1;
   2,  3;
   4,  5,  6;
   8, 10, 11, 12;
  16, 20, 21, 22, 24;
The Jacobsthal sequence and its differences in successive rows start:
    0,   1,   1,   3,   5,  11,  21,  43,  85, ...
    1,   0,   2,   2,   6,  10,  22,  42,  86, ...
   -1,   2,   0,   4,   4,  12,  20,  44,  84, ...
    3,  -2,   4,   0,   8,   8,  24,  40,  88, ...
   -5,   6,  -4,   8,   0,  16,  16,  48,  80, ...
   11, -10,  12,  -8,  16,   0,  32,  32,  96, ...
  -21,  22, -20,  24, -16,  32,   0,  64,  64, ...
   43, -42,  44, -40,  48, -32,  64,   0, 128, ...
The values +-7, +-9, +-13, for example, are missing there, so 7, 9 and 13 are not in the triangle.
		

Crossrefs

Programs

  • Mathematica
    maxTerm = 384; FixedPoint[(nMax++; Print["nMax = ", nMax]; jj = Table[(2^n - (-1)^n)/3, {n, 0, nMax}]; Table[Differences[jj, n], {n, 0, nMax}] // Flatten // Abs // Union // Select[#, 0 < # <= maxTerm &] &) &, nMax = 5 ] (* Jean-François Alcover, Dec 16 2014 *)

Formula

Row sums: A113861(n+2).

Extensions

Edited by R. J. Mathar, Dec 05 2008
a(45)-a(58) from Stefano Spezia, Mar 12 2024

A348407 a(n) = ((n+1)*3*2^(n+1) + 29*2^n + (-1)^n)/9.

Original entry on oeis.org

4, 9, 21, 47, 105, 231, 505, 1095, 2361, 5063, 10809, 22983, 48697, 102855, 216633, 455111, 953913, 1995207, 4165177, 8679879, 18058809, 37515719, 77827641, 161247687, 333680185, 689729991, 1424199225, 2937876935, 6054710841, 12467335623, 25650499129, 52732654023, 108328619577
Offset: 0

Views

Author

Paul Curtz and Thomas Scheuerle, Oct 17 2021

Keywords

Comments

The ratio (count of ones)/(count of zeros) in the binary expansion of a(n) is > 1/2 and <= 5 for all n > 0, this is because the division by 9 adds a repeating pattern 111000... after some binary digits.
This sequence has in its "partial binomial transform" (see formula section) no other constants than 2 and 1 despite of its more complicated looking closed form expression. This transform has a deep connection to the Grünwald-Letnikov fractional derivative if we replace the order of the derivative with the variable x: D^x*f(x).

Crossrefs

Programs

  • Mathematica
    Array[((# + 1)*3*2^(# + 1) + 29*2^# + (-1)^#)/9 &, 33, 0] (* Michael De Vlieger, Oct 19 2021 *)
    LinearRecurrence[{3,0,-4},{4,9,21},40] (* Harvey P. Dale, Aug 12 2023 *)

Formula

a(n) = round(((n+1)*3*2^(n+1) + 29*2^n)/9).
a(n) = 2^(n+2) + A113861(n).
a(n) = 2^(n+2) + n*2^n - A045883(n) = 2^(n+2) + n*2^n - round(((3*n+1)*2^n)/9).
a(n+1) - 2*a(n) = A001045(n+2).
a(n) = A034007(n+3) + A045883(n-1) for n > 0.
A partial binomial transform in two parts:
(Partial means a diagonal in a difference table a(0), a(2)-a(1), ... . This is partial because one diagonal alone is no invertible transform.)
A001787(n+2) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(2*n-k)
= (n+2)*2^(n+1).
A052951(n+1) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*(a(1+2*n-k) - a(2*n-k))
= (n+2)*2^(n+1) + 2^n.
The inverse transform:
a(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*(k+2)*2^(k+1)
+ Sum_{k=0..floor((n-1)/2)} binomial(n-k-1, k)*((k+2)*2^(k+1) + 2^k).
From Stefano Spezia, Oct 20 2021: (Start)
G.f.: (4 - 3*x - 6*x^2)/((1 + x)*(1 - 2*x)^2).
a(n) = 3*a(n-1) - 4*a(n-3) for n > 2. (End)

A174836 a(n) = 1 + ((6*n-1)*2^n + (-1)^n)/3.

Original entry on oeis.org

1, 4, 16, 46, 124, 310, 748, 1750, 4012, 9046, 20140, 44374, 96940, 210262, 453292, 972118, 2075308, 4412758, 9349804, 19748182, 41593516, 87381334, 183151276, 383079766, 799713964, 1666536790, 3467291308, 7203018070, 14942907052, 30959555926, 64066595500, 132428158294
Offset: 0

Views

Author

Fernando J. Ballesteros (fernando.ballesteros(AT)uv.es), Mar 30 2010

Keywords

Crossrefs

Cf. A113861.

Programs

  • PARI
    a(n) = 1 + ((6*n-1)*2^n+(-1)^n)/3; \\ Michel Marcus, Feb 05 2019

Formula

G.f.: 1/(1-x) + 1/(3*(1+x)) - 1/(3*(1-2*x)) + 8*x/(1-2*x)^2. [Richard Choulet, Apr 04 2010]
a(n) = 3*A113861(n+1) + 1. - Michel Marcus, Feb 05 2019

Extensions

More terms from Michel Marcus, Feb 05 2019
Showing 1-4 of 4 results.