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.

A226030 Smallest m such that A226029(m) = n.

Original entry on oeis.org

1, 3, 15, 46, 4, 448, 1415, 13, 14143, 44722, 14, 447215, 45, 4472137, 14142137, 140, 141421357, 447213596, 1414213563, 4472135956, 14142135625, 44721359551, 141421356238, 447213595501, 1414213562374, 4472135955001, 14142135623732, 44721359549997, 141421356237311, 447213595499959
Offset: 1

Views

Author

Reinhard Zumkeller, May 26 2013

Keywords

Comments

a(39) = 44. - Michel Marcus, Jan 26 2022
Let k = ceiling(sqrt(2*10^m)). Then some terms are of the form k or k + 1. - David A. Corneth, Jan 27 2022

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a226030 = (+ 1) . fromJust . (`elemIndex` a226029_list)
    
  • PARI
    nb(n) = {my(x=n*(n-1)/2+1, y=n*(n+1)/2, nx=#Str(x), ny=#Str(y), s=0); for (i=nx, ny, if (i==nx, if (i==ny, s+=(y+1-x)*i, s+=(10^i-x)*i), if (i==ny, s+=(y+1-10^(i-1))*i, s+=i*(10^(i+1)-10^i+1)););); s;} \\ A182402
    a(n) = my(k=1, last=nb(k), new=nb(k+1)); while (new-last !=n, k++; last=new; new=nb(k+1)); k; \\ Michel Marcus, Jan 26 2022

Formula

A226029(a(n)) = n and A226029(m) <> n for m < a(n).

Extensions

a(12)-a(18) from Michel Marcus, Jan 26 2022
More terms from David A. Corneth, Jan 26 2022

A182402 Total number of digits in n-th row of a triangle formed by the positive integers.

Original entry on oeis.org

1, 2, 3, 5, 10, 12, 14, 16, 18, 20, 22, 24, 26, 34, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 171, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220, 224, 228, 232
Offset: 1

Views

Author

Dave Durgin, Jun 19 2012

Keywords

Comments

Sequence is nonlinear at each decade transition; for example, row-5 transitions from single-digit (7) to double-digit (10) where sequence jumps (3) to (5); row-14 transitions from 2-digit (92) to 3-digit (105) where sequence jumps from (26) to (34).
The rows of nonlinearity are given by A068092. - Jon Perry, May 26 2013

Examples

			1; .................... (row 1 contains 1 digit)
2,   3; ............... (row 2 contains 2 digits)
4,   5,  6; ........... (row 3 contains 3 digits)
7,   8,  9, 10; ....... (row 4 contains 5 digits)
11, 12, 13, 14, 15; ... (row 5 contains 10 digits)
		

Crossrefs

Cf. A055642, A226029 (first differences).
Cf. A068092.

Programs

  • Haskell
    a182402 n = a182402_list !! (n-1)
    a182402_list = map (sum . map a055642) $ t 1 [1..] where
       t i xs = ys : t (i + 1) zs where
         (ys, zs) = splitAt i xs
    -- Reinhard Zumkeller, May 26 2013
    
  • Mathematica
    f[n_] := Length@ Flatten[ IntegerDigits[ Range[n (n - 1)/2 + 1, n (n + 1)/2]]]; Array[f, 58] (* Robert G. Wilson v, Sep 04 2013 *)
  • PARI
    a(n) = {my(x=n*(n-1)/2+1, y=n*(n+1)/2, nx=#Str(x), ny=#Str(y), s=0); for (i=nx, ny, if (i==nx, if (i==ny, s+=(y+1-x)*i, s+=(10^i-x)*i), if (i==ny, s+=(y+1-10^(i-1))*i, s+=i*(10^(i+1)-10^i+1)););); s;} \\ Michel Marcus, Jan 26 2022
    
  • Python
    def a(n): return len("".join(str(i) for i in range(n*(n+1)//2+1, (n+1)*(n+2)//2+1)))
    print([a(n) for n in range(58)]) # Michael S. Branicky, Jan 26 2022

Formula

a(n) = A058183(A000217(n)) - A058183(A000217(n-1)), n >= 2. - Omar E. Pol, Jun 25 2012

Extensions

Better definition from Omar E. Pol, Jun 25 2012
Showing 1-2 of 2 results.