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.

A125887 a(1) = 1, a(n) = smallest positive number b not among a(1)..a(n-1) and not a multiple of 10 such that the first digit of b = the last digit of a(n-1).

Original entry on oeis.org

1, 11, 12, 21, 13, 31, 14, 41, 15, 51, 16, 61, 17, 71, 18, 81, 19, 91, 101, 102, 22, 23, 32, 24, 42, 25, 52, 26, 62, 27, 72, 28, 82, 29, 92, 201, 103, 33, 34, 43, 35, 53, 36, 63, 37, 73, 38, 83, 39, 93, 301, 104, 44, 45, 54, 46, 64, 47, 74, 48, 84, 49, 94, 401, 105, 55, 56, 65
Offset: 1

Views

Author

Zak Seidov, Dec 13 2006

Keywords

Comments

A dyslexic person might have trouble distinguishing this sequence from A125886!

Crossrefs

Programs

  • Haskell
    a125887 n = a125887_list !! (n-1)
    a125887_list = 1 : f '1' (filter ((> 0) . (`mod` 10)) [11..]) where
       f d zs = y : f (last $ show y) (xs ++ ys) where
           (xs, y:ys) = span ((/= d) . head . show) zs
    -- Reinhard Zumkeller, Jul 06 2011

A139079 Smallest number not yet in the sequence that contains the last digit of the previous term, with a(1) = 1.

Original entry on oeis.org

1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 101, 11, 12, 2, 21, 13, 3, 23, 31, 14, 4, 24, 34, 41, 15, 5, 25, 35, 45, 51, 16, 6, 26, 36, 46, 56, 61, 17, 7, 27, 37, 47, 57, 67, 71, 18, 8, 28, 38, 48, 58, 68, 78, 81, 19, 9, 29, 39, 49, 59, 69, 79, 89, 91, 102, 22, 32, 42, 52, 62, 72
Offset: 1

Views

Author

Keywords

Comments

This is a permutation of the positive integers.

Crossrefs

Programs

  • Maple
    a := [1] ; for n from 2 to 100 do ldig := op(-1,a) mod 10 ; for c from 1 do if c in a then ; else dgs := convert(c,base,10) ; if ldig in dgs then a := [op(a),c] ; break; fi; fi; od: od: print(a) ; # R. J. Mathar
  • Mathematica
    s={1};Do[k=1;Until[ContainsAny[IntegerDigits[k],Take[IntegerDigits[s[[-1]]],-1]]&&!MemberQ[s,k],k++];AppendTo[s,k],{m,71}];s (* James C. McMahon, Jun 28 2025 *)
Showing 1-2 of 2 results.