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-5 of 5 results.

A007376 The almost-natural numbers: write n in base 10 and juxtapose digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 2, 8, 2, 9, 3, 0, 3, 1, 3, 2, 3, 3, 3, 4, 3, 5, 3, 6, 3, 7, 3, 8, 3, 9, 4, 0, 4, 1, 4, 2, 4, 3, 4, 4, 4, 5, 4, 6, 4, 7, 4, 8, 4, 9, 5, 0, 5, 1, 5, 2, 5, 3, 5, 4, 5, 5, 5, 6, 5, 7
Offset: 0

Views

Author

Keywords

Comments

Also called the Barbier infinite word.
This is an example of a non-morphic sequence.
a(n) = A162711(n,1); A136414(n) = 10*a(n) + a(n+1). - Reinhard Zumkeller, Jul 11 2009
a(A031287(n)) = 0, a(A031288(n)) = 1, a(A031289(n)) = 2, a(A031290(n)) = 3, a(A031291(n)) = 4, a(A031292(n)) = 5, a(A031293(n)) = 6, a(A031294(n)) = 7, a(A031295(n)) = 8, a(A031296(n)) = 9. - Reinhard Zumkeller, Jul 28 2011
May be regarded as an irregular table in which the n-th row lists the digits of n. - Jason Kimberley, Dec 07 2012
The digits of the integer n start at index A117804(n). The digit a(n) at index n belongs to the number A100470(n). - M. F. Hasler, Oct 23 2019
See also the Copeland-Erdős constant A033308, equivalent using primes instead of all numbers. - M. F. Hasler, Oct 24 2019
Decimal expansion of Sum_{k>=1} k/10^(A058183(k) + 1). - Stefano Spezia, Nov 30 2022

References

  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, pp. 114, 336.
  • R. Honsberger, Mathematical Chestnuts from Around the World, MAA, 2001; see p. 163.
  • M. Kraitchik, Mathematical Recreations. Dover, NY, 2nd ed., 1953, p. 49.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987, p. 26.

Crossrefs

Considered as a sequence of digits, this is the same as the decimal expansion of the Champernowne constant, A033307. See that entry for a formula for a(n), further references, etc.
Cf. A054632 (partial sums), A023103.
Cf. A193428, A256100, A001477 (the nonnegative integers), A117804, A100470.
Tables in which the n-th row lists the base b digits of n: A030190 and A030302 (b=2), A003137 and A054635 (b=3), A030373 (b=4), A031219 (b=5), A030548 (b=6), A030998 (b=7), A031035 and A054634 (b=8), A031076 (b=9), this sequence and A033307 (b=10). - Jason Kimberley, Dec 06 2012
Row lengths in A055642.
For primes here see A071620. See A007908 for a very similar sequence.

Programs

  • Haskell
    a007376 n = a007376_list !! (n-1)
    a007376_list = concatMap (map (read . return) . show) [0..] :: [Int]
    -- Reinhard Zumkeller, Nov 11 2013, Dec 17 2011, Mar 28 2011
    
  • Magma
    &cat[Reverse(IntegerToSequence(n)):n in[0..31]]; // Jason Kimberley, Dec 07 2012
    
  • Maple
    c:=proc(x,y) local s: s:=proc(m) nops(convert(m,base,10)) end: if y=0 then 10*x else x*10^s(y)+y: fi end: b:=proc(n) local nn: nn:=convert(n,base,10):[seq(nn[nops(nn)+1-i],i=1..nops(nn))] end: A:=0: for n from 1 to 75 do A:=c(A,n) od: b(A); # c concatenates 2 numbers while b converts a number to the sequence of its digits - Emeric Deutsch, Jul 27 2006
    #alternative
    A007376 := proc(n) option remember ; local aprev, dOld,N ; if n <=9 then RETURN([n,n,1]) ; else aprev := A007376(n-1) ; dOld := op(3,aprev) ; N := op(2,aprev) ; if dOld < A055642(N) then RETURN([op(-dOld-1,convert(N,base,10)),N,dOld+1]) ; else RETURN([op(-1,convert(N+1,base,10)),N+1,1]) ; fi ; fi ; end: # R. J. Mathar, Jan 21 2008
  • Mathematica
    Flatten[ IntegerDigits /@ Range@ 57] (* Or *)
    almostNatural[n_, b_] := Block[{m = 0, d = n, i = 1, l, p}, While[m <= d, l = m; m = (b - 1) i*b^(i - 1) + l; i++]; i--; p = Mod[d - l, i]; q = Floor[(d - l)/i] + b^(i - 1); If[p != 0, IntegerDigits[q, b][[p]], Mod[q - 1, b]]]; Array[ almostNatural[#, 10] &, 105] (* updated Jun 29 2014 *)
    With[{nn=120},RealDigits[N[ChampernowneNumber[],nn],10,nn]][[1]] (* Harvey P. Dale, Mar 13 2018 *)
  • PARI
    for(n=0,90,v=digits(n);for(i=1,#v,print1(v[i]", "))) \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    apply( A007376(n)={for(k=1,n, k*10^k>n&& return(digits(n\k)[n%k+1]); n+=10^k)}, [0..200]) \\ M. F. Hasler, Nov 03 2019
    
  • Python
    A007376_list = [int(d) for n in range(10**2) for d in str(n)] # Chai Wah Wu, Feb 04 2015

Extensions

Extended to a(0) = 0 by M. F. Hasler, Oct 23 2019

A193431 Put the natural numbers together without spaces and read them three at a time advancing one space each time.

Original entry on oeis.org

123, 234, 345, 456, 567, 678, 789, 891, 910, 101, 11, 111, 112, 121, 213, 131, 314, 141, 415, 151, 516, 161, 617, 171, 718, 181, 819, 192, 920, 202, 21, 212, 122, 222, 223, 232, 324, 242, 425, 252, 526, 262, 627, 272, 728, 282, 829, 293, 930, 303, 31, 313
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 28 2011

Keywords

Crossrefs

Programs

  • Haskell
    a193431 n = a193431_list !! (n-1)
    a193431_list = f a007376_list where
       f (x:xs'@(x':x'':xs)) = 10*(10*x + x') + x'' : f xs'
  • Mathematica
    Module[{nn=50,d},d=Flatten[IntegerDigits/@Range[nn]];FromDigits/@ Partition[ d,3,1]] (* Harvey P. Dale, Nov 16 2021 *)

Formula

a(n) = 10 * (10 * A007376(n) + A007376(n+1)) + A007376(n+2).

A193493 Put the natural numbers together without spaces and read them five at a time advancing one space each time.

Original entry on oeis.org

12345, 23456, 34567, 45678, 56789, 67891, 78910, 89101, 91011, 10111, 1112, 11121, 11213, 12131, 21314, 13141, 31415, 14151, 41516, 15161, 51617, 16171, 61718, 17181, 71819, 18192, 81920, 19202, 92021, 20212, 2122, 21222, 12223, 22232, 22324, 23242, 32425
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 28 2011

Keywords

Crossrefs

Programs

  • Haskell
    a193493 n = a193493_list !! (n-1)
    a193493_list = f a007376_list where
       f xs'@(x:xs) = ((foldl (\u v -> 10*u + v) 0) $ take 5 xs') : f xs
  • Mathematica
    nn=40;With[{tbl=Flatten[IntegerDigits/@Range[nn]]},Table[FromDigits[ Take[tbl,{n,n+4}]],{n,nn}]](* Harvey P. Dale, Aug 10 2011 *)

Formula

a(n) = Sum (A007376(n+k)*10^(4-k): 0 <= k <= 4).

A162711 Triangle read by rows: T(n,k) = value of the string of length k beginning at position n in the concatenation of natural numbers in decimal representation, 1<=k<=n.

Original entry on oeis.org

1, 2, 23, 3, 34, 345, 4, 45, 456, 4567, 5, 56, 567, 5678, 56789, 6, 67, 678, 6789, 67891, 678910, 7, 78, 789, 7891, 78910, 789101, 7891011, 8, 89, 891, 8910, 89101, 891011, 8910111, 89101112, 9, 91, 910, 9101, 91011, 910111, 9101112, 91011121, 910111213
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 11 2009

Keywords

Comments

A055642(T(n,k)) <= k;
T(n,1)=A007376(n); T(n,k)=10*T(n,k-1)+A007376(k), 1
T(n,2)=A136414(n) for n>1.

Crossrefs

Cf. A224841 where n is the position of the last digit of the string.

Programs

  • Haskell
    import Data.List (inits, tails)
    a162711 n k = a162711_tabl !! (n-1) !! (k-1)
    a162711_row n = a162711_tabl !! (n-1)
    a162711_tabl = map (map (read . concatMap show) . tail . inits) $
                   zipWith take [1..] $ tails a007376_list :: [[Integer]]
    -- Reinhard Zumkeller, Nov 11 2013

A193492 Put the natural numbers together without spaces and read them four at a time advancing one space each time.

Original entry on oeis.org

1234, 2345, 3456, 4567, 5678, 6789, 7891, 8910, 9101, 1011, 111, 1112, 1121, 1213, 2131, 1314, 3141, 1415, 4151, 1516, 5161, 1617, 6171, 1718, 7181, 1819, 8192, 1920, 9202, 2021, 212, 2122, 1222, 2223, 2232, 2324, 3242, 2425, 4252, 2526, 5262, 2627, 6272
Offset: 1

Author

Reinhard Zumkeller, Jul 28 2011

Keywords

Crossrefs

Programs

  • Haskell
    a193492 n = a193492_list !! (n-1)
    a193492_list = f a007376_list where
       f xs'@(x:xs) = ((foldl (\u v -> 10*u + v) 0) $ take 4 xs') : f xs
  • Mathematica
    FromDigits/@Partition[Flatten[IntegerDigits/@Range[30]],4,1] (* Harvey P. Dale, Aug 19 2012 *)

Formula

a(n) = 10*(10*(10*A007376(n)+A007376(n+1))+A007376(n+2))+A007376(n+3).
Showing 1-5 of 5 results.