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

A081038 3rd binomial transform of (1,2,0,0,0,0,0,0,...).

Original entry on oeis.org

1, 5, 21, 81, 297, 1053, 3645, 12393, 41553, 137781, 452709, 1476225, 4782969, 15411789, 49424013, 157837977, 502211745, 1592728677, 5036466357, 15884240049, 49977243081, 156905298045, 491636600541, 1537671920841
Offset: 0

Views

Author

Paul Barry, Mar 03 2003

Keywords

Comments

a(n) is the number of distinguished parts in all compositions of n+1 in which some (possibly all or none) of the parts have been distinguished. a(1) = 2 because we have: 2', 1'+1, 1+1', 1'+1' where we see 5's marking the distinguished parts. With offset=1, a(n) = Sum_{k=1..n} A200139(n,k)*k. - Geoffrey Critzer, Jan 12 2013
For n>=1, a(n-1) the number of ternary strings of length 2n containing the block 11..12 with n ones where no runs of length larger than n are permitted. - Marko Riedel, Mar 08 2016
Binomial transform of {A001787(n + 1)}{n >= 0}. - _Wolfdieter Lang, Oct 01 2019

Crossrefs

Programs

Formula

G.f.: (1-x)/(1-3*x)^2.
a(n) = 6*a(n-1) - 9*a(n-2), with a(0)=1, a(1)=5.
a(n) = (2*n+3)*3^(n-1).
a(n) = Sum_{k=0..n} (k+1)*2^k*binomial(n, k).
a(n) = 2*A086972(n) - 1. - Lambert Herrgesell (zero815(AT)googlemail.com), Feb 10 2008
From Amiram Eldar, May 17 2022: (Start)
Sum_{n>=0} 1/a(n) = 9*(sqrt(3)*arctanh(1/sqrt(3)) - 1).
Sum_{n>=0} (-1)^n/a(n) = 9 - 3*sqrt(3)*Pi/2. (End)
E.g.f.: exp(3*x)*(1 + 2*x). - Stefano Spezia, Jan 31 2025

A081040 5th binomial transform of (1,4,0,0,0,0,...).

Original entry on oeis.org

1, 9, 65, 425, 2625, 15625, 90625, 515625, 2890625, 16015625, 87890625, 478515625, 2587890625, 13916015625, 74462890625, 396728515625, 2105712890625, 11138916015625, 58746337890625, 308990478515625, 1621246337890625
Offset: 0

Views

Author

Paul Barry, Mar 03 2003

Keywords

Crossrefs

Programs

Formula

a(n) = 10*a(n-1) - 25*a(n-2), a(0)=1, a(1)=9.
a(n) = (4n+5)*5^(n-1).
a(n) = Sum_{k=0..n} (k+1)*4^k*binomial(n, k).
G.f.: (1-x)/(1-5*x)^2.
E.g.f.: exp(5*x)*(1 + 4*x). - Stefano Spezia, Jan 31 2025

A119733 Offsets of the terms of the nodes of the reverse Collatz function.

Original entry on oeis.org

0, 1, 2, 5, 4, 7, 10, 19, 8, 11, 14, 23, 20, 29, 38, 65, 16, 19, 22, 31, 28, 37, 46, 73, 40, 49, 58, 85, 76, 103, 130, 211, 32, 35, 38, 47, 44, 53, 62, 89, 56, 65, 74, 101, 92, 119, 146, 227, 80, 89, 98, 125, 116, 143, 170, 251, 152, 179, 206, 287, 260, 341, 422, 665, 64, 67
Offset: 0

Views

Author

William Entriken, Jun 14 2006

Keywords

Comments

Create a binary tree starting with x. To follow 0 from the root, apply f(x)=2x. To follow 1, apply g(x)=(2x-1)/3. For example, starting with x, the string 010 {also known as f(g(f(x)))}, you would get (8x-2)/3. These expressions represent the reverse Collatz function and will provide numbers whose Collatz path may include x. These expressions will all be of the form (2^a*x-b)/3^c. This sequence concerns b. What makes b interesting is that if you draw the tree, each level of the tree will have the same sequence of values for b. The root of the tree x, can be written as (2^0*x-0)/3^0, which has the first value for b. Each subsequent level contains twice as many values of b.
This sequence is 0 followed by a permutation of A213539, and therefore consists of 0 plus the elements of A116640 multiplied by 2^k, where k >= 0. E.g., 1, 5, 7, 19 becomes 0, 2^0*1, 2^1*1, 2^0*5, 2^2*1, 2^0*7, 2^1*5, 2^0*19, ... - Joe Slater, Dec 19 2016
When this sequence is arranged as an irregular triangle the sum of each row a(2^k)...a(2^(k+1)-1) equals A081039(2^k). The cumulative sum from a(0) to a(2^k-1) equals A002697(k). - Joe Slater, Apr 12 2018

Examples

			a(1) = 1 = 2 * 0 + 3^0 since 0 written in binary contains no 1's.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) `if`(n=0, 0, `if`(irem(n, 2, 'r')=0, 0,
          3^add(i, i=convert(r, base, 2)))+2*a(r))
        end:
    seq(a(n), n=0..127);  # Alois P. Heinz, Aug 13 2017
  • Mathematica
    a[0] := 0; a[n_?OddQ] := 2a[(n - 1)/2] + 3^Plus@@IntegerDigits[(n - 1)/2, 2]; a[n_?EvenQ] := 2a[n/2]; Table[a[n], {n, 0, 65}] (* Alonso del Arte, Apr 21 2011 *)
  • PARI
    a(n) = my(ret=0); if(n, for(i=0,logint(n,2), if(bittest(n,i), ret=3*ret+1<Kevin Ryde, Oct 22 2021
  • Perl
    # call with n to get 2^n values
    $depth=shift; sub funct { my ($i, $b, $c) = @_; if ($i < $depth) { funct($i+1, $b*2, $c); funct($i+1, 2*$b+$c, $c*3); } else { print "$b, "; } } funct(0, 0, 1); print " ";
    
  • Python
    from sympy.core.cache import cacheit
    @cacheit
    def a(n): return 0 if n==0 else 2*a((n - 1)//2) + 3**bin((n - 1)//2).count('1') if n%2 else 2*a(n//2)
    print([a(n) for n in range(131)]) # Indranil Ghosh, Aug 13 2017
    

Formula

a(0) = 0, a(2*n + 1) = 2*a(n) + 3^wt(n) = 2*a(n) + A048883(n), a(2*n) = 2*a(n), where wt(n) = A000120(n) = the number 1's in the binary representation of n.
a(k) = [z^k] 1 + (1/(1-z)) * Sum_{s=0..n-1} 2^s*z^(2^s)*(1 - z^(2^s)) * Product_{r=s+1..n-1} (1 + 3*z^(2^r)), for 0 < k <= 2^n-1. - Wolfgang Hintze, Jul 28 2017
a(n) = Sum_{i=0..k} 2^e[i] * 3^i where binary expansion n = 2^e[0] + 2^e[1] + ... + 2^e[k] with descending e[0] > e[1] > ... > e[k] (A272011). [Martín Chabrera lemma 6.1, adapting index i] - Kevin Ryde, Oct 22 2021

A169585 A000004 preceded by 1, 3.

Original entry on oeis.org

1, 3, 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, 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, 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, 0
Offset: 0

Views

Author

Klaus Brockhaus, Dec 02 2009

Keywords

Comments

Inverse binomial transform of A016777; second inverse binomial transform of A053220; third inverse binomial transform of A027471 without first term; fourth inverse binomial transform of A081039.

Crossrefs

Cf. A000004 (zero sequence), A016777 (3*n+1), A053220 ((3*n-1)*2^(n-2)), A027471 ((n-1)*3^(n-2)), A081039 ((3*n+4)*4^(n-1), a(0)=1, a(1)=7), A130706 (1, 2, 0, 0, 0, ...), A166926 (1, 2, 4, 0, 0, 0, ...), A130779 (1, 1, 2, 0, 0, 0, ...).

Programs

  • PARI
    {concat([1, 3], vector(103))}

Formula

a(0) = 1, a(1) = 3, a(n) = 0 for n > 1.
G.f.: 1+3*x.
a(n) = 3^n mod 9. - Ridouane Oudra, Apr 09 2025

A380747 Array read by ascending antidiagonals: A(n,k) = [x^n] (1 - x)/(1 - k*x)^2.

Original entry on oeis.org

1, -1, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 8, 5, 1, 0, 1, 20, 21, 7, 1, 0, 1, 48, 81, 40, 9, 1, 0, 1, 112, 297, 208, 65, 11, 1, 0, 1, 256, 1053, 1024, 425, 96, 13, 1, 0, 1, 576, 3645, 4864, 2625, 756, 133, 15, 1, 0, 1, 1280, 12393, 22528, 15625, 5616, 1225, 176, 17, 1
Offset: 0

Views

Author

Stefano Spezia, Jan 31 2025

Keywords

Examples

			The array begins as:
   1, 1,   1,    1,     1,     1, ...
  -1, 1,   3,    5,     7,     9, ...
   0, 1,   8,   21,    40,    65, ...
   0, 1,  20,   81,   208,   425, ...
   0, 1,  48,  297,  1024,  2625, ...
   0, 1, 112, 1053,  4864, 15625, ...
   0, 1, 256, 3645, 22528, 90625, ...
   ...
		

Crossrefs

Cf. A000012 (k=1 or n=0), A000567 (n=2), A001792 (k=2), A007778, A060747 (n=1), A081038 (k=3), A081039 (k=4), A081040 (k=5), A081041 (k=6), A081042 (k=7), A081043 (k=8), A081044 (k=9), A081045 (k=10), A103532, A154955, A380748 (antidiagonal sums).

Programs

  • Mathematica
    A[0,0]:=1; A[1,0]:=-1; A[n_,k_]:=((k-1)*n+k)k^(n-1); Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten (* or *)
    A[n_,k_]:=SeriesCoefficient[(1-x)/(1-k*x)^2,{x,0,n}]; Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten (* or *)
    A[n_,k_]:=n!SeriesCoefficient[Exp[k*x](1+(k-1)*x),{x,0,n}]; Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten

Formula

A(n,k) = ((k - 1)*n + k)*k^(n-1) with A(0,0) = 1.
A(n,k) = n! * [x^n] exp(k*x)*(1 + (k - 1)*x).
A(n,0) = A154955(n+1).
A(3,n) = A103532(n-1) for n > 0.
A(n,n) = A007778(n) for n > 0.
Showing 1-5 of 5 results.