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.

A380690 a(0) = 0; a(n) = the number of times a(n-1) has all digits in common with a previous term.

This page as a plain text file.
%I A380690 #12 Feb 09 2025 13:38:16
%S A380690 0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,1,2,1,3,1,4,1,5,1,6,
%T A380690 1,7,1,8,1,9,1,10,1,11,12,0,12,1,13,0,13,1,14,0,14,1,15,0,15,1,16,0,
%U A380690 16,1,17,0,17,1,18,0,18,1,19,0,19,1,20,0,20,1,21
%N A380690 a(0) = 0; a(n) = the number of times a(n-1) has all digits in common with a previous term.
%C A380690 Every number should appear a limited number of times in the sequence as opposed as in A326834.
%e A380690 a(24) = 2 since a(23) = 1 and previously there are two numbers that only have the digit '1': a(22) = 11 and a(2) = 1.
%e A380690 a(4062) = 113 since a(4061) = 112 and previously there are 113 occurrences of numbers that only have the digits '1' and '2' such as 12,21,112,121,122.
%t A380690 a[0] = 0; a[n_] := a[n] = Count[Array[a, n - 1, 0], _?(Union[IntegerDigits[a[n - 1]]] == Union[IntegerDigits[#]] &)]; Array[a, 100, 0] (* _Amiram Eldar_, Jan 30 2025 *)
%o A380690 (Python)
%o A380690 from collections import Counter
%o A380690 from itertools import count, islice
%o A380690 def agen(): # generator of terms
%o A380690     an, digsetcount = 0, Counter()
%o A380690     while True:
%o A380690         yield an
%o A380690         key = "".join(sorted(set(str(an))))
%o A380690         an = digsetcount[key]
%o A380690         digsetcount[key] += 1
%o A380690 print(list(islice(agen(), 80))) # _Michael S. Branicky_, Jan 30 2025
%Y A380690 Cf. A309261, A326834, A364788.
%K A380690 nonn,base
%O A380690 0,5
%A A380690 _Sergio Pimentel_, Jan 30 2025