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.

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

Original entry on oeis.org

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

Views

Author

Paul Curtz, Aug 26 2007

Keywords

Comments

Also: partial sums of A092220 shifted by two indices. - R. J. Mathar, Feb 08 2008
From Paul Curtz, Jun 05 2011: (Start)
The square array of this sequence in the top row and further rows defined as first differences of preceding rows starts (see A167613):
. 0, 0, 1, 0, 0, -1, ...
. 0, 1, -1, 0, -1, 1, ... = A092220,
. 1, -2, 1, -1, 2, -1, ... = A131556,
. -3, 3, -2, 3, -3 2, ...
. 6, -5, 5, -6, 5, -5, ...
. -11, 10, -11, 11, -10, 11, ...
. 21, -21, 22, -21, 21, -22, ...
. -42, 43, -43, 42, -43, 43, ...
The main diagonal in this array is A001045; the first superdiagonal is the negated elements of A001045, the second superdiagonal is A078008.
The left column of the array is basically the inverse binomial transform, (-1)^n * A024495(n), assuming offset 0.
The second column of the array is A131708 with alternating signs, and the third column is A024493 with alternating signs (both assuming offset 0). (End)

Crossrefs

Programs

Formula

G.f.: x^3/(x+1)/(x^2-x+1). - R. J. Mathar, Nov 14 2007
a(n) = (-A057079(n+1) - (-1)^n)/3. - R. J. Mathar, Jun 13 2011
a(n) = -cos(Pi*(n-1)/3)/3 + sin(Pi*(n-1)/3)/sqrt(3) - (-1)^n/3. - R. J. Mathar, Oct 08 2011
a(n) = ( (-1)^n - (-1)^floor((n+2)/3) )/2. - Bruno Berselli, Jul 09 2013
a(n) + a(n-3) = 0 for n > 3. - Wesley Ivan Hurt, Jun 20 2016

Extensions

Edited by N. J. A. Sloane, Sep 15 2007

A180416 Number of positive integers below 10^n, excluding perfect squares, which have a representation as a sum of 2 positive squares.

Original entry on oeis.org

3, 33, 298, 2649, 23711, 215341, 1982296, 18447847, 173197435, 1637524156, 15570196516, 148735628858, 1426303768587, 13722207893214, 132387231596281, 1280309591127436
Offset: 1

Views

Author

Martin Renner, Jan 19 2011

Keywords

Comments

Numbers that can be represented as a sum of three or more positive squares but not as a sum of two positive squares (e.g., 3=1^2+1^2+1^2 or 6=1^2+1^2+2^2) are not counted. Numbers that can be represented as a sum of two positive squares and alternatively as a sum of three or more positive squares are counted (e.g., 18 = 9+9 = 1+1+16, 26, 41, ...).

Crossrefs

Programs

  • Maple
    isA000415 := proc(n) local x ,y2; if issqr(n) then false; else for x from 1 do y2 := n-x^2 ; if y2 < x^2 then return false; elif issqr(y2) then return true; end if; end do ; end if; end proc:
    A180416 := proc(n) a := 0 ; for k from 2 to 10^n-1 do if isA000415(k) then a := a+1 ; end if; end do: a ; end proc:
    for n from 1 do print(A180416(n)) ; end do; # R. J. Mathar, Jan 20 2011
  • Mathematica
    a[n_] := a[n] = Module[{k, xMax = Floor[Sqrt[10^n - 1]]}, Table[k = x^2 + y^2; If[IntegerQ[Sqrt[k]], Nothing, k], {x, 1, xMax}, {y, x, Floor[ Sqrt[10^n - 1 - x^2]]}] // Flatten // Union // Length];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 8}] (* Jean-François Alcover, Oct 31 2020 *)

Formula

a(n) = |{ 0A000415} }|.
a(n) = |{ 0A000404} \ {A000290}) }|.
a(n) = A002283(n) - A049416(n) - A167615(n) - A180425(n).

Extensions

a(6)-a(8) from Alois P. Heinz, Jan 20 2011
a(9)-a(10) from Donovan Johnson, Feb 04 2011
a(10) corrected and a(11)-a(16) from Hiroaki Yamanouchi, Jul 13 2014

A167617 G.f.: x^2*(3+3*x+x^2) / ( (2*x+1) * (1+x) * (1+x+x^2) * (x^2-x+1) ) .

Original entry on oeis.org

0, 0, 3, -6, 10, -21, 42, -84, 171, -342, 682, -1365, 2730, -5460, 10923, -21846, 43690, -87381, 174762, -349524, 699051, -1398102, 2796202, -5592405, 11184810, -22369620, 44739243, -89478486, 178956970, -357913941, 715827882, -1431655764, 2863311531
Offset: 0

Views

Author

Paul Curtz, Nov 07 2009

Keywords

Comments

The derived sequence a(n+1) + 2*a(n) reads 0,3,0,-2,-1,0 (and repeat with period 6).

Crossrefs

Cf. A167613.

Programs

  • Mathematica
    CoefficientList[Series[x^2(3+3x+x^2)/((2x+1)(1+x)(1+x+x^2)(x^2-x+1)), {x,0,40}],x] (* or *) LinearRecurrence[{-3,-3,-3,-3,-3,-2},{0,0,3,-6,10,-21},40] (* Harvey P. Dale, Sep 08 2011 *)

Formula

a(3*k+2) + a(3*k+3) + a(3*k+4) = (-1)^(k+1)*A024088(k+1).
a(n) = (-1)^n*A024495(n+1) + A131531(n+1).
a(n) = -3*a(n-1) -3*a(n-2) -3*a(n-3) -3*a(n-4) -3*a(n-5) -2*a(n-6).

Extensions

Edited and extended by R. J. Mathar, Nov 12 2009
Showing 1-3 of 3 results.