OFFSET
1,3
COMMENTS
Every prime number > 7 appears only once and in natural order. - Davide Rotondo, Feb 08 2024
LINKS
Carole Dubois, Table of n, a(n) for n = 1..5001
EXAMPLE
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)
PROG
(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
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, May 16 2019
STATUS
approved
