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.

User: Maxim Skorohodov

Maxim Skorohodov's wiki page.

Maxim Skorohodov has authored 4 sequences.

A336604 a(0) = 1, a(1) = 2; thereafter let x = (a(n-1) mod a(n-2)); then a(n) = a(n-1) + a(x) if x < n, otherwise a(n) = a(n-1).

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 26, 27, 29, 32, 37, 50, 50, 51, 53, 56, 61, 74, 125, 125, 126, 128, 131, 136, 149, 200, 200, 201, 203, 206, 211, 224, 275, 275, 276, 278, 281, 286, 299, 350, 350, 351, 353, 356, 361, 374, 425, 425, 426, 428, 431, 436, 449, 500, 936, 936, 937, 939, 942, 947, 960, 1011
Offset: 0

Author

Maxim Skorohodov, Oct 10 2020

Keywords

Examples

			a(7) = 27, a(8) = 29, so a(9) = 29 + a(29 mod 27) = 32.
		

Crossrefs

Cf. A215526.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n+1, (x->
          a(n-1)+`if`(xAlois P. Heinz, Oct 25 2020
  • Mathematica
    a[0] = 1; a[1] = 2; a[n_] := a[n] = a[n - 1] + If[(r = Mod[a[n - 1], a[n - 2]]) < n, a[r], 0]; Array[a, 51, 0] (* Amiram Eldar, Oct 10 2020 *)

A328820 Fourth digit after decimal point of square root of n.

Original entry on oeis.org

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

Author

Maxim Skorohodov, Oct 28 2019

Keywords

Examples

			sqrt(5) = 2.23606798..., so a(5) = 0.
		

Crossrefs

Formula

a(n) = A010879(A000196(100000000*n)).

A328819 Third digit after decimal point of square root of n.

Original entry on oeis.org

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

Author

Maxim Skorohodov, Oct 28 2019

Keywords

Examples

			sqrt(21) = 4.58257569..., so a(21) = 2.
		

Crossrefs

Cf. A023961 (1st digit), A111862 (2nd digit).

Programs

  • PARI
    a(n) = floor(10^3*sqrt(n)) % 10; \\ Jinyuan Wang, Nov 03 2019

Formula

a(n) = A010879(A000196(1000000*n)).

A309872 For each term, take the last digit of the previous term and count all the appearances of that digit up to and including the previous term; the first term is 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 12, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 2, 8, 2, 9, 2, 10, 2, 11, 16, 3, 3, 4, 3, 5, 3, 6, 4, 4, 5, 4, 6, 5, 5, 6, 6, 7, 3, 7, 4, 7, 5, 7, 6, 8, 3, 8, 4, 8, 5, 8, 6, 9, 3, 9, 4, 9, 5, 9, 6, 10, 3, 10, 4, 10, 5, 10, 6, 11, 23, 11
Offset: 1

Author

Maxim Skorohodov, Aug 21 2019

Keywords

Examples

			To get the eleventh term, you need to get the last digit of the tenth term, which is 1, and then count all the 1's already in the sequence: 1, 1, 2, 1, 3, 1, 4, 1, 5, 1; there are six 1's, so the eleventh term is 6.
		

Crossrefs

Cf. A248034 (first term is 0).

Programs

  • Maple
    Q:= Array(0..9):
    A:= Vector(100):
    Q[1]:= 1:
    A[1]:= 1:
    for n from 2 to 100 do
      d:= A[n-1] mod 10;
      A[n]:= Q[d];
      L:= convert(%,base,10);
      for i in L do Q[i]:= Q[i]+1 od
    od:
    convert(A,list); # Robert Israel, Feb 18 2020
  • PARI
    f = vector(base=10); for (n=1, 91, v = if (n==1, 1, f[1+(v%base)]); apply (d -> f[1+d]++, if (v, digits(v, base), [0])); print1 (v ", ")) \\ Rémy Sigrist, Aug 21 2019
    
  • Python
    s, a, n = "1", [1], 1
    while n < 100:
        n = n+1
        d = s[len(s)-1]
        i, aa = 0, 0
        while i < len(s):
            if s[i] == d:
                aa = aa+1
            i = i+1
        s, a = s+str(aa), a+[aa]
    for n in range(1, 92): print(a[n-1], end=', ') # A.H.M. Smeets, Aug 22 2019