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

A325721 Start the sequence with a(1) = 1 and read the digits one by one from there. The sequence is always extended with the sum d + k, d being the digit read and k the number of d digits present so far in the sequence.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 3, 1, 5, 4, 7, 6, 9, 8, 11, 10, 5, 6, 7, 2, 8, 9, 10, 4, 11, 12, 8, 3, 7, 9, 10, 11, 5, 12, 6, 11, 13, 12, 4, 13, 14, 9, 15, 6, 10, 16, 17, 18, 7, 19, 7, 8, 20, 8, 21, 9, 14, 22, 10, 11, 23, 5, 24, 12, 25, 12, 26, 13, 13, 27, 15, 14, 14, 8, 6, 15, 9, 28, 16, 29, 10, 10, 11, 30, 7, 31, 32, 12, 9, 11, 13, 11
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, May 16 2019

Keywords

Examples

			The sequence starts with a(1) = 1.
We read this 1, see that there is only one digit 1 so far in the sequence, thus k = 1; we have then d + k = (1 + 1) = 2 and this 2 becomes a(2);
We read this 2, see that there is only one digit 2 so far in the sequence, thus k = 1; we have then d + k = (2 + 1) = 3 and this 3 becomes a(3);
We read this 3, see that there is only one digit 3 so far in the sequence, thus k = 1; we have then d + k = (3 + 1) = 4 and this 4 becomes a(4);
...
We now read the first digit of a(10) = 10, see that this 1 is the 2nd digit 1 so far in the sequence, thus k = 2; we have then d + k = (1 + 2) = 3 and this 3 becomes a(11);
We now read the second digit of a(10) = 10, see that this 0 is the 1st digit 0 so far in the sequence, thus k = 1; we have then d + k = 1 and this 1 becomes a(12);
We now read the single digit of a(11) = 3; we see that this 3 is the 2nd digit 3 so far in the sequence, thus k = 2; we have then d + k = 5 and this 5 becomes a(13); etc.
		

Crossrefs

Cf. A325722 where the same idea is developed, but with d*k instead of d+k. See also A308232 for the concatenation kd.
Cf. A322182.

A325722 Start the sequence with a(1) = 1 and read the digits one by one from there. The sequence is always extended with the product d*k, d being the digit read and k the number of d digits present up to the point of the d digit taken.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 8, 8, 16, 3, 6, 3, 12, 6, 4, 6, 18, 12, 24, 5, 24, 6, 8, 10, 16, 5, 12, 20, 30, 32, 7, 0, 8, 36, 10, 9, 14, 16, 0, 9, 0, 12, 18, 7, 0, 40, 15, 42, 10, 0, 9, 11, 24, 12, 48, 0, 18, 0, 13, 20, 14, 48, 14, 0, 28, 0, 15, 15, 32, 22, 16, 0, 0, 27, 17, 18, 24, 36, 19, 26, 40, 56, 0, 20, 64, 0, 21, 18, 28, 0, 22, 44, 48, 72
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, May 16 2019

Keywords

Comments

Every prime number > 7 appears only once and in natural order. - Davide Rotondo, Feb 08 2024

Examples

			The sequence starts with a(1) = 1.
We read this 1, see that there is only one digit 1 so far in the sequence, thus k = 1; we have then d*k = 1 and this 1 becomes a(2);
We read a(2) = 1, see that this 1 is the 2nd digit 1 so far in the sequence, thus k = 2; we have then d*k = 2 and this 2 becomes a(3);
We read a(3) = 2, see that there is only one digit 2 so far in the sequence, thus k = 1; we have then d*k = 2 and this 2 becomes a(4);
We read a(4) = 2, see that this 2 is the 2nd digit 2 so far in the sequence, thus k = 2; we have then d*k = 4 and this 4 becomes a(5);
...
We read now the first digit of a(9) = 16 and see that this 1 is the 3rd digit 1 so far in the sequence, thus k = 3; we have then d*k = 3 and this 3 becomes a(10);
We read now the second digit of a(9) = 16 and see that this 6 is the 1st digit 6 so far in the sequence, thus k = 1; we have then d*k = 6 and this 6 becomes a(11); etc.
From _Kevin Ryde_, Feb 10 2024: (Start)
Digits d from the sequence terms, their respective occurrence number k, and consequent terms a(n) = d*k, begin:
     d = 1 1 2 2 4 4 8  8  1  6  3  6  3  1  2  6  4 ...
     k = 1 2 1 2 1 2 1  2  3  1  1  2  2  4  3  3  3 ...
  d*k  = 1 2 2 4 4 8 8 16  3  6  3 12  6  4  6 18 12 ...
(End)
		

Crossrefs

Cf. A325721 where the same idea is developed, but with d+k instead of d*k. See also A308232 for the concatenation kd.
Cf. A322182.

Programs

  • PARI
    digs(x) = if (x, digits(x), [0]);
    countd(listd, posd, y) = my(nb=0); for (k=1, posd, if (listd[k] == y, nb++);); nb;
    lista(nn) = my(list=List(1), listd=List(1), pos=1, posd=1); for (n=1, nn, my(d = digs(list[pos])); for (i=1, #d, my(y = d[i], nb = countd(listd, posd, y)); listput(list, y*nb); my(dd = digs(y*nb)); for (j=1, #dd, listput(listd, dd[j]);); posd++;); pos++;); Vec(list); \\ Michel Marcus, Feb 09 2024

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])))))
Showing 1-3 of 3 results.