login
A179801
Count of times n appears in number created by stringing together previous n-1 integers
1
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1
OFFSET
1,1
COMMENTS
2 first appears for n=121; 3 first appears for n=1011; 4 first appears for n=1121; 5 first appears for n=10111. - Harvey P. Dale, Jul 22 2013
EXAMPLE
a(6)=0 because stringing together the first 5 integers gives the number "12345" and 6 does not appear in 12345.
a(12)=1 because stringing together the first 11 integers gives "1234567891011" and 12 appears once in 1234567891011 (right at the beginning).
MATHEMATICA
Table[idn=IntegerDigits[n]; fid=Flatten[IntegerDigits/@Range[n-1]]; Count[ Partition[ fid, Length[idn], 1], idn], {n, 0, 110}] (* Harvey P. Dale, Jul 22 2013 *)
Table[SequenceCount[Flatten[IntegerDigits/@Range[n-1]], IntegerDigits[n]], {n, 120}] (* Harvey P. Dale, Apr 16 2023 *)
PROG
(PHP) for($x = 1; $x <= 1000; $x++) {
echo "$x: " . substr_count($running, $x) ."<br />" ;
$running = $running . $x ;
}
CROSSREFS
Sequence in context: A355454 A107846 A354983 * A374093 A353474 A065202
KEYWORD
nonn,base
AUTHOR
Dominick Cancilla, Jul 27 2010
STATUS
approved