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.

A179801 Count of times n appears in number created by stringing together previous n-1 integers.

Original entry on oeis.org

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

Views

Author

Dominick Cancilla, Jul 27 2010

Keywords

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

Examples

			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).
		

Programs

  • 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 *)
  • PHP
    for($x = 1; $x <= 1000; $x++) {
    echo "$x: " . substr_count($running, $x) ."
    " ; $running = $running . $x ; }