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.

A247083 a(n) = 0 for n <= 0: Starting with n=1, a(n) = 1 + the sum of the digital sums of a(0) through a(n-3).

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 4, 6, 9, 13, 19, 28, 32, 42, 52, 57, 63, 70, 82, 91, 98, 108, 118, 135, 144, 154, 163, 172, 182, 192, 202, 213, 225, 229, 235, 244, 257, 267, 277, 291, 306, 322, 334, 343, 350, 360, 370, 378, 387, 397, 415, 433, 452, 462, 472, 483, 495, 508, 523, 541, 554, 564, 574
Offset: 0

Views

Author

Bob Selcoe, Nov 17 2014

Keywords

Examples

			a(10) = 28 because (0+1+1+2+3+5+8+1+3+2+1) + 1 = 28.
		

Crossrefs

Programs

  • Maple
    A247083 := proc(n)
        option remember;
        if n <= 0 then
            0;
        else
            1+add(digsum(procname(i)),i=0..n-3) ;
        end if;
    end proc: # R. J. Mathar, Dec 02 2014
  • Mathematica
    a247083[n_Integer] := Module[{t = Table[1, {i, n + 1}], j, k},
    t[[1]] = 0; j = 5; While[j <= Length[t], t[[j]] = Sum[Plus @@ IntegerDigits[t[[k]]], {k, 1, j - 3}]; j++]; Drop[t, {2}]]; a247083[63] (* Michael De Vlieger, Nov 26 2014 *)
  • PARI
    v=[0];n=1;while(n<100,s=0;for(i=1,#v-2,s+=sumdigits(v[i]));v=concat(v,1+s);n++);v \\ Derek Orr, Nov 26 2014
  • Sage
    n=100
    a=[0,1,1]
    for i in [3..n]:
        a.append(1+sum(sum(a[j].digits()) for j in [1..(i-3)]))
    a # Tom Edgar, Nov 25 2014
    

Formula

a(n) = 1 + Sum_{k=0..n-3} digsum(a(k)).
a(n) = a(n-1) + A007953(a(n-3)).