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.

A225673 Number of integers whose sum of substrings = n.

This page as a plain text file.
%I A225673 #12 May 16 2013 16:25:05
%S A225673 1,2,3,4,5,6,7,8,9,9,9,7,7,5,5,3,3,1,1,0,1,1,2,1,2,1,2,1,2,1,1,1,2,2,
%T A225673 3,2,3,2,3,2,3,1,2,2,3,3,4,3,4,3,4,3,3,2,3,3,4,4,5,4,5,4,5,3,4,3,4,4,
%U A225673 5,5,6,5,6,5,5,4,5,4,5,5,6,6,7,6,7,5,6
%N A225673 Number of integers whose sum of substrings = n.
%C A225673 20 is the first number that is not the sum of substrings of any positive integer. There are 203 such numbers < 10000, and they disproportionately begin with 2 and 3 -- 123 of them and 70 of them, respectively.
%H A225673 Christian N. K. Anderson, <a href="/A225673/b225673.txt">Table of n, a(n) for n = 1..10000</a>
%H A225673 Christian N. K. Anderson, <a href="/A225673/a225673.txt">Table of n, a(n), and all integer solutions.</a>
%H A225673 Christian N. K. Anderson, <a href="/A225673/a225673.gif">Ulam Spiral</a> of n = 1..10000, color-coded by their value in this sequence.
%e A225673 For a(59)=5, the five solutions are:
%e A225673 136 (because 13+36+1+3+6=59),
%e A225673 140 (because 14+40+1+4+0=59),
%e A225673 317 (because 31+17+3+1+7=59),
%e A225673 321 (because 32+21+3+2+1=59), and
%e A225673 502 (because 50+02+5+0+2=59).
%o A225673 (R) table(factor(sapply(1:900,function(n) { tot=0; s=as.character(n); len=nchar(s); for(i in 1:len) for(j in i:len) tot=tot+as.numeric(substr(s,i,j)); tot-n } ),levels=1:100))
%Y A225673 Cf. A071062, A007953.
%K A225673 nonn,base
%O A225673 1,2
%A A225673 _Christian N. K. Anderson_ and _Kevin L. Schwartz_, May 11 2013