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.

A171834 Partial sums of numbers congruent to {0, 1, 2, 7} mod 8 (A047527).

Original entry on oeis.org

1, 3, 10, 18, 27, 37, 52, 68, 85, 103, 126, 150, 175, 201, 232, 264, 297, 331, 370, 410, 451, 493, 540, 588, 637, 687, 742, 798, 855, 913, 976, 1040, 1105, 1171, 1242, 1314, 1387, 1461, 1540, 1620, 1701, 1783, 1870, 1958, 2047, 2137, 2232, 2328, 2425, 2523
Offset: 1

Views

Author

Jaroslav Krizek, Dec 19 2009

Keywords

Crossrefs

Cf. A047527.

Programs

  • Magma
    C := ComplexField(); [Round((4*n^2 +2*n -3 +2*(1 +(-1)^n)*I^n -(-1)^n)/4): n in [1..100]]; // G. C. Greubel, Sep 04 2018
  • Mathematica
    Accumulate[Select[Range[120],MemberQ[{0,1,2,7},Mod[#,8]]&]]  (* Harvey P. Dale, Mar 08 2011 *)
    Table[(4*n^2 +2*n -3 +2*(1 +(-1)^n)*I^n -(-1)^n)/4, {n, 1, 100}] (* G. C. Greubel, Sep 04 2018 *)
  • PARI
    vector(100, n, (4*n^2 +2*n -3 +2*(1 +(-1)^n)*I^n -(-1)^n)/4) \\ G. C. Greubel, Sep 04 2018
    
  • PARI
    x='x+O('x^99); Vec(x*(1+x+5*x^2+x^3)/((1-x)^2*(1-x^4))) \\ Altug Alkan, Sep 05 2018
    

Formula

a(n) = Sum_{i=1..n} A047527(i).
From G. C. Greubel, Sep 04 2018: (Start)
a(n) = (4*n^2 + 2*n - 3 + 2*(1 + (-1)^n)*I^n - (-1)^n)/4, where I = sqrt(-1).
G.f.: x*(1+x+5*x^2+x^3)/((1-x)^2*(1-x^4)).
E.g.f.: (2*cos(x) +(2*x^2 +3*x -1)*sinh(x) +(2*x^2 +3*x -2)*cosh(x))/2. (End)

A103127 Numbers congruent to {-1, 1, 3, 5} mod 16.

Original entry on oeis.org

1, 3, 5, 15, 17, 19, 21, 31, 33, 35, 37, 47, 49, 51, 53, 63, 65, 67, 69, 79, 81, 83, 85, 95, 97, 99, 101, 111, 113, 115, 117, 127, 129, 131, 133, 143, 145, 147, 149, 159, 161, 163, 165, 175, 177, 179, 181, 191, 193, 195, 197, 207, 209, 211, 213, 223, 225, 227, 229, 239, 241
Offset: 1

Author

N. J. A. Sloane, Mar 25 2005

Keywords

Comments

Agrees with A103192 for the first 511 terms, but then diverges (see comment in A103192). - Bruno Berselli, Dec 01 2016

Crossrefs

Programs

  • Haskell
    a103127 n = a103127_list !! (n-1)
    a103127_list = [x | x <- [1..], x `mod` 16 `elem` [1,3,5,15]]
    -- Reinhard Zumkeller, Jul 21 2012
  • Mathematica
    Select[Range[300],MemberQ[{1,3,5,15},Mod[#,16]]&] (* Harvey P. Dale, Aug 10 2019 *)

Formula

a(n) = 2*A047527(n) + 1.
From R. J. Mathar, Aug 30 2008: (Start)
O.g.f.: x*(1 + 2*x + 2*x^2 + 10*x^3 + x^4)/((1 - x)^2*(1 + x)*(1 + x^2)).
a(n) = a(n-4) + 16. (End)
a(n) = 2*A047476(n+1) - 1. - Philippe Deléham, Dec 01 2016
Showing 1-2 of 2 results.