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.

Previous Showing 21-27 of 27 results.

A173261 Array T(n,k) read by antidiagonals: T(n,2k)=1, T(n,2k+1)=n, n>=2, k>=0.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 1, 4, 1, 2, 1, 5, 1, 3, 1, 1, 6, 1, 4, 1, 2, 1, 7, 1, 5, 1, 3, 1, 1, 8, 1, 6, 1, 4, 1, 2, 1, 9, 1, 7, 1, 5, 1, 3, 1, 1, 10, 1, 8, 1, 6, 1, 4, 1, 2, 1, 11, 1, 9, 1, 7, 1, 5, 1, 3, 1, 1, 12, 1, 10, 1, 8, 1, 6, 1, 4, 1, 2, 1, 13, 1, 11, 1, 9, 1, 7, 1, 5, 1, 3, 1, 1, 14, 1, 12, 1, 10, 1, 8, 1, 6, 1, 4, 1, 2
Offset: 2

Views

Author

Paul Curtz, Feb 14 2010

Keywords

Comments

One may define another array B(n,0) = -1, B(n,k) = T(n,k-1) + 2*B(n,k-1), n>=2, which also starts in columns k>=0, as follows:
-1, -1, 0, 1, 4, 9, 20, 41, 84, 169, 340, 681, 1364 ...: A084639;
-1, -1, 1, 3, 9, 19, 41, 83, 169, 339, 681, 1363, 2729;
-1, -1, 2, 5, 14, 29, 62, 125, 254, 509, 1022, 2045, 4094;
-1, -1, 3, 7, 19, 39, 83, 167, 339, 679, 1363, 2727, 5459 ...: -A173114;
B(n,k) = (n-1)*A001045(k) - T(n,k).
First differences are B(n,k+1) - B(n,k) = (n-1)*A001045(k).

Examples

			The array T(n,k) starts in row n=2 with columns k>=0 as:
  1,  2, 1,  2, 1,  2, 1,  2, 1,  2, 1,  2 ... A000034;
  1,  3, 1,  3, 1,  3, 1,  3, 1,  3, 1,  3 ... A010684;
  1,  4, 1,  4, 1,  4, 1,  4, 1,  4, 1,  4 ... A010685;
  1,  5, 1,  5, 1,  5, 1,  5, 1,  5, 1,  5 ... A010686;
  1,  6, 1,  6, 1,  6, 1,  6, 1,  6, 1,  6 ... A010687;
  1,  7, 1,  7, 1,  7, 1,  7, 1,  7, 1,  7 ... A010688;
  1,  8, 1,  8, 1,  8, 1,  8, 1,  8, 1,  8 ... A010689;
  1,  9, 1,  9, 1,  9, 1,  9, 1,  9, 1,  9 ... A010690;
  1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10 ... A010691.
Antidiagonal triangle begins as:
  1;
  1,  2;
  1,  3,  1;
  1,  4,  1,  2;
  1,  5,  1,  3,  1;
  1,  6,  1,  4,  1,  2;
  1,  7,  1,  5,  1,  3,  1;
  1,  8,  1,  6,  1,  4,  1,  2;
  1,  9,  1,  7,  1,  5,  1,  3,  1;
  1, 10,  1,  8,  1,  6,  1,  4,  1,  2;
  1, 11,  1,  9,  1,  7,  1,  5,  1,  3,  1;
  1, 12,  1, 10,  1,  8,  1,  6,  1,  4,  1,  2;
  1, 13,  1, 11,  1,  9,  1,  7,  1,  5,  1,  3,  1;
  1, 14,  1, 12,  1, 10,  1,  8,  1,  6,  1,  4,  1,  2;
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= (1/2)*((n+3) - (n+1)*(-1)^k);
    Table[T[n-k, k], {n,2,17}, {k,2,n}]//Flatten (* G. C. Greubel, Dec 03 2021 *)
  • Sage
    flatten([[(1/2)*((n-k+3) - (n-k+1)*(-1)^k) for k in (2..n)] for n in (2..17)]) # G. C. Greubel, Dec 03 2021

Formula

From G. C. Greubel, Dec 03 2021: (Start)
T(n, k) = (1/2)*((n+3) - (n+1)*(-1)^k).
Sum_{k=0..n} T(n-k, k) = A024206(n).
Sum_{k=0..floor((n+2)/2)} T(n-2*k+2, k) = (1/16)*(2*n^2 4*n -5*(1 +(-1)^n) + 4*sin(n*Pi/2)) (diagonal sums).
T(2*n-2, n) = A093178(n). (End)

A275326 Triangle read by rows, T(n,k) = ceiling(A275325(n,k)/2) for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 3, 0, 2, 1, 0, 10, 5, 0, 5, 4, 1, 0, 35, 28, 7, 0, 14, 14, 6, 1, 0, 126, 126, 54, 9, 0, 42, 48, 27, 8, 1, 0, 462, 528, 297, 88, 11, 0, 132, 165, 110, 44, 10, 1, 0, 1716, 2145, 1430, 572, 130, 13, 0, 429, 572, 429, 208, 65, 12, 1
Offset: 0

Views

Author

Peter Luschny, Aug 15 2016

Keywords

Comments

An extension of the Catalan triangle A128899.

Examples

			Triangle starts:
[ n] [k=0,1,2,...] [row sum]
[ 0] [1] 1
[ 1] [0, 1] 1
[ 2] [0, 1] 1
[ 3] [0, 3] 3
[ 4] [0, 2, 1] 3
[ 5] [0, 10, 5] 15
[ 6] [0, 5, 4, 1] 10
[ 7] [0, 35, 28, 7] 70
[ 8] [0, 14, 14, 6, 1] 35
[ 9] [0, 126, 126, 54,  9] 315
[10] [0, 42, 48, 27, 8, 1] 126
[11] [0, 462, 528, 297, 88, 11] 1386
[12] [0, 132, 165, 110, 44, 10, 1] 462
		

Crossrefs

Cf. A057977, A093178, A128899, A275324 (row sums), A275325.

Programs

  • Sage
    # uses[orbital_factors]
    # Function orbital_factors is in A275325.
    def half_orbital_factors(n):
        F = orbital_factors(n)
        return [f//2 for f in F] if n >= 2 else F
    for n in (0..12): print(half_orbital_factors(n))

Formula

T(n,k) = A275325(n,k)/2 for n>=2.
T(n,1) = A057977(n) for n>=1 (the extended Catalan numbers).
For odd n: T(n,1) = Sum_{k>=0} T(n+1,k).
Main diagonal: T(n, floor(n/2)) = A093178(n).

A276134 a(5n) = a(n), a(5n+1) = a(5n+2) = a(5n+3) = a(5n+4) = a(n) + 1, a(0) = 0.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 21 2016

Keywords

Comments

Number of nonzero digits in the base 5 representation of n.
Fixed point of the mapping 0 -> 01111, 1 -> 12222, 2 -> 23333, ...
Self-similar or fractal sequence (underlining every fifth term, reproduce the original sequence).

Examples

			The evolution starting with 0 is: 0 -> 01111 -> 0111112222122221222212222 -> ...
...
a(0) = 0;
a(1) = a(5*0+1) = a(0) + 1 = 1;
a(2) = a(5*0+2) = a(0) + 1 = 1;
a(3) = a(5*0+3) = a(0) + 1 = 1;
a(4) = a(5*0+4) = a(0) + 1 = 1;
a(5) = a(5*1+0) = a(1) = 1;
a(6) = a(5*1+1) = a(1) + 1 = 2, etc.
...
Also a(10) = 1, because 10 (base 10) = 20 (base 5) and 20 has 1 nonzero digit.
		

Crossrefs

Programs

  • Maple
    f:= n -> nops(subs(0=NULL,convert(n,base,5))):
    map(f, [$0..100]); # Robert Israel, Sep 07 2016
  • Mathematica
    Join[{0}, Table[IntegerLength[n, 5] - DigitCount[n, 5, 0], {n, 120}]]

Formula

a(5^k) = 1.
a(5^k-1) = k.
a(5^k-m) = k, k>0, m = 2,3,4.
a(5^k+m) = 2, k>0, m = 1,2,3,4.
a(5^k-a(5^k)) = k.
a(5^k+(-1)^k) = (k + (-1)^k*(k - 1) + 3)/2.
a(5^k+(-1)^k-1) = A093178(k).
a(5^k+(-1)^k+1) = A000034(k+1), k>0.
G.f. g(x) satisfies g(x) = (1+x+x^2+x^3+x^4)*g(x^5) + (x+x^2+x^3+x^4)/(1-x^5). - Robert Israel, Sep 07 2016

A289870 a(n) = n*(n + 1) for n odd, otherwise a(n) = (n - 1)*(n + 1).

Original entry on oeis.org

-1, 2, 3, 12, 15, 30, 35, 56, 63, 90, 99, 132, 143, 182, 195, 240, 255, 306, 323, 380, 399, 462, 483, 552, 575, 650, 675, 756, 783, 870, 899, 992, 1023, 1122, 1155, 1260, 1295, 1406, 1443, 1560, 1599, 1722, 1763, 1892, 1935, 2070, 2115, 2256, 2303, 2450, 2499
Offset: 0

Views

Author

Keywords

Comments

a(n) is a fifth-order linear recurrence whose main interest is that it is related to (at least) eight other sequences (see the formula section).

Crossrefs

After -1, subsequence of A035106, A198442 and A214297.

Programs

  • Mathematica
    a[n_] := (n + 1)(n - 1 + Mod[n, 2]); Table[a[n], {n, 0, 50}]
  • PARI
    a(n)=if(n%2, n, n-1)*(n+1) \\ Charles R Greathouse IV, Jul 14 2017

Formula

a(n) = (n + 1)*(n - 1 + (n mod 2)).
a(n) = n * A109613(n-1) for n>0.
a(n) = -A114285(n) * A109613(n).
a(n) = A002378(n) - A193356(n).
a(n) = A289296(-n).
a(n) = n^2 - (-1)^n * A093178(n).
a(2*k) = A000466(k).
G.f.: (1-3*x-3*x^2-3*x^3)/((-1+x)^3*(1+x)^2).

A100727 Continued fraction expansion of (1/2) [tan(1) + sec(1)].

Original entry on oeis.org

1, 1, 2, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 5, 1, 2, 1, 6, 1, 2, 1, 7, 1, 2, 1, 8, 1, 2, 1, 9, 1, 2, 1, 10, 1, 2, 1, 11, 1, 2, 1, 12, 1, 2, 1, 13, 1, 2, 1, 14, 1, 2, 1, 15, 1, 2, 1, 16, 1, 2, 1, 17, 1, 2, 1, 18, 1, 2, 1, 19, 1, 2, 1, 20, 1, 2, 1, 21, 1, 2, 1, 22, 1, 2, 1, 23, 1
Offset: 0

Views

Author

Ralf Stephan, Nov 24 2004

Keywords

Comments

Periodic part is ...1,2,1,k,..., for k=2..oo.

Examples

			1.704111721167913924209364024428505183278823713737764668609552441...
		

Crossrefs

Programs

  • Mathematica
    ContinuedFraction[(Tan[1]+Sec[1])/2,100] (* Harvey P. Dale, Feb 11 2015 *)

Formula

G.f.: (x^4-x^2-1)*(x^6+x^5+x^4-x^3-x^2-x-1) / ((x-1)^2*(x+1)^2*(x^2+1)^2). - Colin Barker, Jul 16 2013

A327555 Decimal expansion of number with continued fraction expansion [1; 2, 1, 4, 1, 6, 1, 8, 1, 10, 1, ...].

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The continued fraction with even numbers and 1 alternated in opposition to A049471, that is, tan(1): [1; 1, 1, 3, 1, 5, 1, 7, 1, 9, 1, ...].

Examples

			1.353389234117675841935...
		

Crossrefs

Programs

  • Mathematica
    N[FromContinuedFraction[Flatten[Table[{1, 2*k}, {k, 1, 100}]]], 100] (* Vaclav Kotesovec, Nov 08 2019 *)

A336238 a(1) = 3; if n>1, and gcd(a(n-1), n) > 1 then a(n) = a(n-1)/gcd(a(n-1), n), otherwise a(n) = a(n-1) + n.

Original entry on oeis.org

3, 5, 8, 2, 7, 13, 20, 5, 14, 7, 18, 3, 16, 8, 23, 39, 56, 28, 47, 67, 88, 4, 27, 9, 34, 17, 44, 11, 40, 4, 35, 67, 100, 50, 10, 5, 42, 21, 7, 47, 88, 44, 87, 131, 176, 88, 135, 45, 94, 47, 98, 49, 102, 17, 72, 9, 3, 61, 120, 2, 63, 125, 188, 47, 112, 56, 123, 191
Offset: 1

Views

Author

Todor Szimeonov, Jul 13 2020

Keywords

Crossrefs

Cf. A093178.

Programs

  • PARI
    a(n) = if (n==1, 3, my(prec=a(n-1)); if (gcd(prec, n) > 1, prec/gcd(prec,n), n+prec)); \\ Michel Marcus, Jul 13 2020
Previous Showing 21-27 of 27 results.