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.

A261333 a(n) = 10*(A256100(n+1)-1) + A007376(n+1), a simple variation of A065649.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 0, 21, 31, 41, 12, 51, 13, 61, 14, 71, 15, 81, 16, 91, 17, 101, 18, 111, 19, 22, 10, 32, 121, 42, 52, 62, 23, 72, 24, 82, 25, 92, 26, 102, 27, 112, 28, 122, 29, 33, 20, 43, 131, 53, 132, 63, 73, 83, 34, 93, 35, 103, 36, 113, 37
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 15 2015

Keywords

Comments

Permutation of the nonnegatve integers with inverse A261334.

Crossrefs

Cf. A256100, A007376, A261334 (inverse), A261335 (fixed points), A065649.

Programs

  • Haskell
    a261333 n = a261333_list !! n
    a261333_list = zipWith (+)
                   (map ((* 10) . subtract 1) a256100_list) a007376_list

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

A065648 a(0) = 1 and for n > 0: a(n) = number of indices 0 <= i <= n with A033307(i)=A033307(n), where A033307 is the sequence of decimal digits of Champernowne's constant 0.123456789101112131415...

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 4, 5, 2, 6, 2, 7, 2, 8, 2, 9, 2, 10, 2, 11, 2, 12, 2, 3, 3, 4, 13, 5, 6, 7, 3, 8, 3, 9, 3, 10, 3, 11, 3, 12, 3, 13, 3, 4, 4, 5, 14, 6, 14, 7, 8, 9, 4, 10, 4, 11, 4, 12, 4, 13, 4, 14, 4, 5, 5, 6, 15, 7, 15, 8, 15, 9, 10, 11, 5, 12, 5, 13, 5, 14, 5, 15, 5, 6, 6
Offset: 0

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Nov 09 2001

Keywords

Crossrefs

Programs

  • Haskell
    a065648 n = a065648_list !! n
    a065648_list = f (0 : a033307_list) $ take 10 $ repeat 1 where
       f (d:ds) counts = y : f ds (xs ++ (y + 1) : ys) where
                               (xs, y:ys) = splitAt d counts
    -- Reinhard Zumkeller, Aug 13 2015

Extensions

Definition and offset adjusted to follow a later change of A033307. - Reinhard Zumkeller, Aug 13 2015

A256379 Cumulative sum for n in base 10 when alternately adding and subtracting each digit of a particular value.

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 28, 36, 45, 44, 44, 43, 39, 36, 30, 25, 17, 10, 0, 2, 1, 1, 6, 8, 15, 19, 28, 34, 45, 42, 44, 39, 39, 38, 30, 27, 17, 12, 0, 4, 1, 7, 6, 6, 15, 17, 28, 32, 45, 40, 44, 37, 39, 30, 30, 29, 17, 14, 0, 6, 1, 9, 6, 16, 15, 15, 28, 30, 45, 38, 44, 35, 39, 28, 30, 17, 17, 16, 0, 8, 1, 11, 6, 18, 15, 29, 28, 28, 45, 36, 44, 33, 39, 26, 30
Offset: 1

Views

Author

Anthony Sand, Mar 27 2015

Keywords

Comments

For n = 1..9, the function is encountering each digit for the first time, therefore each is added to the cumulative sum. At n = 9, the sum is 45. At n = 10, the sum is 44, because the digit 1 is encountered for the second time and is therefore subtracted. At n = 11, the sum is again 44, because 1 is added and then subtracted. At n = 12, the sum is 43, because 1 is added and 2, encountered for the second time, is subtracted.
0 <= a(n) <= 45 for all n; a(n) = a(n mod 20) for odd n. - Danny Rorabaugh, Mar 31 2015

Crossrefs

Cf. A037123, A167232, A256100, A256851 (first differences).

Programs

  • Mathematica
    f[n_] := Block[{g, r = PadRight[Range@ 9, 10]}, g[x_] := Boole[OddQ /@ DigitCount[x]]; Total[r Boole[OddQ /@ Total[g /@ Range@ n]]]]; Array[f, 120] (* Michael De Vlieger, Mar 29 2015 *)
  • PARI
    { nmx=1000; b=10; dig=vector(b); for(i=1,b,dig[i]=1); n=0; s=0; while(n
    				

Formula

a(n) = Sum_{k=1..n} M(k), with M(k) := Sum_{m=1..r(k)} (-1)^(a(k,m) + 1)*digit(k,m), where a(k,m) = A256100(k,m) read as an array with row length r(k) (number of digits of k), and digit(k,m) is the m-th digit of k. - Wolfdieter Lang, Apr 08 2015

A256851 First-order differences for the cumulative sum of the digits of the integers when alternately adding and subtracting each digit of a particular value.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, -1, 0, -1, -4, -3, -6, -5, -8, -7, -10, 2, -1, 0, 5, 2, 7, 4, 9, 6, 11, -3, 2, -5, 0, -1, -8, -3, -10, -5, -12, 4, -3, 6, -1, 0, 9, 2, 11, 4, 13, -5, 4, -7, 2, -9, 0, -1, -12, -3, -14, 6, -5, 8, -3, 10, -1, 0, 13, 2, 15, -7, 6, -9, 4, -11, 2, -13, 0, -1, -16, 8, -7, 10, -5, 12, -3, 14, -1, 0, 17, -9, 8, -11, 6, -13, 4, -15
Offset: 1

Views

Author

Anthony Sand, Apr 11 2015

Keywords

Comments

The sequence was suggested by Wolfdieter Lang and represents a(n) - a(n-1) for the sequence A256379, which alternately adds and subtracts each digit of a particular value in the integers.

Examples

			a(0) = 0, therefore a(1) - a(0) = 1 - 0 = 1.
For n = 1..9, the function is encountering each digit for the first time, therefore a(9) = 45.
For n = 10, the function encounters the digit 1 for the second time and subtracts it. Therefore a(10) = 44 and a(10) - a(9) = -1.
		

Crossrefs

Programs

  • PARI
    { nmx=1000; b=10; dig=vector(b); si=0; for(i=1,b,dig[i]=1); n=0; s=0; while(n
    				

Formula

a(n) = Sum_{m=1..r(n)} (-1)^(a(n,m) + 1)*digit(n,m), where a(n,m) = A256100(n,m) read as an array with row length r(n) (number of digits of n), and digit(n,m) is the m-th digit of n (see the formula for A256379). - Wolfdieter Lang, Apr 15 2015
Showing 1-5 of 5 results.