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

A364390 Triangle T(n, k) based on A176040 which read by rows yields a permutation of the positive integers.

Original entry on oeis.org

1, 3, 2, 8, 7, 4, 10, 9, 6, 5, 19, 18, 15, 14, 11, 21, 20, 17, 16, 13, 12, 34, 33, 30, 29, 26, 25, 22, 36, 35, 32, 31, 28, 27, 24, 23, 53, 52, 49, 48, 45, 44, 41, 40, 37, 55, 54, 51, 50, 47, 46, 43, 42, 39, 38, 76, 75, 72, 71, 68, 67, 64, 63, 60, 59, 56, 78, 77, 74, 73, 70, 69, 66, 65, 62, 61, 58, 57
Offset: 1

Views

Author

Werner Schulte, Jul 21 2023

Keywords

Examples

			Triangle T(n, k) for 1 <= k <= n begins:
n\k:    1    2    3    4    5    6    7    8    9   10   11   12   13   14
==========================================================================
01 :    1
02 :    3    2
03 :    8    7    4
04 :   10    9    6    5
05 :   19   18   15   14   11
06 :   21   20   17   16   13   12
07 :   34   33   30   29   26   25   22
08 :   36   35   32   31   28   27   24   23
09 :   53   52   49   48   45   44   41   40   37
10 :   55   54   51   50   47   46   43   42   39   38
11 :   76   75   72   71   68   67   64   63   60   59   56
12 :   78   77   74   73   70   69   66   65   62   61   58   57
13 :  103  102   99   98   95   94   91   90   87   86   83   82   79
14 :  105  104  101  100   97   96   93   92   89   88   85   84   81   80
etc.
		

Crossrefs

Programs

  • PARI
    T(n,k) = n*(n+1)/2 + (n-1)*(n%2) - 2*k + 3 - (k%2)

Formula

T(n, k) = n*(n+1)/2 + (n-1)*(n mod 2) - 2*k + 3 - (k mod 2) for 1 <= k <= n.
T(n, 1) = n*(n+1)/2 + (n-1)*(n mod 2) for n > 0.
T(2*n, 1) = A000217(2*n) for n > 0.
T(n, k) - T(n, k+1) = A176040(k) for k > 0.
T(n, k) = T(n-1, k) + T(n, k-1) - T(n-1, k-1) for 1 < k < n.
T(2*n, k) - T(2*n-1, k) = 2 for 1 <= k < 2*n.
Row sums: A006003(n) - (-1)^n * 2 * floor((n-1)/2) * (1 + floor((n-1)/2)) for n > 0. - Werner Schulte, Dec 03 2023

A040001 1 followed by {1, 2} repeated.

Original entry on oeis.org

1, 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

Continued fraction for sqrt(3).
Also coefficient of the highest power of q in the expansion of the polynomial nu(n) defined by: nu(0)=1, nu(1)=b and for n>=2, nu(n)=b*nu(n-1)+lambda*(n-1)_q*nu(n-2) with (b,lambda)=(1,1), where (n)_q=(1+q+...+q^(n-1)) and q is a root of unity. - Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 21 2002
nu(0)=1 nu(1)=1; nu(2)=2; nu(3)=3+q; nu(4)=5+3q+2q^2; nu(5)=8+7q+6q^2+4q^3+q^4; nu(6)=13+15q+16q^2+14q^3+11q^4+5q^5+2q^6.
From Jaroslav Krizek, May 28 2010: (Start)
a(n) = denominators of arithmetic means of the first n positive integers for n >= 1.
See A026741(n+1) or A145051(n) - denominators of arithmetic means of the first n positive integers. (End)
From R. J. Mathar, Feb 16 2011: (Start)
This is a prototype of multiplicative sequences defined by a(p^e)=1 for odd primes p, and a(2^e)=c with some constant c, here c=2. They have Dirichlet generating functions (1+(c-1)/2^s)*zeta(s).
Examples are A153284, A176040 (c=3), A040005 (c=4), A021070, A176260 (c=5), A040011, A176355 (c=6), A176415 (c=7), A040019, A021059 (c=8), A040029 (c=10), A040041 (c=12). (End)
a(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = A000325(k) for k = 0, 1, ..., n. - Michael Somos, May 12 2012
For n > 0: denominators of row sums of the triangular enumeration of rational numbers A226314(n,k) / A054531(n,k), 1 <= k <= n; see A226555 for numerators. - Reinhard Zumkeller, Jun 10 2013
From Jianing Song, Nov 01 2022: (Start)
For n > 0, a(n) is the minimal gap of distinct numbers coprime to n. Proof: denote the minimal gap by b(n). For odd n we have A058026(n) > 0, hence b(n) = 1. For even n, since 1 and -1 are both coprime to n we have b(n) <= 2, and that b(n) >= 2 is obvious.
The maximal gap is given by A048669. (End)

Examples

			1.732050807568877293527446341... = 1 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + ...))))
G.f. = 1 + x + 2*x^2 + x^3 + 2*x^4 + x^5 + 2*x^6 + x^7 + 2*x^8 + x^9 + ...
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 186.
  • 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

Cf. A000034, A002194, A133566, A083329 (binomial Transf).
Apart from a(0) the same as A134451.

Programs

  • Haskell
    a040001 0 = 1; a040001 n = 2 - mod n 2
    a040001_list = 1 : cycle [1, 2]  -- Reinhard Zumkeller, Apr 16 2015
  • Maple
    Digits := 100: convert(evalf(sqrt(N)),confrac,90,'cvgts'):
  • Mathematica
    ContinuedFraction[Sqrt[3],300] (* Vladimir Joseph Stephan Orlovsky, Mar 04 2011 *)
    PadRight[{1},120,{2,1}] (* Harvey P. Dale, Nov 26 2015 *)
  • PARI
    {a(n) = 2 - (n==0) - (n%2)} /* Michael Somos, Jun 11 2003 */
    
  • PARI
    { allocatemem(932245000); default(realprecision, 12000); x=contfrac(sqrt(3)); for (n=0, 20000, write("b040001.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 01 2009
    

Formula

Multiplicative with a(p^e) = 2 if p even; 1 if p odd. - David W. Wilson, Aug 01 2001
G.f.: (1 + x + x^2) / (1 - x^2). E.g.f.: (3*exp(x)-2*exp(0)+exp(-x))/2. - Paul Barry, Apr 27 2003
a(n) = (3-2*0^n +(-1)^n)/2. a(-n)=a(n). a(2n+1)=1, a(2n)=2, n nonzero.
a(n) = sum{k=0..n, F(n-k+1)*(-2+(1+(-1)^k)/2+C(2, k)+0^k)}. - Paul Barry, Jun 22 2007
Row sums of triangle A133566. - Gary W. Adamson, Sep 16 2007
Euler transform of length 3 sequence [ 1, 1, -1]. - Michael Somos, Aug 04 2009
Moebius transform is length 2 sequence [ 1, 1]. - Michael Somos, Aug 04 2009
a(n) = sign(n) + ((n+1) mod 2) = 1 + sign(n) - (n mod 2). - Wesley Ivan Hurt, Dec 13 2013

A084101 Expansion of (1+x)^2/((1-x)*(1+x^2)).

Original entry on oeis.org

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

Views

Author

Paul Barry, May 15 2003

Keywords

Comments

Partial sums of A084099. Inverse binomial transform of A000749 (without leading zeros).
From Klaus Brockhaus, May 31 2010: (Start)
Periodic sequence: Repeat 1, 3, 3, 1.
Interleaving of A010684 and A176040.
Continued fraction expansion of (7 + 5*sqrt(29))/26.
Decimal expansion of 121/909.
a(n) = A143432(n+3) + 1 = 2*A021913(n+1) + 1 = 2*A133872(n+3) + 1.
a(n) = A165207(n+1) - 1.
First differences of A047538.
Binomial transform of A084102. (End)
From Wolfdieter Lang, Feb 09 2012: (Start)
a(n) = A045572(n+1) (Modd 5) := A203571(A045572(n+1)), n >= 0.
For general Modd n (not to be confused with mod n) see a comment on A203571. The nonnegative members of the five residue classes Modd 5, called [m] for m=0,1,...,4, are shown in the array A090298 if there the last row is taken as class [0] after inclusion of 0.
(End)

Examples

			From _Wolfdieter Lang_, Feb 09 2012: (Start)
Modd 5 of nonnegative odd numbers restricted mod 5:
A045572: 1, 3, 7, 9, 11, 13, 17, 19, 21, 23, ...
Modd 5:  1, 3, 3, 1,  1,  3,  3,  1,  1,  3, ...
(End)
		

Crossrefs

Cf. A084102.
Cf. A010684 (repeat 1, 3), A176040 (repeat 3, 1), A178593 (decimal expansion of (7+5*sqrt(29))/26), A143432 (expansion of (1+x^4)/((1-x)*(1+x^2))), A021913 (repeat 0, 0, 1, 1), A133872 (repeat 1, 1, 0, 0), A165207 (repeat 2, 2, 4, 4), A047538 (congruent to 0, 1, 4 or 7 mod 8), A084099 (expansion of (1+x)^2/(1+x^2)), A000749 (expansion of x^3/((1-x)^4-x^4)). - Klaus Brockhaus, May 31 2010

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 100); Coefficients(R!( (1+x)^2/((1-x)*(1+x^2)) )); // G. C. Greubel, Feb 28 2019
    
  • Mathematica
    CoefficientList[Series[(1+x)^2/((1-x)(1+x^2)),{x,0,110}],x] (* or *) PadRight[{},110,{1,3,3,1}] (* Harvey P. Dale, Nov 21 2012 *)
  • PARI
    x='x+O('x^100); Vec((1+x)^2/((1-x)*(1+x^2))) \\ Altug Alkan, Dec 24 2015
    
  • Sage
    ((1+x)^2/((1-x)*(1+x^2))).series(x, 100).coefficients(x, sparse=False) # G. C. Greubel, Feb 28 2019

Formula

a(n) = binomial(3, n mod 4). - Paul Barry, May 25 2003
From Klaus Brockhaus, May 31 2010: (Start)
a(n) = a(n-4) for n > 3; a(0) = a(3) = 1, a(1) = a(2) = 3.
a(n) = (4 - (1+i)*i^n - (1-i)*(-i)^n)/2 where i = sqrt(-1). (End)
E.g.f.: 2*exp(x) + sin(x) - cos(x). - Arkadiusz Wesolowski, Nov 04 2017
a(n) = 2 - (-1)^(n*(n+1)/2). - Guenther Schrack, Feb 26 2019

A037852 Number of normal subgroups of dihedral group with 2n elements.

Original entry on oeis.org

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

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 04 2001

Keywords

Comments

When n is an odd prime a(n) = 3.
Write D_{2n} as , then the subgroups are of the form for d|n or for d|n and 0 <= r < d. The normal subgroups are for d|n and for d|gcd(n,2) and 0 <= r < d. There are d(n) normal subgroups of the first type and sigma(gcd(n,2)) normal subgroups of the second type. - Jianing Song, Jul 21 2022

Examples

			a(4) = 6 since D_8 = <a, x | a^4 = x^2 = 1, x*a*x = a^(-1)> has 6 normal subgroups: {e}, {e,a^2}, {e,a,a^2,a^3}, {e,a^2,x,a^2*x}, {e,a^2,a*x,a^3*x} and D_8. The 4 subgroups {e,x}, {e,a*x}, {e,a^2*x} and {e,a^3*x} are not normal. - _Jianing Song_, Jul 21 2022
		

Crossrefs

Programs

  • PARI
    a(n) = numdiv(n) + 2 + (-1)^n \\ Michel Marcus, Jul 30 2013

Formula

a(n) = d(n) + 2 + (-1)^n. - Paul Boddington, Feb 02 2004
a(n) = A000005(n) + A176040(n). - Michel Marcus, Aug 19 2015

Extensions

More terms from Michel Marcus, Jul 30 2013

A216243 Partial sums of the squares of Lucas numbers (A000032).

Original entry on oeis.org

4, 5, 14, 30, 79, 200, 524, 1365, 3574, 9350, 24479, 64080, 167764, 439205, 1149854, 3010350, 7881199, 20633240, 54018524, 141422325, 370248454, 969323030, 2537720639, 6643838880, 17393796004, 45537549125, 119218851374, 312119004990, 817138163599, 2139295485800
Offset: 0

Views

Author

R. J. Mathar, Mar 14 2013

Keywords

Crossrefs

Cf. A001654.

Programs

  • Maple
    A001254 := proc(n)
            A000032(n)^2 ;
    end proc;
    A := proc(n)
            add( A001254(i),i=0..n) ;
    end proc:
  • Mathematica
    Accumulate[LucasL[Range[0,30]]^2] (* or *) LinearRecurrence[{3,0,-3,1},{4,5,14,30},30] (* Harvey P. Dale, Oct 13 2019 *)

Formula

a(n) = Sum_{i=0..n} A001254(i) = A002878(n) +A176040(n) = A215602(n)+2.
G.f.: ( -4+7*x+x^2 ) / ( (x-1)*(1+x)*(x^2-3*x+1) ).
a(n) = -7*A064831(n) -A064831(n-1) +4*A064831(n+1).
a(n) = L(2*n+1) + 2 + (-1)^n, for L(n) the Lucas sequence A000032(n). - Greg Dresden, Jan 26 2021

A200439 Decimal expansion of constant arising in clubbed binomial approximation for the lightbulb process.

Original entry on oeis.org

2, 7, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3
Offset: 1

Views

Author

Jonathan Vos Post, Nov 17 2011

Keywords

Comments

In the so-called lightbulb process, on days r = 1, ..., n, out of n lightbulbs, all initially off, exactly r bulbs selected uniformly and independent of the past have their status changed from off to on, or vice versa. With W_n the number of bulbs on at the terminal time n and C_n a suitable clubbed binomial distribution, d_{TV}(W_n,C_n) <= 2.7314 sqrt{n} e^{-(n+1)/3} for all n >= 1.
This is the value of the function g_1(9) after eq (16) of the preprint.

Examples

			2.731313... = 1352/495.
		

Crossrefs

Essentially the same as A176040, A153284 and A010684.

Programs

Extensions

Corrected by R. J. Mathar, Nov 29 2011
Showing 1-6 of 6 results.