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.

A064528 Positive numbers that do not appear in A064520.

Original entry on oeis.org

2, 3, 6, 7, 8, 10, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 43, 44, 45, 46, 48, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, 76, 79, 80, 82, 84, 86, 87, 88, 89, 90
Offset: 1

Views

Author

Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Oct 07 2001, Oct 07 2001

Keywords

Extensions

More terms from Sean A. Irvine, Jul 16 2023

A306562 a(n) = 1 + 2 - 3 - 4 + 5 + 6 + 7 - 8 - 9 - 10 - 11 + 12 + 13 + 14 + 15 + ... + (+-1)*n, where, after the 1st summand there is one plus, two minuses, three plusses, etc.

Original entry on oeis.org

1, 3, 0, -4, 1, 7, 14, 6, -3, -13, -24, -12, 1, 15, 30, 46, 29, 11, -8, -28, -49, -71, -48, -24, 1, 27, 54, 82, 111, 81, 50, 18, -15, -49, -84, -120, -157, -119, -80, -40, 1, 43, 86, 130, 175, 221, 174, 126, 77, 27, -24, -76, -129, -183, -238, -294, -237, -179
Offset: 0

Views

Author

Brandon J. Butierres, Feb 23 2019

Keywords

Examples

			a(0) = 1                         =  1
a(1) = 1 + 2                     =  3
a(2) = 1 + 2 - 3                 =  0
a(3) = 1 + 2 - 3 - 4             = -4
a(4) = 1 + 2 - 3 - 4 + 5         =  1
a(5) = 1 + 2 - 3 - 4 + 5 + 6     =  7
a(6) = 1 + 2 - 3 - 4 + 5 + 6 + 7 = 14
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember: `if`(n=0, 1,
          a(n-1)+(n+1)*(-1)^floor(sqrt(2*n)-1/2))
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Feb 26 2019
  • Mathematica
    With[{nn=20},Accumulate[Flatten[Join[{1,2},Times@@@Partition[Riffle[TakeList[Range[3,3+(nn(nn+1))/2],Range[2,nn]],{-1,1}],2]]]]] (* Harvey P. Dale, Mar 24 2024 *)
  • Python
    from math import isqrt
    def A306562(n): return 1+sum((k if isqrt(k-1<<3)+1&2 else -k) for k in range(2,n+2)) # Chai Wah Wu, Jun 07 2025

Formula

F(n) = ((-1)^(n+1)(2n+1)(2n^2+2n+5)+21)/16 gives local extrema 3, -4, 14, -24, 46, -71, 111, -157, ... (conjectured). - Jean-François Alcover, Jun 01 2019
For n > 0, a(n) = 1 + Sum_{k=1..n} (-1)^(A002024(k)+1)*(k+1). - Jinyuan Wang, Aug 06 2019
a(n) = 1 <=> n in { A046092 }. - Alois P. Heinz, Jun 08 2025

Extensions

New name from Michel Marcus, Apr 11 2019
Showing 1-2 of 2 results.