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.

A145390 Number of sublattices of index n of a centered rectangular lattice fixed by a reflection.

Original entry on oeis.org

1, 1, 2, 3, 2, 2, 2, 5, 3, 2, 2, 6, 2, 2, 4, 7, 2, 3, 2, 6, 4, 2, 2, 10, 3, 2, 4, 6, 2, 4, 2, 9, 4, 2, 4, 9, 2, 2, 4, 10, 2, 4, 2, 6, 6, 2, 2, 14, 3, 3, 4, 6, 2, 4, 4, 10, 4, 2, 2, 12, 2, 2, 6, 11, 4, 4, 2, 6, 4, 4, 2, 15, 2, 2, 6, 6, 4, 4, 2, 14, 5, 2, 2, 12, 4, 2, 4, 10, 2, 6, 4, 6, 4, 2, 4, 18, 2, 3, 6, 9, 2
Offset: 1

Views

Author

N. J. A. Sloane, Feb 23 2009, Mar 13 2009

Keywords

Comments

a(n) is the Dirichlet convolution of A000012 and A098178. - Domenico (domenicoo(AT)gmail.com), Oct 21 2009

Crossrefs

Cf. A098178, A060594 (primitive sublattices only), A145391.

Programs

  • Maple
    nmax := 100 :
    L := [1,-1,0,2,seq(0,i=1..nmax)] :
    MOBIUSi(%) :
    MOBIUSi(%) ; # R. J. Mathar, Sep 25 2017
  • Mathematica
    m = 101; Drop[ CoefficientList[ Series[ Sum[(1 + Cos[n*Pi/2])*x^n/(1 - x^n), {n, 1, m}], {x, 0, m}], x], 1] (* Jean-François Alcover, Sep 20 2011, after formula *)
    f[p_, e_] := e+1; f[2, e_] := 2*e-1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 27 2023 *)
  • PARI
    t1=direuler(p=2,200,1/(1-X)^2)
    t2=direuler(p=2,2,1-X+2*X^2,200)
    t3=dirmul(t1,t2)

Formula

Dirichlet g.f.: (1-2^(-s) + 2*4^(-s))*zeta^2(s).
G.f.: Sum_n (1 + cos(n*Pi/2)) x^n / (1 - x^n). - Domenico (domenicoo(AT)gmail.com), Oct 21 2009
If 4|n then a(n) = d(n) - d(n/2) + 2*d(n/4); else if 2|n then a(n) = d(n) - d(n/2); else a(n) = d(n); where d(n) is the number of divisors of n. [Rutherford] - Andrey Zabolotskiy, Mar 10 2018
a(n) = Sum_{ m: m^2|n } A060594(n/m^2). - Andrey Zabolotskiy, May 07 2018
Sum_{k=1..n} a(k) ~ n*(log(n) - 1 + 2*gamma - log(2)/2), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Feb 02 2019
Multiplicative with a(2^e) = 2*e-1 and a(p^e) = e+1 for an odd prime p. - Amiram Eldar, Aug 27 2023

Extensions

New name from Andrey Zabolotskiy, Mar 10 2018

A098180 Odd numbers with twice the odd numbers repeated in order between them.

Original entry on oeis.org

1, 2, 2, 3, 5, 6, 6, 7, 9, 10, 10, 11, 13, 14, 14, 15, 17, 18, 18, 19, 21, 22, 22, 23, 25, 26, 26, 27, 29, 30, 30, 31, 33, 34, 34, 35, 37, 38, 38, 39, 41, 42, 42, 43, 45, 46, 46, 47, 49, 50, 50, 51, 53, 54, 54, 55, 57, 58, 58, 59, 61, 62, 62, 63, 65, 66, 66, 67, 69, 70, 70, 71
Offset: 0

Views

Author

Paul Barry, Aug 30 2004

Keywords

Comments

Partial sums of A098178.
Also A042968 with the even terms repeated. - Michel Marcus, Apr 14 2015
Fixed points are [2,3,6,7,10,11,..] = A042964. - Wesley Ivan Hurt, Oct 13 2015

Crossrefs

Programs

  • Magma
    [Floor((2*n+1-(-1)^((n+1)*(n+2)/2))/2): n in [0..80]]; // Vincenzo Librandi, Apr 13 2015
    
  • Maple
    A098180:=n->(2*n+1-(-1)^((n+1)*(n+2)/2))/2: seq(A098180(n), n=0..100); # Wesley Ivan Hurt, Apr 12 2015
  • Mathematica
    Table[(2 n + 1 - (-1)^((n + 1) (n + 2)/2))/2, {n, 0, 40}] (* Wesley Ivan Hurt, Apr 12 2015 *)
  • PARI
    first(n) = Vec((1+x)*(1-x+x^2)/((1-x)^2*(1+x^2)) + O(x^n)) \\ Iain Fox, Oct 17 2018
    
  • PARI
    a(n) = (2*n+1-(-1)^((n+1)*(n+2)/2))/2 \\ Iain Fox, Oct 17 2018

Formula

G.f.: (1+x)(1-x+x^2)/((1-x)^2(1+x^2)).
a(n) = sqrt(2)*sin(Pi*n/2+Pi/4)/2+n+1/2.
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4), n>3.
From Wesley Ivan Hurt, Apr 12 2015, Oct 13 2015: (Start)
a(n) = (2n+1-(-1)^((n+1)*(n+2)/2))/2.
a(n) = n + A002265(n) - A002265(n-2). (End)
E.g.f: (exp(-i*x)*((1+i) + (1-i)*exp(2*i*x) + exp((1+i)*x)*(2+4*x)))/4, where i = sqrt(-1). - Iain Fox, Oct 17 2018

A098179 Expansion of (1-3*x+3*x^2)/(1-5*x+10*x^2-10*x^3+4*x^4).

Original entry on oeis.org

1, 2, 3, 5, 11, 27, 63, 135, 271, 527, 1023, 2015, 4031, 8127, 16383, 32895, 65791, 131327, 262143, 523775, 1047551, 2096127, 4194303, 8390655, 16781311, 33558527, 67108863, 134209535, 268419071, 536854527, 1073741823, 2147516415
Offset: 0

Views

Author

Paul Barry, Aug 30 2004

Keywords

Comments

Partial sums of A038503. Binomial transform of A098178.

Programs

  • Mathematica
    LinearRecurrence[{5,-10,10,-4},{1,2,3,5},40] (* or *) CoefficientList[ Series[(1-3 x+3 x^2)/(1-5 x+10 x^2-10 x^3+4 x^4),{x,0,40}],x] (* Harvey P. Dale, Oct 06 2011 *)

Formula

a(n) = 2^n+2^(n/2)cos(pi*n/4)-1; a(n) = 5a(n-1)-10a(n-2)+10a(n-3)-4a(n-4).

A204040 Triangle T(n,k), read by rows, given by (0, 2, -2, 1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 0, 4, 1, 0, -4, 4, 6, 1, 0, -4, -8, 12, 8, 1, 0, 4, -24, -4, 24, 10, 1, 0, 12, -8, -60, 16, 40, 12, 1, 0, 4, 56, -84, -96, 60, 60, 14, 1, 0, -20, 88, 84, -272, -100, 136, 84, 16, 1, 0, -28, -40
Offset: 0

Views

Author

Philippe Deléham, Jan 27 2012

Keywords

Comments

Antidiagonal sums : periodic sequence 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, ... (see A007877 or A098178).Riordan array (1, x*(1+x)/(1-x+2*x^2)) .

Examples

			Triangle begins :
1
0, 1
0, 2, 1
0, 0, 4, 1
0, -4, 4, 6, 1
0, -4, -8, 12, 8, 1
0, 4, -24, -4, 24, 10, 1
0, 12, -8, -60, 16, 40, 12, 1
0, 4, 56, -84, -96, 60, 60, 14, 1
0, -20, 88, 84, -272, -100, 136, 84, 16, 1
		

Crossrefs

Cf. A005408.

Formula

T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2, k-1) - 2*T(n-2,k).
G.f.: (1-x+2*x^2)/(1-(1+y)*x + (2-y)*x^2).
T(n,n) = n = A000012(n), T(n+1,n) = 2n = A005843(n), T(n+2,n) = A046092(n-1) for n>0, T(n+1,1) = A078050(n)*(-1)^n.
Sum_{k, 0<=k<=n} T(n,k) = A060747(n) = A005408(n-1).

A323202 Expansion of (1 - x) * (1 - x^3) / (1 - x^4) in powers of x.

Original entry on oeis.org

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

Views

Author

Michael Somos, Jan 06 2019

Keywords

Examples

			G.f. = 1 - x - x^3 + 2*x^4 - x^5 - x^7 + 2*x^8 - x^9 - x^11 + ...
		

Crossrefs

Cf. A098178.

Programs

  • Mathematica
    a[ n_] := (-1)^n + If[Mod[n, 2] == 0, (-1)^(n/2), 0] - Boole[n == 0];
    a[ n_] := {-1, 0, -1, 2}[[Mod[n, 4, 1]]] - Boole[n == 0];
    a[ n_] := SeriesCoefficient[ (1 - x) (1 - x^3) / (1 - x^4), {x, 0, Abs@n}];
    LinearRecurrence[{-1,-1,-1},{1,-1,0,-1},80] (* Harvey P. Dale, May 31 2021 *)
  • PARI
    {a(n) = (-1)^n + if(n%2==0, (-1)^(n/2)) - (n==0)};
    
  • PARI
    {a(n) = [2, -1, 0, -1][n%4 + 1] - (n==0)};
    
  • PARI
    {a(n) = n = abs(n); polcoeff( (1 - x) * (1 - x^3) / (1 - x^4) + x * O(x^n), n)};
    
  • PARI
    {a(n) = my(e); n=abs(n); if( n<1, n==0, e=valuation(n, 2); -if( e<2, 1-e, -2))};

Formula

a(n) = -b(n) and b() is multiplicative with b(2) = 0, b(2^e) = -2 if e>1, b(p^e) = 1 if p>2.
Euler transform of length 4 sequence [-1, 0, -1, 1].
Moebius transform is length 4 sequence [-1, 1, 0, 2].
G.f.: (1 - x) * (1 - x^3) / (1 - x^4) = -1 + 1 / (1 + x) + 1 / (1 + x^2).
a(n) = a(-n) for all n in Z. a(n+2) = a(n-2) except if n=2 or n=-2.
a(n) = (-1)^n * A098178(n), a(2*n + 1) = -1, a(4*n + 2) = 0 for all n in Z.
E.g.f.: cos(x) + exp(-x) - 1. - Stefano Spezia, Aug 04 2025
Showing 1-5 of 5 results.