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

A361751 a(n) is the number of decimal digits in A098129(n) and A300517(n).

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 28, 36, 45, 65, 87, 111, 137, 165, 195, 227, 261, 297, 335, 375, 417, 461, 507, 555, 605, 657, 711, 767, 825, 885, 947, 1011, 1077, 1145, 1215, 1287, 1361, 1437, 1515, 1595, 1677, 1761, 1847, 1935, 2025, 2117, 2211, 2307, 2405, 2505, 2607, 2711, 2817, 2925
Offset: 1

Views

Author

David Cleaver, Mar 23 2023

Keywords

Examples

			For n = 4, a(4) = 10, because A098129(4) = 1223334444.
For n = 10, a(10) = 65, because A098129(10) = 12233344445555566666677777778888888899999999910101010101010101010.
		

Crossrefs

Partial sums of A110803.

Programs

  • Maple
    a:= proc(n) a(n):= `if`(n<1, 0, a(n-1)+n*length(n)) end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Mar 23 2023
  • PARI
    a(n) = {my(x=logint(n,10)+1);x*n*(n+1)/2 - ((100^x-1)/99 - (10^x-1)/9)/2}
    vector(100, i, a(i))
    
  • Python
    def a(n):
        d = len(str(n))
        m = 10**d
        return d*n*(n+1)//2 - ((m-11)*m + 10)//198
    print([a(n) for n in range(1, 55)]) # Michael S. Branicky, Mar 24 2023 modified Mar 29 2023
    
  • Python
    # faster for generating initial segment of sequence
    from itertools import count, islice
    def agen(s=0): yield from (s:=s+n*len(str(n)) for n in count(1))
    print(list(islice(agen(), 60))) # Michael S. Branicky, Mar 24 2023

Formula

a(n) = A055642(A098129(n)).
From Alois P. Heinz, Mar 23 2023: (Start)
a(n) = Sum_{j=1..n} j*A055642(j).
a(n) = Sum_{j=1..n} A110803(j). (End)
a(n) = Sum_{k=0..floor(log_10(n))} (n*(n+1) - 10^k*(10^k-1))/2. - Andrew Howroyd, Mar 24 2023
a(n) = k*n*(n+1)/2 - ((100^k-1)/99 - (10^k-1)/9)/2, where k = floor(log_10(n))+1. - David Cleaver, Mar 25 2023

A380230 a(n) = n*A070939(n).

Original entry on oeis.org

0, 1, 4, 6, 12, 15, 18, 21, 32, 36, 40, 44, 48, 52, 56, 60, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342
Offset: 0

Views

Author

Paolo Xausa, Jan 17 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n*BitLength[n], {n, 0, 100}]

A337843 a(n) is n + the number of digits in the decimal expansion of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
Offset: 0

Views

Author

Jaroslav Krizek, Sep 25 2020

Keywords

Comments

a(n) is an increasing injective sequence that is not surjective.
a(n) is also the sequence of numbers m that can be written as (m + number of digits of m) for some m >= 0, complement of numbers from A081552(n) for n > 1.
Sequence is not the same as A101947, first different term is a(77) = 79.

Examples

			a(10) = 10 + 2 = 12.
		

Crossrefs

Cf. A110803 (n * the number of digits in the decimal expansion of n).

Programs

  • Magma
    [1] cat [n + #Intseq(n): n in [1..100]];
    
  • Mathematica
    a[0] = 1; a[n_] := n + IntegerLength[n]; Array[a, 100, 0] (* Amiram Eldar, Sep 25 2020 *)
  • PARI
    a(n) = if (n==0, 1, n + #digits(n)); \\ Michel Marcus, Sep 26 2020

Formula

a(n) = n + A055642(n).
Showing 1-3 of 3 results.