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.

A262356 a(1) = 1; for n > 1, let s denote the digit-string of a(n-1) with the first digit omitted. Then a(n) is the smallest number not yet present which starts with s, omitting leading zeros.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20, 13, 30, 14, 40, 15, 50, 16, 60, 17, 70, 18, 80, 19, 90, 21, 100, 22, 23, 31, 101, 102, 24, 41, 103, 32, 25, 51, 104, 42, 26, 61, 105, 52, 27, 71, 106, 62, 28, 81, 107, 72, 29, 91, 108, 82, 200, 33, 34, 43, 35, 53
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 19 2015

Keywords

Comments

A simplified variation of A262282.
A permutation of the positive integers with inverse A262358;
A262363 and A262371 give the primes and where they occur: A262363(n)=a(A262371(n)).
a(A262393(n)) = A262390(n).
It seems clear that every number will appear, but it would be nice to have a formal proof. - N. J. A. Sloane, Sep 20 2015

Crossrefs

Cf. A262283, A262282, A262358 (inverse), A262360 (fixed points), A262374 (binary counterpart), A262363 (primes), A262371, A000030, A262390 (starting with 1), A262393.

Programs

  • Haskell
    import Data.List (isPrefixOf, delete, genericIndex)
    import Data.Set (singleton, notMember, insert)
    a262356 n = a262356_list !! (n-1)
    a262356_list = 1 : f "" (singleton "1") where
       f xs s = (read ys :: Int) : f (dropWhile (== '0') ys') (insert ys s)
         where ys@(_:ys') = head
                 [vs | vs <- zss, isPrefixOf xs vs, notMember vs s]
       zss = map show [2..]
  • Mathematica
    a[1] = 1; a[n_] := a[n] = Module[{s, k}, s = Rest[IntegerDigits[a[n - 1]]] //. {(0).., d__} :> {d}; For[k = 2, True, k++, If[FreeQ[Array[a, n - 1], k], If[s == {0}, Return[k], If[IntegerDigits[k][[1 ;; Length[s]]] == s, Return[k]]]]]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 100}] (* Jean-François Alcover, Mar 12 2019 *)

A262377 Primes in A262358.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 31, 43, 47, 61, 67, 71, 17, 19, 79, 89, 23, 83, 101, 107, 103, 109, 113, 97, 29, 37, 41, 53, 127, 137, 157, 167, 251, 257, 269, 281, 419, 359, 431, 353, 439, 59, 73, 163, 313, 331, 373, 659, 709, 761, 701, 857, 877, 883, 941, 971, 977
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 20 2015

Keywords

Comments

a(n) = A262358(A262378(n));
a permutation of the prime numbers, cf. A262363.

Crossrefs

Programs

  • Haskell
    a262377 n = a262377_list !! (n-1)
    a262377_list = filter ((== 1) . a010051') $ map a262358 [1..]

A262371 Positions of prime numbers in A262356.

Original entry on oeis.org

2, 3, 5, 7, 11, 14, 22, 26, 31, 32, 33, 36, 37, 44, 48, 53, 55, 62, 64, 67, 68, 70, 74, 82, 96, 100, 110, 111, 114, 127, 131, 141, 146, 163, 176, 179, 187, 200, 211, 216, 227, 228, 232, 235, 251, 260, 267, 268, 274, 281, 283, 287, 289, 292, 294, 299, 314
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 20 2015

Keywords

Comments

In other words, the n-th prime appears in A262356 at position a(n). - N. J. A. Sloane, Sep 29 2015
A262363(n) = A262356(a(n)).

Crossrefs

Programs

  • Haskell
    a262371 n = a262371_list !! (n-1)
    a262371_list = filter ((== 1) . a010051' . a262356) [1..]
Showing 1-3 of 3 results.