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.

A116966 a(n) = n + {1,2,0,1} according as n == {0,1,2,3} mod 4.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 31 2006

Keywords

Comments

In each group of four consecutive numbers, swap 2nd and 3rd terms. - Zak Seidov, Mar 31 2006
First differences of A089781. - Reinhard Zumkeller, Aug 15 2015
From Guenther Schrack, May 31 2017: (Start)
Permutation of the positive integers partitioned into quadruples [4k+1,4k+3,4k+2,4k+4].
Partial sums: A116996. (End)

Crossrefs

Programs

  • Haskell
    a116966 n = a116966_list !! n
    a116966_list = zipWith (+) [0..] $ drop 2 a140081_list
    -- Reinhard Zumkeller, Aug 15 2015
  • Magma
    /* By definition: */ [ n + [1,2,0,1][1+(n mod 4)]: n in [0..70] ]; // Bruno Berselli, Nov 25 2012
    
  • Maple
    f:=proc(i) if i mod 4 = 0 then i+1 elif i mod 4 = 1 then i+2 elif i mod 4 = 2 then i else i+1; fi; end;
  • Mathematica
    b := {1, 2, 0, 1}; a[n_] := n + b[[1 + Mod[n, 4]]]; Table[a[n], {n, 0, 60}] (* Stefan Steinerberger, Mar 31 2006 *)
    CoefficientList[Series[(2 x^3 - x^2 + 2 x + 1) / ((x - 1)^2 (x + 1) (x^2 + 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 19 2013 *)
  • Maxima
    makelist(n+1+(%i^(n*(n-1))-(-1)^n)/2, n, 0, 70); /* Bruno Berselli, Nov 25 2012 */
    
  • PARI
    Vec((2*x^3-x^2+2*x+1) / ((x-1)^2*(x+1)*(x^2+1)) + O(x^66) ) \\ Joerg Arndt, Apr 30 2013
    

Formula

a(n) = n+1+(i^(n(n-1))-(-1)^n)/2, where i=sqrt(-1). - Bruno Berselli, Nov 25 2012
G.f.: (2*x^3-x^2+2*x+1) / ((x-1)^2*(x+1)*(x^2+1)). - Colin Barker, Apr 30 2013
a(n) = A140081(n+2) + n. - Reinhard Zumkeller, Aug 15 2015
From Guenther Schrack, May 31 2017: (Start)
a(n) = n + 1 + ((-1)^(n*(n-1)/2) - (-1)^n)/2.
a(n) = a(n-4) + 4, n > 3.
a(n) = a(n-1) + a(n-4) - a(n-5), n > 4. (End)
Sum_{n>=0} (-1)^n/a(n) = Pi/4 + log(2)/2. - Amiram Eldar, Jan 31 2023

A111244 Partial sums of A084385.

Original entry on oeis.org

1, 3, 7, 10, 17, 22, 31, 37, 45, 56, 69, 79, 91, 106, 123, 137, 153, 172, 193, 211, 231, 254, 279, 301, 325, 352, 381, 407, 435, 466, 499, 529, 561, 596, 633, 667, 703, 742, 783, 821, 861, 904, 949, 991, 1035, 1082, 1131, 1177, 1225, 1276, 1329, 1379, 1431, 1486, 1543
Offset: 1

Views

Author

N. J. A. Sloane, Oct 31 2005

Keywords

Comments

a(n+1) = a(n) + (smallest number coprime with a(n) and not already added). - Reinhard Zumkeller, Aug 15 2015

Crossrefs

Programs

  • Haskell
    a111244 n = a111244_list !! (n-1)
    a111244_list = scanl1 (+) a084385_list
    -- Reinhard Zumkeller, Aug 15 2015

A132425 a(1)=1. a(2)=2. For n >= 3, a(n) is the smallest integer which is > a(n-1), is not coprime to a(n-1) and is such that a(n)-a(n-1) does not equal a(m)-a(m-1) for any m < n.

Original entry on oeis.org

1, 2, 4, 8, 14, 21, 24, 32, 42, 51, 63, 77, 88, 104, 117, 132, 150, 155, 175, 196, 218, 242, 268, 296, 326, 358, 392, 427, 469, 518, 554, 592, 629, 646, 665, 690, 713, 744, 771, 804, 843, 888, 928, 957, 1001, 1053, 1101, 1152, 1198, 1248, 1302, 1358, 1416, 1473
Offset: 1

Views

Author

Leroy Quet, Aug 20 2007

Keywords

Comments

Is {a(n+1)-a(n)} a permutation of the positive integers?

Crossrefs

Programs

  • Mathematica
    a = {1, 2}; For[n = 1, n < 1500, n++, n = a[[ -1]]; c = 0; While[c == 0, n++; If[GCD[n, a[[ -1]]] > 1, b = 0; For[j = 1, j < Length[a], j++, If[a[[j + 1]] - a[[j]] == n - a[[ -1]], b = 1]]; If[b == 0, AppendTo[a, n]; c = 1]]]]; a (* Stefan Steinerberger, Oct 21 2007 *)

Extensions

More terms from Stefan Steinerberger, Oct 21 2007
Showing 1-3 of 3 results.