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

A000034 Period 2: repeat [1, 2]; a(n) = 1 + (n mod 2).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Also continued fraction for (sqrt(3)+1)/2 (cf. A040001) and base-3 digital root of n+1 (cf. A007089, A010888). - Henry Bottomley, Jul 05 2001
The sequence 1,-2,-1,2,1,-2,-1,2,... with g.f. (1-2x)/(1+x^2) has a(n) = cos(Pi*n/2)-2*sin(Pi*n/2). - Paul Barry, Oct 18 2004
Hankel transform is [1,-3,0,0,0,0,0,0,0,...]. - Philippe Deléham, Mar 29 2007
4/33 = 0.121212... - Eric Desbiaux, Nov 03 2008
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=A[i,i]:=1, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n-1) = charpoly(A,2). - Milan Janjic, Jan 24 2010
First differences of A032766. - Tom Edgar, Jul 17 2014
Denominator of the harmonic mean of the first n triangular numbers. - Colin Barker, Nov 13 2014
This is the lexicographically earliest sequence of positive integers such that no polynomial of degree d can be fitted to d+2 consecutive terms (equivalently, such that no iterated difference is zero). - Pontus von Brömssen, Dec 26 2021 [See A300002 for the case where not only consecutive terms are considered. - Pontus von Brömssen, Jan 03 2023]
Number of maximum antichains in the power set of {1,2,...,n} partially ordered by set inclusion. For even n, there is a unique maximum antichain formed by all subsets of size n/2; for odd n, there are two maximum antichains, one formed by all subsets of size (n-1)/2 and the other formed by all subsets of size (n+1)/2. See the David Guichard link below for a proof. - Jianing Song, Jun 19 2022

References

  • Jozsef Beck, Combinatorial Games, Cambridge University Press, 2008.
  • J.-M. De Koninck and A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 545 pages 73 and 260, Ellipses, Paris 2004.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. sequences listed in Comments section of A283393.

Programs

Formula

G.f.: (1+2*x)/(1-x^2).
a(n) = 2^((1-(-1)^n)/2) = 2^(ceiling(n/2) - floor(n/2)). - Paul Barry, Jun 03 2003
a(n) = (3-(-1)^n)/2; a(n) = 1 + (n mod 2) = 3-a(n-1) = a(n-2) = a(-n).
a(n) = gcd(n-1, n+1). - Paul Barry, Sep 16 2004
Binomial transform of A123344, inverse binomial transform of A003945. - Philippe Deléham, Jun 04 2007
a(n) = A134451(n+1). - Reinhard Zumkeller, Oct 27 2007
a(n) = if(n=0,1,if(mod(a(n-1),2)=0,a(n-1)/2,(3*a(n-1)+1)/2)). See Collatz conjecture. - Paul Barry, Mar 31 2008
a(n) = 2^n (mod 3). - Vincenzo Librandi, Feb 05 2011
a(n) = A000035(n) + 1. - M. F. Hasler, Jan 13 2012
a(n) = abs(sin(n*Pi/2) - 2*cos(n*Pi/2)). - Mohammad K. Azarian, Mar 12 2012
a(n) = A010704(n) / 3. - Reinhard Zumkeller, Jul 03 2012
a(n) = floor((4/33)*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 03 2013
a(n) = floor((5/8)*3^(n+1)) mod 3. - Hieronymus Fischer, Jan 03 2013
a(n) = floor((n+1)*3/2) - floor((n)*3/2). - Hailey R. Olafson, Jul 23 2014
a(n) = denominator(n/2). - Wesley Ivan Hurt, Sep 11 2014
Dirichlet g.f.: zeta(s)*(1 + 1/2^s). - Mats Granvik, Jul 18 2016
E.g.f.: 2*sinh(x) + cosh(x). - Ilya Gutkovskiy, Jul 18 2016
a(n) = A010693(n) - 1. - Filip Zaludek, Oct 29 2016
a(n) = n + 1 - 2*floor(n/2). - Lorenzo Sauras Altuzarra, Jun 28 2019
Limit_{n->oo} (1/n)*Sum_{k=1..n} a(k) = 3/2 (De Koninck reference). - Bernard Schott, Nov 09 2021

Extensions

Better definition from M. F. Hasler, Jan 13 2012

A213999 Denominators of the triangle of fractions read by rows: pf(n,0) = 1, pf(n,n) = 1/(n+1) and pf(n+1,k) = pf(n,k) + pf(n,k-1) with 0 < k < n; denominators: A213998.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 2, 6, 4, 1, 2, 3, 12, 5, 1, 2, 6, 12, 60, 6, 1, 2, 3, 4, 10, 20, 7, 1, 2, 6, 12, 20, 20, 140, 8, 1, 2, 3, 12, 15, 10, 35, 280, 9, 1, 2, 6, 4, 20, 30, 70, 280, 2520, 10, 1, 2, 3, 12, 10, 12, 21, 56, 252, 2520, 11, 1, 2, 6, 12, 60, 60, 84, 168, 504, 2520, 27720, 12
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 03 2012

Keywords

Comments

T(n,0) = 1;
T(n,1) = A007395(n) for n > 0;
T(n,2) = A010704(n) for n > 1;
T(n,n-3) = A124838(n-2) for n > 2;
T(n,n-2) = A027611(n-1) for n > 1;
T(n,n-1) = A002805(n) for n > 0;
T(n,n) = n + 1;
A003418(n+1) = least common multiple of n-th row;
A214075(n,k) = floor(A213998(n,k) / T(n,k)).

Examples

			See A213998.
		

Programs

  • Haskell
    import Data.Ratio ((%), denominator, Ratio)
    a213999 n k = a213999_tabl !! n !! k
    a213999_row n = a213999_tabl !! n
    a213999_tabl = map (map denominator) $ iterate pf [1] where
       pf row = zipWith (+) ([0] ++ row) (row ++ [-1 % (x * (x + 1))])
                where x = denominator $ last row
  • Mathematica
    T[, 0] = 1; T[n, n_] := 1/(n + 1);
    T[n_, k_] := T[n, k] = T[n - 1, k] + T[n - 1, k - 1];
    Table[T[n, k] // Denominator, {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 10 2021 *)

A040007 Continued fraction for sqrt(11).

Original entry on oeis.org

3, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3
Offset: 0

Views

Author

Keywords

Comments

Eventual period is (3,6). - Zak Seidov, Mar 05 2011
Decimal expansion of 37/110. - R. J. Mathar, Aug 22 2025

Examples

			3.316624790355399849114932736... = 3 + 1/(3 + 1/(6 + 1/(3 + 1/(6 + ...)))). - _Harry J. Smith_, Jun 02 2009
		

References

  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §4.4 Powers and Roots, p. 144.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.

Crossrefs

Programs

  • Maple
    Digits := 100: convert(evalf(sqrt(N)),confrac,90,'cvgts'):
  • Mathematica
    ContinuedFraction[Sqrt[11],300] (* Vladimir Joseph Stephan Orlovsky, Mar 05 2011 *)
    PadRight[{3},120,{6,3}] (* Harvey P. Dale, Jan 18 2025 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 27000); x=contfrac(sqrt(11)); for (n=0, 20000, write("b040007.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 02 2009

Formula

From Stefano Spezia, Jan 18 2025: (Start)
G.f.: 3*(1 + x + x^2)/(1 - x^2).
E.g.f.: 3*(2*cosh(x) + sinh(x) - 1). (End)

A176395 Decimal expansion of 3+sqrt(11).

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Apr 16 2010

Keywords

Comments

Continued fraction expansion of 3+sqrt(11) is A010704 preceded by 6.
a(n) = A010468(n) for n > 1.

Examples

			3+sqrt(11) = 6.31662479035539984911...
		

Crossrefs

Cf. A010468 (decimal expansion of sqrt(11)), A010704 (repeat 3, 6).

Programs

  • Mathematica
    RealDigits[3+Sqrt[11],10,120][[1]] (* Harvey P. Dale, Oct 28 2011 *)

A176105 Decimal expansion of (3+sqrt(11))/2.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Apr 10 2010

Keywords

Comments

Continued fraction expansion of (3+sqrt(11))/2 is A010704.

Examples

			(3+sqrt(11))/2 = 3.15831239517769992455...
		

Crossrefs

Cf. A010468 (decimal expansion of sqrt(11)), A010704 (repeat 3, 6).

Programs

  • Mathematica
    RealDigits[(3+Sqrt[11])/2,10,120][[1]] (* Harvey P. Dale, Apr 16 2013 *)

Formula

Equals 1.5 + A147313. [R. J. Mathar, Apr 12 2010]

A254076 a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n>2, a(0)=-1, a(1)=-2, a(2)=-4.

Original entry on oeis.org

-1, -2, -4, 1, 2, 13, 26, 61, 122, 253, 506, 1021, 2042, 4093, 8186, 16381, 32762, 65533, 131066, 262141, 524282, 1048573, 2097146, 4194301, 8388602, 16777213, 33554426, 67108861, 134217722, 268435453, 536870906, 1073741821, 2147483642, 4294967293
Offset: 0

Views

Author

Paul Curtz, Jan 29 2015

Keywords

Comments

The main diagonal of the difference table is -A000079(n) = -2^n.
a(n) mod 9 is of period 6: repeat 8, 7, 5, 1, 2, 4.
a(n) + a(n+1) = -3, -6, -3, 3, 15, ...; all are multiples of 3.

Crossrefs

Programs

  • Mathematica
    a[0] = -1; a[n_] := 2^(n-1) + 3*Mod[n, 2] - 6; Table[a[n], {n, 0, 33}] (* Jean-François Alcover, Feb 04 2015 *)
  • PARI
    Vec((9*x^3+x^2-1)/((x-1)*(x+1)*(2*x-1)) + O(x^100)) \\ Colin Barker, Jan 30 2015

Formula

a(2n+1) = A141725(n-1), a(2n+2) = 2*a(2n+1).
a(n+1) = 2*a(n) + (period 2: repeat 0, 9), n>0.
a(n) = -A157823(n) - (period 2: repeat 6, 3).
a(n+1) = a(n) - A156067(n).
a(n+2) = a(n) + 3*2^(n-1), n>0.
a(n+4) = a(n) + 15*2^(n-1), n>0.
a(n+6) = a(n) + 63*2^(n-1), n>0.
a(n) = (2^n - 3*(-1)^n - 9)/2 for n>0. - Colin Barker, Jan 30 2015
G.f.: (9*x^3+x^2-1) / ((x-1)*(x+1)*(2*x-1)). - Colin Barker, Jan 30 2015

A114649 Denominators of BernoulliB ranked by frequency of occurrence.

Original entry on oeis.org

6, 30, 42, 66, 510, 138, 798, 2730, 870, 282, 330, 354, 1806, 498, 1590
Offset: 1

Views

Author

Eric W. Weisstein, Dec 21 2005

Keywords

Comments

a(n+1) mod 9 = 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6 which appears to be A010704(n+1). - Paul Curtz, Oct 28 2012

Crossrefs

Extensions

Additional 10 terms from Eric W. Weisstein link, Oct 28 2012

A249693 a(4n) = 3*n+1, a(2n+1) = 3*n+2, a(4n+2) = 3*n.

Original entry on oeis.org

1, 2, 0, 5, 4, 8, 3, 11, 7, 14, 6, 17, 10, 20, 9, 23, 13, 26, 12, 29, 16, 32, 15, 35, 19, 38, 18, 41, 22, 44, 21, 47, 25, 50, 24, 53, 28, 56, 27, 59, 31, 62, 30, 65, 34, 68, 33, 71, 37, 74, 36, 77, 40, 80, 39, 83, 43, 86, 42, 89, 46, 92, 45
Offset: 0

Views

Author

Paul Curtz, Dec 03 2014

Keywords

Comments

A permutation of the nonnegative numbers.

Crossrefs

Programs

  • Magma
    m:=75; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 + 2*x - x^2 + 3*x^3 + 3*x^4 + x^5)/(1 - x^2 - x^4 + x^6))); // G. C. Greubel, Sep 20 2018
  • Mathematica
    a[n_] := (1/8)*(3*(-1)^(n+1)*(n+1)+9*n+10*{1, 0, -1, 0}[[Mod[n, 4]+1]]+1); Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Dec 04 2014, after Robert Israel *)
  • PARI
    x='x+O('x^75); Vec((1 + 2*x - x^2 + 3*x^3 + 3*x^4 + x^5)/(1 - x^2 - x^4 + x^6)) \\ G. C. Greubel, Sep 20 2018
    

Formula

a(n+4) = a(n) + (sequence of period 2: repeat 3, 6).
a(4n+1) = 2*a(4n).
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12).
a(n) is the rank of A061037(n) = -1, -3, 0, 5, ... in A247829(n) = 0, -1, -3, 2, ... .
G.f.: (1 + 2*x - x^2 + 3*x^3 + 3*x^4 + x^5)/(1 - x^2 - x^4 + x^6).
a(n) = (1 + 9*n - 3*(n+1)*(-1)^n + 10*cos(n*Pi/2))/8. - Robert Israel, Dec 03 2014
Showing 1-8 of 8 results.