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.

User: Ryan Brooks

Ryan Brooks's wiki page.

Ryan Brooks has authored 4 sequences.

A348175 Irregular table T(n,k) read by rows: T(n,k) = T(n-1,k/2) when k is even and 3*T(n-1,(k-1)/2) + 2^(n-1) when k is odd. T(0,0) = 0 and 0 <= k <= 2^n-1.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 5, 0, 4, 2, 10, 1, 7, 5, 19, 0, 8, 4, 20, 2, 14, 10, 38, 1, 11, 7, 29, 5, 23, 19, 65, 0, 16, 8, 40, 4, 28, 20, 76, 2, 22, 14, 58, 10, 46, 38, 130, 1, 19, 11, 49, 7, 37, 29, 103, 5, 31, 23, 85, 19, 73, 65, 211
Offset: 0

Author

Ryan Brooks, Oct 04 2021

Keywords

Examples

			n\k 0  1  2  3  4  5  6  7
0   0
1   0  1
2   0  2  1  5
3   0  4  2 10  1  7  5 19
		

Crossrefs

Cf. A001047 (right diagonal), A002697 (row sums), A119733.
Cf. A133457 (binary exponents).

Programs

  • Mathematica
    T[0, 0] = 0; T[n_, k_] := T[n, k] = If[EvenQ[k], T[n - 1, k/2], 3*T[n - 1, (k - 1)/2] + 2^(n - 1)]; Table[T[n, k], {n, 0, 5}, {k, 0, 2^n - 1}] // Flatten (* Amiram Eldar, Oct 11 2021 *)
  • PARI
    T(n, k) = if ((n==0) && (k==0), 0, if (k%2, 3*T(n-1,(k-1)/2) + 2^(n-1), T(n-1,k/2)));
    tabf(nn) = for (n=0, nn, for (k=0, 2^n-1, print1(T(n,k), ", ")); print); \\ Michel Marcus, Oct 18 2021
    
  • PARI
    T(n,k) = my(ret=0); for(i=0,n-1, if(bittest(k,n-1-i), ret=3*ret+1<Kevin Ryde, Oct 22 2021

Formula

T(n,k) = T(n-1,k/2) for k being even.
T(n,k) = 3*T(n-1,(k-1)/2) + 2^(n-1) for k being odd.
T(n,k) = 2*T(n-1,k) for 0 <= k <= 2^(n-1) - 1.
T(n,k) = Sum_{i=0..r} 2^(n-1-e[i]) * 3^i where binary expansion k = 2^e[0] + 2^e[1] + ... + 2^e[r] with ascending e[0] < e[1] < ... < e[r] (A133457). - Kevin Ryde, Oct 22 2021

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

Original entry on oeis.org

0, 2, 3, 16, 35, 132, 343, 1136, 3195, 10012, 29183, 89256, 264355, 799892, 2386023, 7185376, 21501515, 64613772, 193622863, 581305496, 1743042675, 5230875652, 15689131703, 47074385616, 141209175835, 423655489532, 1270910544543, 3812843481736, 11438306748995
Offset: 1

Author

Ryan Brooks, Jun 14 2021

Keywords

Examples

			a(4) = (1/6)*(3^4 + (-2)^4 - 1) = (1/6)*(81+16-1) = 16.
		

Crossrefs

Potentially related to A094554, A094555, and A094556 (which have the same recurrence).

Programs

  • Mathematica
    LinearRecurrence[{2, 5, -6}, {0, 2, 3}, 30] (* Greg Dresden, Jun 19 2021 *)

Formula

G.f.: x*(2 - x)/((1 - x)*(1 + 2*x)*(1 - 3*x)). - Andrew Howroyd, Jun 15 2021
a(n) = A094554(n-1) + 2*A094556(n-1). - Greg Dresden, Jun 19 2021

A334754 The size of partitions of the decimal digits of Pi, starting directly after the decimal point, such that each partition contains the maximum number of digits possible while also avoiding any repeated digits. A digit must be in a partition if the current partition does not contain the current digit.

Original entry on oeis.org

2, 5, 2, 4, 3, 5, 3, 2, 6, 2, 5, 4, 1, 6, 7, 2, 10, 5, 5, 4, 4, 5, 2, 4, 6, 2, 6, 5, 7, 1, 5, 2, 3, 4, 3, 7, 2, 2, 1, 7, 5, 7, 1, 3, 1, 4, 3, 4, 3, 3, 6, 3, 7, 4, 2, 5, 4, 4, 4, 7, 4, 3, 5, 4, 5, 5, 5, 4, 6, 2, 5, 6, 5, 5, 2, 2, 2, 4, 2, 4, 1, 6, 4
Offset: 1

Author

Ryan Brooks, May 10 2020

Keywords

Comments

Assuming digits are random, the expected value for the size of the partitions is 3.66021568 = Sum_{k=1..10} k^2*9!/(10^k*(10-k)!).

Examples

			Pi=3.1415926535897932384626433... => ignore lead 3 and partition as such: 0.|14|15926|53|5897|932|38462|643|3... => 2,5,2,4,3,5,3,...
		

Crossrefs

Cf. A000796 (Pi). Essentially the same as A104807.

Programs

  • PARI
    F(v)={my(L=List(), S=Set()); for(i=1, #v, if(setsearch(S, v[i]), listput(L,#S); S=Set()); S=setunion(S,[v[i]])); Vec(L)}
    { localprec(10^3); my(t=Pi-3); F(digits(floor(t*10^precision(t)))) } \\ Andrew Howroyd, Aug 10 2020

A334578 Double subfactorials: a(n) = (-1)^floor(n/2) * n!! * Sum_{i=0..floor(n/2)} (-1)^i/(n-2*i)!!.

Original entry on oeis.org

1, 1, 1, 2, 5, 11, 29, 76, 233, 685, 2329, 7534, 27949, 97943, 391285, 1469144, 6260561, 24975449, 112690097, 474533530, 2253801941, 9965204131, 49583642701, 229199695012, 1190007424825, 5729992375301, 30940193045449, 154709794133126, 866325405272573
Offset: 0

Author

Ryan Brooks, May 06 2020

Keywords

Examples

			a(5) = (5*3*1)*(1/(1) - 1/(3*1) + 1/(5*3*1)) = 15-5+1 = 11.
		

Crossrefs

Even bisection gives A000354.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, [0$2, 1$2][n+3],
          (n-1)*a(n-2)+(n-2)*a(n-4))
        end:
    seq(a(n), n=0..32);  # Alois P. Heinz, May 06 2020
  • Mathematica
    RecurrenceTable[{a[0] == 1, a[1] == 1, a[n] == n a[n-2] + (-1)^Floor[n/2]}, a, {n, 0, 32}] (* Jean-François Alcover, Nov 27 2020 *)

Formula

a(n) = n*a(n-2) + (-1)^floor(n/2).
a(2n) = A000354(n).
From Ryan Brooks, Oct 25 2020: (Start)
a(2n)/A006882(2n) ~ 1/sqrt(e) = A092605.
a(2n+1)/A006882(2n+1) ~ sqrt(Pi/(2*e))*erfi(1/sqrt(2)) = A306858. (End)