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.

Previous Showing 11-20 of 23 results. Next

A108965 Numbers n with property that for each digit in n there is another digit in n differing from it by 1.

Original entry on oeis.org

10, 12, 21, 23, 32, 34, 43, 45, 54, 56, 65, 67, 76, 78, 87, 89, 98, 100, 101, 102, 110, 112, 120, 121, 122, 123, 132, 201, 210, 211, 212, 213, 221, 223, 231, 232, 233, 234, 243, 312, 321, 322, 323, 324, 332, 334, 342, 343, 344, 345, 354, 423, 432, 433, 434, 435, 443, 445, 453, 454, 455, 456, 465
Offset: 1

Views

Author

Eric Angelini, Jul 26 2005

Keywords

Crossrefs

This is not A033075. Cf. A134336.

Extensions

Corrected by Rick L. Shepherd, Oct 21 2007

A252490 Numbers whose set of digits is simply connected, with 9 and 0 considered as neighbors.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 21, 22, 23, 32, 33, 34, 43, 44, 45, 54, 55, 56, 65, 66, 67, 76, 77, 78, 87, 88, 89, 90, 98, 99, 100, 101, 102, 109, 110, 111, 112, 120, 121, 122, 123, 132, 190, 201, 210, 211, 212, 213, 221, 222, 223, 231, 232, 233, 234, 243, 312, 321, 322, 323, 324, 332, 333, 334, 342, 343, 344, 345, 354, 423, 432
Offset: 1

Views

Author

M. F. Hasler, Dec 24 2014

Keywords

Comments

The set of digits must consist of a single run without "holes", but for a cyclic topology where 9 and 0 are seen as neighbors.
A superset of A134336. Namely, numbers in A134336 or such that the complement of their digits in {0,...,9} satisfies the criterion of A134336.

Crossrefs

Cf. A032981, A050278, A033075 (a subsequence), A010785, A108965, A134336 (a subsequence).

Programs

  • PARI
    is(n)=vecmax(if((d=Set(digits(n)))[1],d,d=setminus(vector(9,i,i),d)))-vecmin(d)==#d-1

A048409 Numbers whose consecutive digits differ by 7.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 18, 29, 70, 81, 92, 181, 292, 707, 818, 929, 1818, 2929, 7070, 8181, 9292, 18181, 29292, 70707, 81818, 92929, 181818, 292929, 707070, 818181, 929292, 1818181, 2929292, 7070707, 8181818, 9292929, 18181818, 29292929
Offset: 0

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

Crossrefs

A182781 Number of n-digit terms in A048398.

Original entry on oeis.org

4, 4, 2, 1, 12, 20, 35, 28, 80, 114, 211, 228, 736, 1214, 2101, 2536, 7799, 13830, 22107, 27265, 82611, 144324, 259260, 354029, 901774, 1651718, 2913981, 3913728, 11048656, 19782855, 33483206, 49533124
Offset: 1

Views

Author

Zak Seidov, Feb 01 2011

Keywords

Comments

Also, number of n-digit primes in A033075.
Appears to be strictly increasing for n >= 8. - Chai Wah Wu, May 31 2017

Crossrefs

Programs

  • Maple
    A182781aux := proc(Lhig,n) local lsb,a ; if n = 0 then if isprime(Lhig) then    1; else 0; end if; else a := 0 ; lsb := Lhig mod 10 ; if lsb > 0 then a := a + procname(10*Lhig+lsb-1,n-1) ; end if; if lsb < 9 then a := a + procname(10*Lhig+lsb+1,n-1) ; end if; a; end if; end proc:
    A182781 := proc(n) if n = 1 then 4; else a := 0 ; for l from 1 to 9 do a := a + A182781aux(l,n-1) ; end do: a ; end if; end proc: # R. J. Mathar, Feb 01 2011

Extensions

a(22)-a(24) from Chai Wah Wu, May 31 2017
a(25)-a(32) from Chai Wah Wu, Jun 05 2017

A207954 Palindromes with consecutive digits that differ exactly by 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 101, 121, 212, 232, 323, 343, 434, 454, 545, 565, 656, 676, 767, 787, 878, 898, 989, 10101, 12121, 12321, 21012, 21212, 23232, 23432, 32123, 32323, 34343, 34543, 43234, 43434, 45454, 45654, 54345, 54545, 56565, 56765, 65456, 65656
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 21 2012

Keywords

Crossrefs

Cf. A136522; intersection of A033075 and A002113.

Programs

  • Haskell
    a207954 n = a207954_list !! (n-1)
    a207954_list = filter ((== 1) . a136522) a033075_list
  • Mathematica
    Join[Range[9],Select[Range[70000],Union[Abs[Differences[ IntegerDigits[ #]]]] == {1}&&PalindromeQ[#]&]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 16 2021 *)

A288528 Numbers with consecutive positive decimal digits after the digits are sorted.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 21, 23, 32, 34, 43, 45, 54, 56, 65, 67, 76, 78, 87, 89, 98, 123, 132, 213, 231, 234, 243, 312, 321, 324, 342, 345, 354, 423, 432, 435, 453, 456, 465, 534, 543, 546, 564, 567, 576, 645, 654, 657, 675, 678, 687, 756, 765, 768, 786, 789, 798, 867, 876, 879, 897, 978, 987
Offset: 1

Views

Author

Omar E. Pol, Jun 15 2017

Keywords

Comments

The last term is a(462331) = 987654321.
Observation: the number of terms mentioned above is also A014145(9). Also the sum of the 9th row in the triangle A288777.
It appears that the number of terms with k digits in this sequence is also A288777(9,k), k>=1.

Crossrefs

Subsequence of A215014.
Supersequence of A138141.

Programs

  • Python
    def ok(n): return "".join(sorted(str(n))) in "123456789"
    print([k for k in range(999) if ok(k)]) # Michael S. Branicky, Aug 04 2022
    
  • Python
    # alternate for generating full sequence instantly
    from itertools import permutations
    frags = ["123456789"[i:j] for i in range(9) for j in range(i+1, 10)]
    afull = sorted(int("".join(s)) for f in frags for s in permutations(f))
    print(afull[:70]) # Michael S. Branicky, Aug 04 2022

A341936 a(0) = 0; for n > 0, a(n) is the smallest positive integer not yet in the sequence that can be created by adding 1, 0, or -1, for digits > 0, to every digit in a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Feb 23 2021

Keywords

Comments

Each individual digit in a(n-1) has either -1,0, or 1 added to it to find the next term. For example 23 can become 12,13,14,22,23,24,32,33,34. Of these options the lowest number not previously seen is then chosen for a(n). A 1 digit becomes 0,1 or 2, a zero digit becomes 0 or 1, while a 9 digit becomes 8,9 or 10 in the next term, e.g. 19 can become 8,9,10,18,19,110,28,29,210. Note that if a leading 1 becomes a 0 it is dropped, along with other leading 0's, for the next term.
The sequence is likely a permutation of the nonnegative integers. The lowest unused number after 1 million terms is 999897.

Examples

			a(1) = 1 as a(0) = 0 and the two numbers that can be created from 0 are 0 and 1, since 0 cannot have 1 subtracted. 0 has already occurred so 1 must be chosen.
a(20) = 28 as a(19) = 19 and the nine numbers that can be created from 19 are 8,9,10,18,19,110,28,29,210. The numbers 8,9,10,18,19 have already occurred and 28 is the smallest of the other four possibilities, so 28 is chosen.
a(29) = 30 as a(28) = 20 and the six numbers that can be created from 20 are 10,11,20,21,30,31. The numbers 10,11,20,21 have already occurred and 30 is the smallest of the other two possibilities, so 30 is chosen.
a(1870) = 995 as a(1869) = 1886 and of the 81 possible numbers that can be created from 1886, 995 is the smallest that has not previously occurred. This example shows that the terms can have a large drop in value if the leading digit can decrease by 1.
a(1875) = 8108 as a(1874) = 999 and of the 27 possible numbers that can be created from 999, 8108 is the smallest that has not previously occurred. This example shows that the terms can have a large increase in value if any of its 9 digits are forced to increase to 10.
		

Crossrefs

Cf. A341935 (add 1 or -1), A001477, A000027, A033075, A341002, A331163.

Programs

A048408 Numbers whose consecutive digits differ by 6.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 28, 39, 60, 71, 82, 93, 171, 282, 393, 606, 717, 828, 939, 1717, 2828, 3939, 6060, 7171, 8282, 9393, 17171, 28282, 39393, 60606, 71717, 82828, 93939, 171717, 282828, 393939, 606060, 717171, 828282, 939393, 1717171
Offset: 0

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

Crossrefs

A198486 Numbers with the property that all pairs of consecutive digits differ by 9.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 90, 909, 9090, 90909, 909090, 9090909, 90909090, 909090909, 9090909090, 90909090909, 909090909090, 9090909090909, 90909090909090, 909090909090909, 9090909090909090, 90909090909090909, 909090909090909090, 9090909090909090909
Offset: 1

Views

Author

Pieter Stadhouders, Oct 20 2013

Keywords

Crossrefs

Programs

  • Mathematica
    t = {1, 2, 3, 4, 5, 6, 7, 8, 9}; Do[AppendTo[t, 10*t[[-1]]]; AppendTo[t, 10*t[[-1]] + 9], {9}]; t (* T. D. Noe, Oct 22 2013 *)
  • Python
    def A198486():
        print('Numbers whose consecutive digits differ by 9')
        for i in range(1, 100001):
            b, n = True, i
            if n > 9:
                while n > 9:
                    a = abs((n // 10) % 10 - n % 10)
                    if a != 9: b = False
                    n = n // 10
            if b: print(i, end=', ')
        return

Extensions

More terms from T. D. Noe, Oct 22 2013

A341935 a(0) = 0; for n > 0, a(n) is the smallest positive integer not yet in the sequence that can be created by adding 1 or -1, for digits > 0, to every digit in a(n-1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 12, 23, 14, 25, 16, 27, 18, 29, 38, 47, 36, 45, 34, 43, 32, 41, 30
Offset: 0

Views

Author

Scott R. Shannon, Feb 23 2021

Keywords

Comments

The sequence is finite. After twenty-nine terms a(28) = 30 is reached after which no integer can be created that has not previously occurred. See the examples.

Examples

			a(1) = 1 as a(0) = 0 and the only number that can be created, since 0 can only be added to, is 0 + 1 = 1.
a(10) = 10 as a(9) = 9 and the two number that can be created from 9 are 8 and 10, but 8 has already occurred so 10 must be chosen.
a(11) = 21 as a(10) = 10 and the two numbers that can be created from 10 are '01' = 1 and 21, but 1 has already occurred so 21 must be chosen.
a(12) = 12 as (11) = 21 and the four numbers that can be created from 21 are 10, 12, 30, 32. The number 10 has already occurred and 12 is the smallest of the other three possibilities, so 12 is chosen.
a(28) = 30 as a(27) = 41 and the four numbers that can be created from 41 are 30, 32, 50, 52. The number 30 has not previously occurred and is the smallest of the possibilities, so 30 is chosen.
From 30 the two numbers that can be created are 21 and 41, both of which have already occurred, so the sequence terminates.
		

Crossrefs

Cf. A341936 (add -1 or 0 or 1), A001477, A000027, A033075, A341002, A331163.
Previous Showing 11-20 of 23 results. Next