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.

Showing 1-2 of 2 results.

A066547 Let N = 123456789101112131415161718..., the concatenation of the natural numbers. a(n) is the n-digit number formed from the digits of N starting from the {n(n-1)/2 +1}th digit. Omit any leading zeros.

Original entry on oeis.org

1, 23, 456, 7891, 1112, 131415, 1617181, 92021222, 324252627, 2829303132, 33343536373, 839404142434, 4454647484950, 51525354555657, 585960616263646, 5666768697071727, 37475767778798081, 828384858687888990, 9192939495969798991, 101102103104105106, 107108109110111112113
Offset: 1

Views

Author

Amarnath Murthy, Dec 16 2001

Keywords

Examples

			1, 23, 456, 7891, 01112, 131415, 1617181, 92021222, 3... becomes 1, 23, 456, 7891, 1112, 131415, 1617181, 92021222, ...
		

Crossrefs

Programs

  • Mathematica
    d = Flatten[IntegerDigits /@ Range[90]]; Table[FromDigits[Take[d, {n(n + 1)/2 + 1, (n + 1)(n + 2)/2}]], {n, 0, 17}] (* Robert G. Wilson v, Nov 22 2004 *)
  • PARI
    N=[]; k=0; for(n=1,20, while(#NM. F. Hasler, May 08 2014

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Dec 18 2001

A007923 Lengths increase by 1, digits cycle through positive digits.

Original entry on oeis.org

1, 23, 456, 7891, 23456, 789123, 4567891, 23456789, 123456789, 1234567891, 23456789123, 456789123456, 7891234567891, 23456789123456, 789123456789123, 4567891234567891, 23456789123456789, 123456789123456789
Offset: 1

Views

Author

R. Muller

Keywords

References

  • C. Ashbacher, Some Problems Concerning the Smarandache Deconstructive Sequence, J. Recreational Mathematics, Vol. 29, No. 2, pages 82-84.
  • K. Atanassov, On the 4th Smarandache Problem, Notes on Number Theory and Discrete Mathematics, Sophia, Bulgaria, Vol. 5 (1999), No. 1, 33-35.

Crossrefs

Programs

  • Mathematica
    A007923[n_Integer] := Module[{result = 0},Do[ result += (Mod[(n*(n - 1)/2 + i - 1), 9] + 1) * 10^(n - i),{i, 1, n}   ]; result ]; Table[A007923[n],{n,18}] (* James C. McMahon, Dec 04 2023 *)
  • PARI
    a(n)=my(m=(n*(n+1)/2-1)%9); sum(k=0,n-1,10^k*((m-k)%9+1))

Formula

a(n) = (10^9+1) a(n-9) - 10^9 a(n-18), n>=18. - corrected by Michael Somos, Sep 28 2002
a(n) = Sum_{i=1..n} ((n*(n-1)/2+i-1 mod 9)+1)*10^(n-i). - Vedran Glisic, Apr 08 2011
a(n) = floor(10^(n*(n+1)/2)*123456789/999999999) - 10^n*floor(10^(n*(n-1)/2)*123456789/999999999). - Néstor Jofré, Jun 03 2017
Showing 1-2 of 2 results.