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.

A337864 a(n) is the number formed by removing from n each digit if it is a duplicate of the previous digit, from left to right.

This page as a plain text file.
%I A337864 #43 Dec 21 2024 17:36:35
%S A337864 0,1,2,3,4,5,6,7,8,9,10,1,12,13,14,15,16,17,18,19,20,21,2,23,24,25,26,
%T A337864 27,28,29,30,31,32,3,34,35,36,37,38,39,40,41,42,43,4,45,46,47,48,49,
%U A337864 50,51,52,53,54,5,56,57,58,59,60,61,62,63,64,65,6,67,68,69,70,71,72,73,74
%N A337864 a(n) is the number formed by removing from n each digit if it is a duplicate of the previous digit, from left to right.
%C A337864 Please see discussion in A337857.
%C A337864 Similar to A137564 from which first differs at a(101) = 101 here, there a(101) = 10.
%C A337864 Differs from A106612 starting at n=100. - _R. J. Mathar_, Oct 08 2020
%H A337864 Michael S. Branicky, <a href="/A337864/b337864.txt">Table of n, a(n) for n = 0..10000</a>
%e A337864 a(100) = 10. Note that the second zero from the index n = 100 has been removed.
%e A337864 a(101) = 101.
%e A337864 a(1211323171) = 121323171. Note that the third "1" from the index n has been removed.
%o A337864 (Perl) sub a {my($n)=@_; $n =~ s/(.)\1+/$1/g; $n} # _Kevin Ryde_, Oct 04 2020
%o A337864 (Python)
%o A337864 from itertools import groupby
%o A337864 def a(n): return int("".join(k for k, g in groupby(str(n))))
%o A337864 print([a(n) for n in range(75)]) # _Michael S. Branicky_, Jul 23 2022
%o A337864 (PARI) a(n) = if(n < 10, return(n)); if(n%10 == (n\10)%10, return(a(n\10)), return(a(n\10)*10+n%10)) \\ _David A. Corneth_, Jul 23 2022
%Y A337864 Cf. A043096 (fixed points a(n)=n).
%Y A337864 Cf. A137564, A337857.
%Y A337864 Cf. A090079 (in binary).
%K A337864 base,nonn,easy
%O A337864 0,3
%A A337864 _Rodolfo Kurchan_, Sep 27 2020