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-4 of 4 results.

A329985 a(1) = 1 and for n > 0, a(n+1) = a(k) - a(n) where k is the number of terms equal to a(n) among the first n terms.

Original entry on oeis.org

1, 0, 1, -1, 2, -1, 1, 0, 0, 1, -2, 3, -2, 2, -2, 3, -3, 4, -3, 3, -2, 1, 1, -2, 4, -4, 5, -4, 4, -3, 4, -5, 6, -5, 5, -5, 6, -6, 7, -6, 6, -5, 4, -2, 1, 0, -1, 2, -1, 0, 2, -3, 2, 0, -1, 3, -4, 5, -4, 3, -1, 0, 1, -1, 2, -3, 5, -6, 7, -7, 8, -7, 7, -6, 5, -3
Offset: 1

Views

Author

Rémy Sigrist, Nov 26 2019

Keywords

Comments

In other words, for n > 0, a(n+1) = a(o(n)) - a(n) where o is the ordinal transform of the sequence.
The sequence has interesting graphical features (see plot in Links section).

Examples

			The first terms, alongside their ordinal transform, are:
  n   a(n)  o(n)
  --  ----  ----
   1     1     1
   2     0     1
   3     1     2
   4    -1     1
   5     2     1
   6    -1     2
   7     1     3
   8     0     2
   9     0     3
  10     1     4
		

Crossrefs

o(n) is A330334.
See A329981 for similar sequences.

Programs

  • Mathematica
    A={1};For[n=2,n<=76,n++,A=Append[A,Part[A,Count[Table[Part[A,i],{i,1,n-1}],Part[A,n-1]]]-Part[A,n-1]]];A (* Joshua Oliver, Nov 26 2019 *)
    Nest[Append[#, #[[Count[#, #[[-1]] ] ]] - #[[-1]]] &, {1}, 75] (* Michael De Vlieger, Dec 01 2019 *)
  • PARI
    for (n=1, #(a=vector(76)), print1 (a[n]=if (n==1, 1, a[sum(k=1, n-1, a[k]==a[n-1])]-a[n-1])", "))

A329982 a(1) = 0, and for n > 0, a(n+1) = k^2 - a(n) where k is the number of terms equal to a(n) among the first n terms.

Original entry on oeis.org

0, 1, 0, 4, -3, 4, 0, 9, -8, 9, -5, 6, -5, 9, 0, 16, -15, 16, -12, 13, -12, 16, -7, 8, -7, 11, -10, 11, -7, 16, 0, 25, -24, 25, -21, 22, -21, 25, -16, 17, -16, 20, -19, 20, -16, 25, -9, 10, -9, 13, -9, 18, -17, 18, -14, 15, -14, 18, -9, 25, 0, 36, -35, 36, -32
Offset: 1

Views

Author

Rémy Sigrist, Nov 26 2019

Keywords

Comments

In other words, for n > 0, a(n+1) = o(n)^2 - a(n) where o is the ordinal transform of the sequence.

Examples

			The first terms, alongside their ordinal transform, are:
  n   a(n)  o(n)
  --  ----  ----
   1     0     1
   2     1     1
   3     0     2
   4     4     1
   5    -3     1
   6     4     2
   7     0     3
   8     9     1
   9    -8     1
  10     9     2
		

Crossrefs

See A329981 for similar sequences.

Programs

  • PARI
    for (n=1, #(a=vector(65)), print1 (a[n]=if (n>1, sum(k=1, n-1, a[k]==a[n-1])^2-a[n-1])", "))

A330004 a(1) = 0, and for n > 0, a(n+1) = u - v where u (resp. v) is the number of terms equal to a(n) (resp. a(n)+1) among the first n terms.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 2, 3, 1, 1, 2, 3, 2, 3, 3, 4, 1, 1, 2, 2, 3, 4, 2, 3, 4, 3, 4, 4, 5, 1, 0, -6, 1, 1, 2, 2, 3, 3, 4, 5, 2, 2, 3, 4, 5, 3, 4, 5, 4, 5, 5, 6, 1, -1, -1, 0, -8, 1, 0, -8, 2, 2, 3, 3, 4, 4, 5, 6, 2, 2, 3, 3, 4, 5, 6, 3, 4, 5, 6, 4, 5, 6, 5, 6, 6
Offset: 1

Views

Author

Rémy Sigrist, Nov 26 2019

Keywords

Comments

The sequence has chaotic features (see plot in Links section).

Examples

			The first terms, alongside u and v, are:
  n   a(n)  u  v
  --  ----  -  -
   1     0  1  0
   2     1  1  0
   3     1  2  0
   4     2  1  0
   5     1  3  1
   6     2  2  0
   7     2  3  0
   8     3  1  0
   9     1  4  3
  10     1  5  3
		

Crossrefs

See A329981 for similar sequences.

Programs

  • PARI
    for (n=1, #(a=vector(85)), print1 (a[n]=if (n==1, 0, sum(k=1, n-1, (a[k]==a[n-1])-(a[k]==a[n-1]+1)))", "))

A329984 a(1) = 0 and for n > 0, a(n+1) is the odd part of k where k is the number of terms equal to a(n) among the first n terms.

Original entry on oeis.org

0, 1, 1, 1, 3, 1, 1, 5, 1, 3, 1, 7, 1, 1, 9, 1, 5, 1, 11, 1, 3, 3, 1, 13, 1, 7, 1, 15, 1, 1, 17, 1, 9, 1, 19, 1, 5, 3, 5, 1, 21, 1, 11, 1, 23, 1, 3, 3, 7, 3, 1, 25, 1, 13, 1, 27, 1, 7, 1, 29, 1, 15, 1, 31, 1, 1, 33, 1, 17, 1, 35, 1, 9, 3, 9, 1, 37, 1, 19, 1
Offset: 1

Views

Author

Rémy Sigrist, Nov 26 2019

Keywords

Comments

In other words, for n > 0, a(n+1) = A000265(o(n)) where o is the ordinal transform of the sequence.

Examples

			The first terms, alongside their ordinal transform, are:
  n   a(n)  o(n)
  --  ----  ----
   1     0     1
   2     1     1
   3     1     2
   4     1     3
   5     3     1
   6     1     4
   7     1     5
   8     5     1
   9     1     6
  10     3     2
		

Crossrefs

See A329981 for similar sequences.
Cf. A000265.

Programs

  • PARI
    o=vector(38); v=0; for (n=1, 80, print1 (v", "); o[1+v]++; v=o[1+v]/2^valuation(o[1+v],2))
Showing 1-4 of 4 results.