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.

A330386 Running totals in A330385.

Original entry on oeis.org

1, 4, 0, 9, 16, 4, 9, 1, 16, 0, 25, 36, 49, 25, 64, 81, 100, 121, 144, 100, 64, 36, 16, 49, 9, 36, 4, 49, 1, 36, 121, 49, 100, 36, 169, 256, 196, 225, 256, 361, 484, 400, 441, 484, 625, 529, 576, 625, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369
Offset: 1

Views

Author

Rémy Sigrist, Dec 12 2019

Keywords

Comments

All terms are nonnegative squares.

Crossrefs

Programs

  • PARI
    s=t=0; for (n=1, 58, for (v=1, oo, if (!bittest(s,v) && issquare(u=t-v*(-1)^v), print1 (t=u ", "); s+=2^v; break)))

Formula

a(n) = - Sum_{k = 1..n } A330385(k) * (-1)^A330385(k).

A330403 Lexicographically earliest sequence of distinct positive terms with an associate sequence t such that t(0) = 0, and for any n > 0, at least one of t(n-1) - a(n) or t(n-1) + a(n) is a square; in case t(n-1) - a(n) is a square, set t(n) = t(n-1) - a(n), otherwise set t(n) = t(n-1) + a(n).

Original entry on oeis.org

1, 3, 4, 9, 5, 12, 7, 8, 15, 16, 25, 11, 13, 24, 21, 32, 20, 33, 40, 27, 28, 17, 19, 36, 39, 56, 45, 35, 48, 49, 64, 55, 72, 63, 23, 57, 60, 77, 65, 84, 44, 52, 29, 31, 68, 37, 80, 41, 76, 99, 81, 95, 51, 69, 87, 105, 123, 43, 88, 47, 92, 141, 96, 129, 111, 93
Offset: 1

Views

Author

Rémy Sigrist, Dec 13 2019

Keywords

Comments

This sequence is a variant of A330385.

Examples

			The first terms, alongside t(n), are:
  n   a(n)  t(n)
  --  ----  ----
   0  N/A      0
   1     1     1
   2     3     4
   3     4     0
   4     9     9
   5     5     4
   6    12    16
   7     7     9
   8     8     1
   9    15    16
  10    16     0
  11    25    25
  12    11    36
		

Crossrefs

See A330401 for similar sequences.
Cf. A330385, A330422 (running totals).

Programs

  • PARI
    See Links section.
Showing 1-2 of 2 results.