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.
%I A235915 #30 Nov 23 2023 17:41:34 %S A235915 1,3,7,10,12,16,19,20,23,24,26,30,34,37,38,40,45,50,51,53,57,60,62,66, %T A235915 69,70,73,74,76,80,84,87,88,90,95,100,102,106,109,110,113,114,116,120, %U A235915 124,127,128,130,135,140,141 %N A235915 a(1) = 1, a(n) = a(n-1) + (digsum(a(n-1)) mod 5) + 1, digsum = A007953. %H A235915 Harvey P. Dale, <a href="/A235915/b235915.txt">Table of n, a(n) for n = 1..1000</a> %H A235915 Ben Paul Thurston, <a href="http://benpaulthurstonblog.blogspot.com/2014/01/low-kolmorogov-complexity-but-never.html">Low Kolmorogov complexity but never repeating series?</a> %e A235915 For n = 7, a(6) is 16, where the sum of the digits is 7, of which the remainder when divided by 5 is 2, then plus 1 is 3. Thus a(7) is a(6) + 3 or 19. %p A235915 a:= proc(n) a(n):= `if`(n=1, 1, a(n-1) +1 +irem( %p A235915 add(i, i=convert(a(n-1), base, 10)), 5)) end: %p A235915 seq(a(n), n=1..100); # _Alois P. Heinz_, Feb 15 2014 %t A235915 NestList[#+Mod[Total[IntegerDigits[#]],5]+1&,1,50] (* _Harvey P. Dale_, Nov 23 2023 *) %o A235915 (Python) %o A235915 def adddigits(i): %o A235915 s = str(i) %o A235915 t=0 %o A235915 for j in s: %o A235915 t = t+int(j) %o A235915 return t %o A235915 n = 1 %o A235915 a = [1] %o A235915 for i in range(0, 100): %o A235915 r = adddigits(n)%5+1 %o A235915 n = n+r %o A235915 a.append(n) %o A235915 print(a) %o A235915 (PARI) digsum(n)=d=eval(Vec(Str(n))); sum(i=1, #d, d[i]) %o A235915 a=vector(1000); a[1]=1; for(n=2, #a, a[n]=a[n-1]+digsum(a[n-1])%5+1); a \\ _Colin Barker_, Feb 14 2014 %Y A235915 Cf. A007953. %K A235915 nonn,base %O A235915 1,2 %A A235915 _Ben Paul Thurston_, Jan 16 2014