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.

A108712 A fractal sequence, defined by a(2n-1) = A007376(n) (the almost-natural numbers), a(2n) = a(n).

Original entry on oeis.org

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

Views

Author

Eric Angelini, Jun 20 2005

Keywords

Comments

Start saying "1" and erase, as soon as they appear, the digits spelling the natural numbers. The result is the sequence itself. [The definition in the name does not yield this property - see details in the example section.]
Sequence based on the same skeleton as A108202 (the natural counting digits) but beginning with 1 instead of zero; with n increasing, the apparent correlation between the two sequences disappears.

Examples

			Say "1" and erase the first "1", then say "2" and erase the first "2" (leaving all other digits where they are), then say "3" and erase the first "3", etc. When it comes to "10" erase the first "1" and then the closest "0", etc. The digits to erase when the count comes to "16", for example, are next to one another. [If we apply to the sequence the process described here, the result is a different sequence, b. To get a match with the first 76 terms, we take "first" to mean "next (after the most recent erasure)". Nevertheless, we find a(76), ..., a(80) = 1,4,1,2,3; b(76), ..., b(80) = 1,1,2,4,3. - _Kevin Ryde_ and _Peter Munn_, Nov 21 2020]
From _Peter Munn_, Nov 21 2020: (Start)
Start of table showing the interleaving with the almost-natural numbers, A007376:
   n  a(n)  A007376    a(n/2)
            ((n+1)/2)
   1   1       1
   2   1                 1
   3   2       2
   4   1                 1
   5   3       3
   6   2                 2
   7   4       4
   8   1                 1
   9   5       5
  10   3                 3
  11   6       6
  12   2                 2
  13   7       7
  14   4                 4
  15   8       8
  16   1                 1
  17   9       9
  18   5                 5
  19   1       1
  20   3                 3
  21   0       0
(End)
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{m = 0, d = n, i = 1, l, p}, While[m <= d, l = m; m = 9i*10^(i - 1) + l; i++ ]; i--; p = Mod[d - l, i]; q = Floor[(d - l)/i] + 10^(i - 1); If[p != 0, IntegerDigits[q][[p]], Mod[q - 1, 10]]]; a[n_] := a[n] = If[EvenQ[n], a[n/2], f[(n + 1)/2]]; Table[ a[n], {n, 105}] (* Robert G. Wilson v, Jun 24 2005 *)

Formula

a(2n-1) = A007376(n), a(2n) = a(n).
a(n) = A033307(A025480(n-1)) = A007376(A025480(n-1)+1). - Kevin Ryde, Nov 21 2020

Extensions

Additional comments from Robert G. Wilson v and Alexandre Wajnberg, Jun 24 2005
Incorrect formula deleted by Peter Munn, Nov 19 2020