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.

A029503 Numbers n such that n divides the (right) concatenation of all numbers <= n written in base 10 (most significant digit on right).

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 101, 107, 153, 167, 277, 414, 486, 858, 1659, 2894, 3093, 4299, 4842, 8838, 22734, 31869, 69492, 361057, 429786, 462018, 859002, 1170801, 1334667, 1663923, 6143512, 6162396, 6212646, 7034661, 8164443
Offset: 1

Views

Author

Keywords

Comments

This sequence differs from A061939 in that all least significant zeros are kept during concatenation.
Right concatenation, reverse order.
No more terms < 10^7. - Lars Blomberg, Oct 06 2011

Examples

			n = 22 is not a term since 12345678901112131415161718191021222 is not divisible by 22.
See A029495 for other examples.
		

Crossrefs

Programs

  • Mathematica
    b = 10; c = {}; Select[Range[10^4], Divisible[FromDigits[c = Join[c, Reverse[IntegerDigits[#, b]]], b], #] &] (* Robert Price, Mar 12 2020 *)
  • PARI
    isok(n) = my(s = ""); for (k=1, n, sk = digits(k); forstep (j=#sk, 1, -1, s = concat(s, sk[j]))); (eval(s) % n) == 0; \\ Michel Marcus, Jan 28 2017

Extensions

Edited and updated by Larry Reeves (larryr(AT)acm.org), Apr 12 2002
Additional comments and more terms from Larry Reeves (larryr(AT)acm.org), May 25 2001
a(25)-a(35) from Lars Blomberg, Oct 06 2011

A240919 Sequence whose n-th term is the sum of the first n digits in the concatenation of the base 10-representation of the sequence.

Original entry on oeis.org

9, 10, 10, 11, 11, 12, 13, 14, 15, 16, 18, 19, 22, 23, 27, 28, 33, 34, 40, 41, 49, 50, 59, 61, 63, 65, 68, 70, 77, 79, 87, 90, 93, 96, 100, 104, 104, 108, 109, 113, 122, 127, 127, 132, 141, 147, 148, 154, 157, 163
Offset: 1

Views

Author

Anthony Zajac, Aug 02 2014

Keywords

Comments

This is the unique sequence in base 10 with this property, aside from the trivial case of beginning this sequence with a(k)=0 for the first k terms.
The only possible nonzero values for a(1) and a(2) are 9 and 10, respectively. This is because a(1) must be a 1-digit number, while a(2) must equal the sum of its own first digit and a(1).
Likewise, for the analogous sequence in a different base b, the first two terms must be b-1 and b.
Essentially the same as A107975. - R. J. Mathar, Jul 07 2023

Examples

			a(5) is the sum of the first 5 digits of "91010111112..." = 9 + 1 + 0 + 1 + 0 = 11.
		

Crossrefs

Programs

  • Mathematica
    a240919 = {};
    Do[
    Which[Length[a240919] <= 0, AppendTo[a240919, 9],
      Length[a240919] == 1,
      AppendTo[a240919,
       First[First[a240919] +
         IntegerDigits[First[Plus[a240919, a240919]]]]],
      True, AppendTo[a240919,
       Total[Take[Flatten[Map[IntegerDigits, a240919]], n]]]], {n,
      10000}]; TableForm[
    Transpose[
      List[Range[Length[a240919]],
       a240919]]] (* Michael De Vlieger, Aug 05 2014 *)
  • PARI
    lista(nn) = {v = vector(nn); v[1] = 9; v[2] = 10; vd = [9, 1, 0]; print1(v[1], ", ", v[2], ", "); for (n=3, nn, v[n] = sum(k=1, n, vd[k]); vd = concat(vd, digits(v[n])); print1(v[n], ", "););} \\ Michel Marcus, Aug 14 2014
Showing 1-2 of 2 results.