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.

A380745 a(0) = 0; a(n) = the number of times a(n-1) has the same digits in common with a previous term, in any permutation.

This page as a plain text file.
%I A380745 #24 Mar 27 2025 13:27:13
%S A380745 0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,
%T A380745 0,16,0,17,0,18,0,19,0,20,0,21,1,1,2,1,3,1,4,1,5,1,6,1,7,1,8,1,9,1,10,
%U A380745 1,11,1,12,2,2,3,2,4,2,5,2,6,2,7,2,8,2,9,2
%N A380745 a(0) = 0; a(n) = the number of times a(n-1) has the same digits in common with a previous term, in any permutation.
%C A380745 To find a(n), let L be the multiset of the digits of a(n-1). Then a(n) is the number of terms a(i), 0 <= i <= n-2, which also have L as the multiset of its digits. - _N. J. A. Sloane_, Mar 27 2025
%H A380745 Michael S. Branicky, <a href="/A380745/b380745.txt">Table of n, a(n) for n = 0..10000</a>
%e A380745 a(43) = 1 since a(42) = 21 and previously there is only one number in the sequence that contains both a 1 and a 2.
%e A380745 a(104) = 3 since a(103) = 11 and previously there are 3 numbers in the sequence that contain two 1's.
%e A380745 a(9942) = 14 since a(9941) = 155 and previously there are 14 numbers in the sequence that contain one 1 and two 5's.
%t A380745 a[0] = 0; a[n_] := a[n] = Count[Array[a, n - 1, 0], _?(Sort[IntegerDigits[a[n - 1]]] == Sort[IntegerDigits[#]] &)]; Array[a, 100, 0] (* _Amiram Eldar_, Jan 31 2025 *)
%o A380745 (Python)
%o A380745 from collections import Counter
%o A380745 from itertools import count, islice
%o A380745 def agen(): # generator of terms
%o A380745     an, digsetcount = 0, Counter()
%o A380745     while True:
%o A380745         yield an
%o A380745         key = "".join(sorted(str(an)))
%o A380745         an = digsetcount[key]
%o A380745         digsetcount[key] += 1
%o A380745 print(list(islice(agen(), 82))) # _Michael S. Branicky_, Mar 24 2025
%Y A380745 Cf. A309261, A326834, A364788, A380690.
%K A380745 nonn,base
%O A380745 0,5
%A A380745 _Sergio Pimentel_, Jan 31 2025