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

A134667 Period 6: repeat [0, 1, 0, 0, 0, -1].

Original entry on oeis.org

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

Views

Author

Paul Curtz, Jan 26 2008

Keywords

Comments

Dirichlet series for the non-principal character modulo 6: L(s,chi) = Sum_{n>=1} a(n)/n^s. For example L(1,chi) = A093766, L(2,chi) = A214552, and L(3,chi) = Pi^3/(18*sqrt(3)). See Jolley eq. (314) and arXiv:1008.2547 L(m=6,r=2,s). - R. J. Mathar, Jul 31 2010

Examples

			G.f. = x - x^5 + x^7 - x^11 + x^13 - x^17 + x^19 - x^23 + x^25 - x^29 + ...
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1986, page 139, k=6, Chi_2(n).
  • L. B. W. Jolley, Summation of Series, Dover (1961).

Crossrefs

Programs

  • Magma
    &cat[[0, 1, 0, 0, 0, -1]^^20]; // Wesley Ivan Hurt, Jun 20 2016
  • Maple
    A134667:=n->[0, 1, 0, 0, 0, -1][(n mod 6)+1]: seq(A134667(n), n=0..100);
    # Wesley Ivan Hurt, Jun 20 2016
  • Mathematica
    a[ n_] := JacobiSymbol[-12, n]; (* Michael Somos, Apr 24 2014 *)
    a[ n_] := {1, 0, 0, 0, -1, 0}[[Mod[n, 6, 1]]]; (* Michael Somos, Apr 24 2014 *)
    PadRight[{},120,{0,1,0,0,0,-1}] (* Harvey P. Dale, Aug 01 2021 *)
  • PARI
    {a(n) = [0, 1, 0, 0, 0, -1][n%6+1]}; /* Michael Somos, Feb 10 2008 */
    
  • PARI
    {a(n) = kronecker(-12, n)}; /* Michael Somos, Feb 10 2008 */
    
  • PARI
    {a(n) = if( n < 0, -a(-n), if( n<1, 0, direuler(p=2, n, 1 / (1 - kronecker(-12, p) * X))[n]))}; /* Michael Somos, Aug 11 2009 */
    

Formula

Euler transform of length 6 sequence [0, 0, 0, -1, 0, 1]. - Michael Somos, Feb 10 2008
G.f.: x * (1 - x^4) / (1 - x^6) = x*(1+x^2) / (1 + x^2 + x^4) = x*(1+x^2) / ( (1+x+x^2)*(x^2-x+1) ).
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3)) where f(u, v, w) = w * (2 + v - u^2 - 2*v^2) - 2 * u * v. - Michael Somos, Aug 11 2009
a(n) is multiplicative with a(p^e) = 0^e if p = 2 or p = 3, a(p^e) = 1 if p == 1 (mod 6), a(p^e) = (-1)^e if p == 5 (mod 6). - Michael Somos, Aug 11 2009
a(-n) = -a(n). a(n+6) = a(n). a(2*n) = a(3*n) = 0.
sqrt(3)*a(n) = sin(Pi*n/3) + sin(2*Pi*n/3). - R. J. Mathar, Oct 08 2011
a(n) + a(n-2) + a(n-4) = 0 for n>3. - Wesley Ivan Hurt, Jun 20 2016
E.g.f.: 2*sin(sqrt(3)*x/2)*cosh(x/2)/sqrt(3). - Ilya Gutkovskiy, Jun 21 2016

A372102 Number of permutations of [n] whose non-fixed points are not neighbors.

Original entry on oeis.org

1, 1, 1, 2, 4, 9, 19, 45, 107, 278, 728, 2033, 5749, 17105, 51669, 162674, 520524, 1724329, 5807143, 20146861, 71048431, 257139686, 945626800, 3558489633, 13599579817, 53060155137, 210124405097, 847904374466, 3470756061140, 14453943647561, 61023690771451
Offset: 0

Views

Author

Alois P. Heinz, Apr 18 2024

Keywords

Examples

			a(3) = 2: 123, 321.
a(4) = 4: 1234, 1432, 3214, 4231.
a(5) = 9: 12345, 12543, 14325, 15342, 32145, 32541, 42315, 52143, 52341.
a(6) = 19: 123456, 123654, 125436, 126453, 143256, 143652, 153426, 163254, 163452, 321456, 325416, 326451, 423156, 423651, 521436, 523416, 621453, 623154, 623451.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<4, [2$3, 4][n+1],
          3*a(n-1)+(n-2)*a(n-2)+(n-1)*(a(n-4)-a(n-3)))/2
        end:
    seq(a(n), n=0..30);
  • Mathematica
    a[n_] := Sum[Binomial[n + 1 - k, k] * Subfactorial[k], {k, 0, (n + 1)/2}];
    Table[a[n], {n, 0, 30}] (* Peter Luschny, Apr 24 2024 *)

Formula

a(n) = Sum_{j=0..floor((n+1)/2)} A000166(j)*A011973(n+1,j).
a(n) mod 2 = A131735(n+3).
Row sums of A371995(n+1), which are the antidiagonals of A098825. - Peter Luschny, Apr 24 2024
a(n) ~ sqrt(Pi) * exp(sqrt(n/2) - n/2 - 7/8) * n^(n/2 + 1) / 2^((n+3)/2). - Vaclav Kotesovec, Apr 25 2024
Showing 1-2 of 2 results.