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.

A370748 a(0)=1; a(n) = sum of all previous terms, eliminating repeated digits (starting from the left).

This page as a plain text file.
%I A370748 #66 Apr 09 2024 14:15:31
%S A370748 1,1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,653,
%T A370748 6189,7238,7961,875,8452,9604,10658,176,17342,13468,14852,16304,
%U A370748 179308,35861,3947,39842,43826,48209,5301,53602,589204,17840,196248,139246,153742,16854
%N A370748 a(0)=1; a(n) = sum of all previous terms, eliminating repeated digits (starting from the left).
%C A370748 Duplicate digits are eliminated as in A137564.
%C A370748 No term can be greater than 9876543210.
%C A370748 a(260390084) = 9876543210. - _Michael S. Branicky_, Apr 09 2024
%H A370748 Alois P. Heinz, <a href="/A370748/b370748.txt">Table of n, a(n) for n = 0..20000</a>
%e A370748 a(17) = 653 since the sum of a(0) through a(16) is 65536, and eliminating repeated digits gives a(17) = A137564(65536) = 653.
%t A370748 seq={1};Do[s=Total[seq];AppendTo[seq,FromDigits[DeleteDuplicates[IntegerDigits[s]]]],43];seq (* _James C. McMahon_, Apr 09 2024 *)
%o A370748 (PARI) f(n) = my(d=digits(n)); fromdigits(vecextract(d, vecsort(vecsort(d, , 9)))) \\ A137564
%o A370748 lista(nn) = my(va=vector(nn)); va[1] = 1; for (n=2, nn, va[n] = f(sum(j=1, n-1, va[j]));); va; \\ _Michel Marcus_, Mar 08 2024
%o A370748 (Python)
%o A370748 from itertools import islice
%o A370748 def A137564(n):
%o A370748     seen, out, s = set(), "", str(n)
%o A370748     for d in s:
%o A370748         if d not in seen: out += d; seen.add(d)
%o A370748     return int(out)
%o A370748 def A370748gen(): # generator of terms
%o A370748     an, s = 1, 0
%o A370748     while True:
%o A370748         yield an
%o A370748         s += an
%o A370748         an = A137564(s)
%o A370748 print(list(islice(A370748gen(), 45))) # _Michael S. Branicky_, Apr 09 2024
%Y A370748 Cf. A010784, A137564, A370254.
%Y A370748 Cf. A371863 (records), A371864 (indices of records).
%K A370748 base,nonn
%O A370748 0,3
%A A370748 _Sergio Pimentel_, Mar 07 2024