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.

A263808 Numbers k such that the iterated subtraction of the decimal digits eventually reaches -k.

This page as a plain text file.
%I A263808 #45 Dec 23 2024 14:53:44
%S A263808 1,2,3,4,5,6,7,8,9,10,11,12,15,18,20,21,22,24,27,30,33,36,40,42,44,45,
%T A263808 48,50,51,54,55,60,63,66,70,72,77,80,81,84,88,89,90,98,99,100,101,102,
%U A263808 105,108,110,111,112,113,114,116,117,120,123,124,126,128
%N A263808 Numbers k such that the iterated subtraction of the decimal digits eventually reaches -k.
%C A263808 A180477 is a subsequence of this sequence. - _Hans Havermann_, Oct 27 2015
%H A263808 Reinhard Zumkeller, <a href="/A263808/b263808.txt">Table of n, a(n) for n = 1..10000</a>
%H A263808 Éric Angelini, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2015-October/015519.html">Essicran Numbers</a>, SeqFan list, Oct 27 2015.
%e A263808 a(14)=18: 18-1-8-1-8-1-8-1-8 = -18. - _Bob Selcoe_, Oct 27 2015
%t A263808 eQ[n_] := Block[{d = IntegerDigits@ n}, MemberQ[Accumulate@ d ~Prepend~ 0, Mod[2*n, Total@ d]]]; Select[Range@ 128, eQ] (* _Giovanni Resta_, Oct 27 2015 *)
%o A263808 (Haskell)
%o A263808 a263808 n = a263808_list !! (n-1)
%o A263808 a263808_list = filter essicran [1..] where
%o A263808    essicran x = last (takeWhile (>= -x) es) == -x where
%o A263808      es = scanl (-) x (cycle $ map (read . return) $ show x)
%o A263808 (PARI) is(n)=my(d=digits(n),t,S=vector(#d-1,i,t+=d[i])); t=2*n%vecsum(d); t==0 || setsearch(S,d) \\ _Charles R Greathouse IV_, Oct 28 2015
%Y A263808 Cf. A005349, A180477.
%K A263808 nonn,base
%O A263808 1,2
%A A263808 _Eric Angelini_ and _Reinhard Zumkeller_, Oct 27 2015