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

A327767 Period 2: repeat [1, -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
Offset: 1

Views

Author

Michael Somos, Sep 24 2019

Keywords

Examples

			G.f. = x - 2*x^2 + x^3 - 2*x^4 + x^5 - 2*x^6 + x^7 - 2*x^8 + ...
		

Crossrefs

Programs

  • Magma
    &cat [[1, -2]^^50]; // Vincenzo Librandi, Feb 29 2020
  • Mathematica
    a[ n_] := If[ n < 1, 0, -2 + 3 Mod[n, 2]];
    a[ n_] := Which[ n < 1, 0, OddQ[n], 1, True, -2];
    a[ n_] := SeriesCoefficient[ (x - 2*x^2) / (1 - x^2), {x, 0, n}];
    PadRight[{}, 100, {1, -2}] (* Vincenzo Librandi, Feb 29 2020 *)
  • PARI
    {a(n) = if( n<1, 0, -(1 + 3*(-1)^n)/2)};
    
  • PARI
    {a(n) = if( n<1, 0, -2 + 3*(n%2))};
    
  • PARI
    {a(n) = if( n<1, 0, [-2, 1][n%2 + 1])};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (x - 2*x^2) / (1 - x^2) + x * O(x^n), n))};
    

Formula

G.f.: x * (1 - 2*x) / (1 - x^2) = x / (1 + 2*x / (1 - 3*x / (2 - x))).
E.g.f.: (exp(x) - 1)*(3/exp(x) - 1)/2.
a(n) is multiplicative with a(2^e) = -2 if e>0, a(p^e) = 1 otherwise.
Moebius transform is length 2 sequence [1, -3].
a(n) = -(1 + 3*(-1)^n)/2 if n>=1.
a(2*n) = -2, a(2*n + 1) = 1, a(0) = 0.
a(n) = -(-1)^n * A134451(n) for all n in Z.
a(n) = a(n+2) = -(-1)^n * A000034(n-1) = -A168361(n+1) for n>=1.
Dirichlet g.f.: zeta(s)*(1-3/2^s). - Amiram Eldar, Jan 03 2023

A255175 Expansion of phi(-x) / (1 - x)^2 in powers of x where phi() is a Ramanujan theta function.

Original entry on oeis.org

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

Views

Author

Michael Somos, Feb 16 2015

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 - x^2 - 2*x^3 - x^4 + x^6 + 2*x^7 + 3*x^8 + 2*x^9 + x^10 - x^12 + ...
		

Crossrefs

Cf. A053615, A134451, A196199, A329116 (essentially the same), A339265 (first differences).

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 4, 0, x] / (1 - x)^2, {x, 0, n}];
    a[ n_] := SeriesCoefficient[ Product[ (1 - x^k)^(Mod[k, 2] + 1), {k, 2, n}], {x, 0, n}];
    a[ n_] := If[ n < 0, 0, With[{m = Floor[ Sqrt[ n + 1]]}, (-1)^m (n + 1 - m - m^2)]];
    Table[Sum[(-1)^(Floor[Sqrt[i]]), {i,0,n}], {n,0,50}] (* G. C. Greubel, Dec 22 2016 *)
  • PARI
    {a(n) = my(m); if( n<0, 0, m = sqrtint(n + 1); (-1)^m * (n + 1 - m - m^2))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( prod(k=2, n, (1 - x^k)^(k%2+1), 1 + x * O(x^n)), n))};
    
  • Python
    from math import isqrt
    def A255175(n): return ((1+(t:=isqrt(n)))*t-n-1)*(1 if t&1 else -1) # Chai Wah Wu, Aug 04 2022

Formula

G.f.: Product_{k>0} (1 - x^(2*k)) * (1 - x^(2*k+1))^2.
A053615(n) = abs(A196199(n)) = abs(a(n-1)).
Euler transform of -A134451.
a(n) = Sum_{i=0..n}( (-1)^(floor(sqrt(i))) ). - John M. Campbell, Dec 22 2016

A382489 The number of unitary 5-smooth divisors of n.

Original entry on oeis.org

1, 2, 2, 2, 2, 4, 1, 2, 2, 4, 1, 4, 1, 2, 4, 2, 1, 4, 1, 4, 2, 2, 1, 4, 2, 2, 2, 2, 1, 8, 1, 2, 2, 2, 2, 4, 1, 2, 2, 4, 1, 4, 1, 2, 4, 2, 1, 4, 1, 4, 2, 2, 1, 4, 2, 2, 2, 2, 1, 8, 1, 2, 2, 2, 2, 4, 1, 2, 2, 4, 1, 4, 1, 2, 4, 2, 1, 4, 1, 4, 2, 2, 1, 4, 2, 2, 2
Offset: 1

Views

Author

Amiram Eldar, Mar 29 2025

Keywords

Comments

Period 30: repeat [1, 2, 2, 2, 2, 4, 1, 2, 2, 4, 1, 4, 1, 2, 4, 2, 1, 4, 1, 4, 2, 2, 1, 4, 2, 2, 2, 2, 1, 8].
In general, the sequence of the number of unitary prime(k)-smooth divisors of n, for k >= 1, is periodic with period A002110(k).
Decimal expansion of 135804580460138015713571358020/111111111111111111111111111111.
Continued fraction expansion of 808690/(525316 + sqrt(382161348866)) (with offset 0).

Crossrefs

The number of unitary prime(k)-smooth divisors of n: A134451 (k = 1), A382488 (k = 2), this sequence (k = 3).

Programs

  • Mathematica
    a[n_] := Product[If[Divisible[n, p], 2, 1], {p, {2, 3, 5}}]; Array[a, 100]
  • PARI
    a(n) = vecprod(apply(x -> !((n % 30) % x) + 1, [2, 3, 5]))

Formula

Multiplicative with a(p^e) = 2 if p <= 5, and 1 otherwise.
a(n) = A034444(A355582(n)).
a(n) = A034444(n) if and only if n is 5-smooth (A051037).
a(n) = A355583(n) if and only if n is squarefree (A005117).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 12/5.
In general, the asymptotic mean of the number of unitary prime(k)-smooth divisors of n is A054640(k)/A002110(k) = A236435(k)/A236436(k).
Dirichlet g.f.: (1 + 1/2^s) * (1 + 1/3^s) * (1 + 1/5^s) * zeta(s).
In general, Dirichlet g.f. of the number of unitary prime(k)-smooth divisors of n is zeta(s) * Product_{p prime <= prime(k)} (1 + 1/p^s).
Previous Showing 21-23 of 23 results.