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

A358851 a(n+1) is the number of occurrences of the largest digit of a(n) among all the digits of [a(0), a(1), ..., a(n)], with a(0)=0.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 11, 13, 2, 2, 3, 3, 4, 2, 4, 3, 5, 2, 5, 3, 6, 2, 6, 3, 7, 2, 7, 3, 8, 2, 8, 3, 9, 2, 9, 3, 10, 15, 4, 4, 5, 5, 6, 4, 6, 5, 7, 4, 7, 5, 8, 4, 8, 5, 9, 4, 9, 5, 10, 17, 6, 6, 7, 7, 8, 6
Offset: 0

Views

Author

Bence Bernáth, Dec 08 2022

Keywords

Comments

Up to a(19)=10, the terms are identical to A248034. The branches (distinct lines of terms indicating the largest digit of the preceding term) can be labeled by the counter digit (shown in the scatter plot). From 9 to 1 the branches gradually get fragmented. Below digit 5 it is harder to disentangle the branches in some places. A repeating pattern also appears (shown in the inset of the scatter plot).

Crossrefs

Programs

A357930 a(0) = 0; for n > 0, let S = concatenation of a(0)..a(n-1); a(n) is the number of times the digit at a(n-1) digits back from the end of S appears in S.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 7, 7, 8, 8, 7, 7, 8, 8, 7, 13, 7, 14, 7, 13, 13, 15, 15, 13, 15, 15, 6, 17, 16, 19, 8, 10, 10, 22, 10, 23
Offset: 0

Views

Author

Scott R. Shannon, Oct 21 2022

Keywords

Examples

			a(7) = 3 as a(6) = 3 and the string concatenation of a(0)..a(6) = "0112223", and the digit 3 digits back from the end of the string concatenation is 2, and 2 has appeared three times in the string.
		

Crossrefs

Programs

  • MATLAB
    function a = A357930( max_n )
        a = 0; s = '0'; c = zeros(1,10); c(1) = 1;
        for n = 2:max_n
            k = c(s(end-a(n-1))-47); sk = num2str(k);
            c(sk-47) = c(sk-47)+1; s = [s sk]; a(n) = k;
        end
    end % Thomas Scheuerle, Oct 21 2022

A358967 a(n+1) gives the number of occurrences of the smallest digit of a(n) so far, up to and including a(n), with a(0)=0.

Original entry on oeis.org

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

Views

Author

Bence Bernáth, Dec 08 2022

Keywords

Comments

Up to a(103)=12, the terms are identical to A248034.

Crossrefs

Programs

  • MATLAB
    length_seq=150;
    sequence(1)=0;
    seq_for_digits=(num2str(sequence(1))-'0');
    for i1=1:1:length_seq
         sequence(i1+1)=sum(seq_for_digits==min((num2str(sequence(i1))-'0'))');
         seq_for_digits=[seq_for_digits, num2str(sequence(i1+1))-'0'];
    end
    
  • Python
    sequence=[0]
    length=150
    seq_for_digits=list(map(int, list(str(sequence[0]))))
    for ii in range(length):
       sequence.append(seq_for_digits.count(min(list(map(int,list(str(sequence[-1])))))))
       seq_for_digits.extend(list(map(int, list(str(sequence[-1])))))

A359031 a(n+1) gives the number of occurrences of the mode of the digits of a(n) among all the digits of [a(0), a(1), ..., a(n)], with a(0)=0.

Original entry on oeis.org

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

Views

Author

Bence Bernáth, Dec 12 2022

Keywords

Comments

The mode is the most frequently occurring value among the digits of a(n). When there are multiple values occurring equally frequently, the mode is the smallest of those values.
Up to a(464)=110, the terms are identical to A358967.

Crossrefs

Programs

  • MATLAB
    length_seq=470;
    sequence(1)=0;
    seq_for_digits=(num2str(sequence(1))-'0');
    for i1=1:1:length_seq
         sequence(i1+1)=sum(seq_for_digits==mode((num2str(sequence(i1))-'0'))');
         seq_for_digits=[seq_for_digits, num2str(sequence(i1+1))-'0'];
    end
    
  • Python
    import statistics as stat
    sequence=[0]
    length=470
    seq_for_digits=list(map(int, list(str(sequence[0]))))
    for ii in range(length):
        sequence.append(seq_for_digits.count(stat.mode(list(map(int, list(str(sequence[-1])))))))
        seq_for_digits.extend(list(map(int, list(str(sequence[-1])))))

A360257 a(1) = 1; for n > 1, a(n) is the number of preceding terms having the same sum of divisors as a(n-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, 11, 2, 2, 3, 2, 4, 2, 5, 2, 6, 3, 3, 4, 3, 5, 3, 6, 4, 4, 5, 4, 6, 5, 5, 6, 6, 7, 2, 7, 3, 7, 4, 7, 5, 7, 6, 8, 2, 8, 3, 8, 4, 8, 5, 8, 6, 9, 2, 9, 3, 9, 4, 9, 5, 9, 6, 10, 2, 10, 3, 10, 4, 10, 5, 10, 6, 11, 12, 1, 12, 2, 11, 13, 1
Offset: 1

Views

Author

Scott R. Shannon, Jan 31 2023

Keywords

Comments

The most common sum of divisor count of all previous terms changes as n increases; these values, up to 2 million terms, are 1, 12, 24, 12, 24, 72, 720, 72, 720, 72, 720, 72, 720. The value 72 holds the record from a(6998) = 71 to a(1271035) = 563. After a(1285242) = 264 the divisor sum 720 becomes the most common sum to well beyond 10 million terms. It is likely the record becomes arbitrarily large as n increases.

Examples

			a(22) = 2 as a(21) = 11 and 11 has a divisor sum of A000203(11) = 12. However, A000203(6) also equals 12, and as a(11) = 6 there are two previous terms with a divisor sum of 12.
		

Crossrefs

Programs

  • PARI
    lista(nn) = my(va = vector(nn), vs=vector(nn)); va[1] = 1; vs[1] = 1; for (n=2, nn, va[n] = #select(x->(x==vs[n-1]), vs); vs[n] = sigma(va[n]);); va; \\ Michel Marcus, Jan 31 2023

A378852 a(1) = 1. For n > 1 a(n) is the number of terms a(i); 1 <= i <= n-1 such that d(a(i)) >= d(a(n-1)), where d is the decimal digital sum function A007953.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 6, 1, 8, 1, 10, 11, 5, 3, 5, 4, 6, 3, 9, 1, 20, 13, 9, 2, 16, 4, 12, 15, 7, 5, 11, 23, 12, 20, 26, 4, 18, 3, 24, 11, 32, 16, 8, 6, 14, 20, 38, 1, 48, 1, 50, 23, 24, 17, 9, 6, 20, 47, 3, 40, 35, 12, 43, 16, 17, 13, 40, 41, 34, 19, 4, 45, 9, 10, 74, 4, 49, 1, 78, 1, 80
Offset: 1

Views

Author

David James Sycamore, Dec 09 2024

Keywords

Comments

d(a(n-1)) >= d(a(i)); 1 <= i <= n-1 implies a(n) = 1. a(n) <= n-1 for all n > 1, with equality iff d(a(n-1)) = 1.
Compare with A356348 and A378782.

Examples

			a(1) = 1 so a(2) also = 1 since there is only one term up to and including a(1) = 1 which has digit sum >= 1. Then a(3) = 2 because now there are two terms having digit sum >= 1. a(11) = 10 so a(12) = 11 since all terms up to and including a(11) have digit sum >= 1. a(19) = 9, whose digit sum (9) sets a record, thus a(20) = 1, which means a(21) = 20.
		

Crossrefs

Programs

  • Maple
    R:= 1: dR:= 1:
    for n from 2 to 100 do
      v:= nops(select(i -> dR[i] >= dR[n-1], [$1..n-1]));
      R:= R,v; dR:= dR, convert(convert(v,base,10),`+`);
    od:
    R; # Robert Israel, Feb 09 2025
  • PARI
    first(n) = {
    	my(res = vector(n), digs = vector(n));
    	res[1] = 1; digs[1] = 1;
    	for(i = 2, n,
    		s = 1 + sum(j = 1, i-2, digs[j] >= digs[i-1]);
    		res[i] = s;
    		digs[i] = sumdigits(s)
    	);
    	res
    } \\ David A. Corneth, Dec 24 2024

Extensions

More terms from David A. Corneth, Dec 24 2024
Showing 1-6 of 6 results.