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

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

Original entry on oeis.org

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

Views

Author

Michael Somos, Aug 04 2009

Keywords

Examples

			1 - x + x^2 - x^4 + x^5 - x^7 + x^8 - x^10 + x^11 - x^13 + x^14 + ...
		

Crossrefs

A106510(n) = -a(n) unless n=0. Convolution inverse of A117659.
Cf. A102283.

Programs

  • Maple
    1, seq(2*sin(4*Pi*n/3)/sqrt(3), n=1..100); # Ridouane Oudra, Jan 09 2025
  • Mathematica
    Join[{1},LinearRecurrence[{-1, -1},{-1, 1},105]] (* Ray Chandler, Sep 15 2015 *)
  • PARI
    {a(n) = (n==0) + [0, -1, 1][n%3 + 1]}
    
  • PARI
    {a(n) = (n==0) - kronecker(-3, n)}

Formula

Euler transform of length 4 sequence [ -1, 1, 1, -1].
G.f. A(x) satisfies 0 = f(A(x), A(x^2)) where f(u, v) = 2 - v - u * (4 - 2*v - u).
a(3*n) = 0 unless n=0, a(3*n + 1) = -1, a(3*n + 2) = a(0) = 1.
a(-n) = -a(n) unless n=0. a(n+3) = a(n) unless n=0 or n=-3.
G.f.: (1 + x^2) / (1 + x + x^2).
G.f.: A(x) = 1 / (1 + x / (1 + x^2)) = 1 - x / (1 + x / (1 - x / (1 + x))). - Michael Somos, Jan 03 2013
a(n) = A057078(n-2), n>1. - R. J. Mathar, Aug 06 2009
From Ridouane Oudra, Jan 09 2025: (Start)
a(n) = 3*floor((n+1)/3) - n, for n>0.
a(n) = 2*sin(4*Pi*n/3)/sqrt(3), for n>0.
a(n) = - A102283(n), for n>0.
a(n) = - A106510(n), for n>0. (End)

A117656 Number of solutions to x^(k+2)=x^2 mod n for some k>=1.

Original entry on oeis.org

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

Views

Author

Steven Finch, Apr 11 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Product[{p, e} = pe; p^Quotient[e, 2] + (p-1)*p^(e-1), {pe, FactorInteger[n]}]; Array[a, 72] (* Jean-François Alcover, Sep 13 2018, after Andrew Howroyd *)
  • PARI
    a(n)={my(f=factor(n)); prod(i=1, #f~, my(p=f[i,1], e=f[i,2]); p^(e\2) + (p-1)*p^(e-1))} \\ Andrew Howroyd, Jul 17 2018

Formula

Multiplicative with a(p^e) = p^floor(e/2) + (p-1)*p^(e-1) for prime p. - Andrew Howroyd, Jul 17 2018
Sum_{k=1..n} a(k) ~ c*n^2, where c = (1/2) * Product_{p prime} (1 - 1/(p^2*(p^2 + p + 1))) = 0.47717662698737204270... - Amiram Eldar, Sep 08 2020

A117658 Number of solutions to x^(k+1) = x^k mod n for some k >= 1.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 4, 4, 2, 6, 2, 4, 4, 9, 2, 8, 2, 6, 4, 4, 2, 10, 6, 4, 10, 6, 2, 8, 2, 17, 4, 4, 4, 12, 2, 4, 4, 10, 2, 8, 2, 6, 8, 4, 2, 18, 8, 12, 4, 6, 2, 20, 4, 10, 4, 4, 2, 12, 2, 4, 8, 33, 4, 8, 2, 6, 4, 8, 2, 20, 2, 4, 12
Offset: 1

Views

Author

Steven Finch, Apr 11 2006

Keywords

Comments

If n is prime, then the solutions are x = 0, 1, and so a(n) = 2. - Michael B. Porter, Jul 08 2016
The set of solutions is independent of the choice of k. - Michael B. Porter, Jul 08 2016

Examples

			For n = 10, using k = 1, the solutions are x = 0, 1, 5, and 6, so a(10) = 4. - _Michael B. Porter_, Jul 08 2016
		

Crossrefs

Cf. A117659.

Programs

  • Maple
    f:= proc(n) local F,f;
        F:= ifactors(n)[2];
        mul(1 + f[1]^(f[2]-1), f = F)
    end proc:
    map(f, [$1..100]); # Robert Israel, Jul 06 2016
  • Mathematica
    a[n_] := Module[{F, f}, F = FactorInteger[n]; Product[1 + f[[1]]^(f[[2]] - 1), {f, F}]]; a[1] = 1; Array[a, 100] (* Jean-François Alcover, Nov 05 2016, after Robert Israel *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, 1 + f[i,1]^(f[i,2]-1));} \\ Amiram Eldar, Sep 21 2023

Formula

a(n) = Sum_{k=1..n} floor((k^n-k^(n-1))/n)-floor((k^n-k^(n-1)-1)/n). - Anthony Browne, Jul 06 2016
Multiplicative with a(p^e) = 1 + p^(e-1) for primes p. - Robert Israel, Jul 06 2016
Dirichlet g.f.: zeta(s) * zeta(s-1) * Product_{p prime} (1 - 1/p^(s-1) + 1/p^s - 1/p^(2*s)). - Amiram Eldar, Sep 21 2023
Showing 1-3 of 3 results.