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

A367593 Nonnegative integers k such that (R(k) - 1)/(k + 1) is an integer, where R(k) is the digit reversal of k.

Original entry on oeis.org

0, 1, 10, 100, 147, 1000, 1099, 1407, 10000, 14007, 100000, 140007, 1000000, 1400007, 2124736, 10000000, 14000007, 100000000, 123456789, 140000007, 1000000000, 1234506789, 1400000007, 10000000000, 12345006789, 14000000007, 21247524736, 100000000000, 123450006789
Offset: 1

Views

Author

Stefano Spezia, Nov 24 2023

Keywords

Comments

Among the terms of this sequence, there are:
the powers of 10 (cf. A011557);
the numbers of the form 14*10^h + 7 = 7*A199682(h) for h > 0;
the numbers of the form 12345*10^m + 6789 = A367650(m) for m > 3.
From Chai Wah Wu, Dec 01 2023: (Start)
First digit of positive terms must be either 1 or 2. If first digit is 1, then last digit must be 0,1,4,5,7 or 9. If first digit is 2, then last digit is 6. In particular, if a, b, c are the first digit, last digit and (R(k)-1)/(k+1) of a term k>0, then (a, b, c) must take on values from one of the following triples:
(a, b, c): (1, 0, 0), (1, 1, 0), (1, 4, 2), (1, 4, 4), (1, 5, 5), (1, 7, 5),
(1, 9, 4), (1, 9, 5), (1, 9, 6), (1, 9, 7), (1, 9, 8), (1, 9, 9), (2, 6, 3).
Numbers of the form 21 [2475]* 24736 are terms of this sequence, where [2475]* denote a (possibly zero) repetition of the digits 2475. The first few terms of this form are: 2124736, 21247524736, 212475247524736, ...
Similarly numbers of the form 21261 [2475]* 24738736 are terms of this sequence:
2126124738736, 21261247524738736, 212612475247524738736, ... (End)
More generally, numbers of the form 21 [261]^k [2475]* 2473 [873]^k 6 are terms of this sequence, where [261]^k denote the digits '261' repeated k times with k>=0: e.g. 21261261247524752475247524738738736, ... It appears that all terms with first digit 2 and last digit 6 are of this form. - Chai Wah Wu, Dec 02 2023

Examples

			123456789 is a term since (987654321 - 1)/(123456789 + 1) = 8, which is an integer.
		

Crossrefs

Programs

  • Mathematica
    a={}; For[k=0, k<=10^10, k++,If[IntegerQ[(FromDigits[Reverse[IntegerDigits[k]]]-1)/(k+1)],AppendTo[a,k]]]; a
    Select[Range[0,10^6],IntegerQ[(IntegerReverse[#]-1)/(#+1)]&] (* The program generates the first 13 terms of the sequence. *) (* Harvey P. Dale, Aug 11 2024 *)
  • PARI
    isok(k) = denominator((fromdigits(Vecrev(digits(k))) - 1)/(k + 1)) == 1; \\ Michel Marcus, Nov 30 2023
  • Python
    def digit_reversal(n):
        return int(str(n)[::-1])
    def find_integers():
        result = []
        for k in range(0, 10**10):
            reversed_k = digit_reversal(k)
            if (reversed_k - 1) % (k + 1) == 0:
                result.append(k)
        return result
    integers_list = find_integers()
    print(integers_list)
    
  • Python
    from itertools import product, count, islice
    def A367593_gen(): # generator of terms
        yield from (0,1,10)
        for l in count(1):
            m = 10**(l+1)
            for d in product('0123456789',repeat=l):
                for a, b, c in ((1, 0, 0), (1, 1, 0), (1, 4, 2), (1, 5, 5), (1, 7, 5)):
                    k = a*m+int(s:=''.join(d))*10+b
                    r = b*m+int(s[::-1])*10+a
                    if c*(k+1)==r-1:
                        yield k
                a,b = 1,9
                k = a*m+int(s:=''.join(d))*10+b
                r = b*m+int(s[::-1])*10+a
                if not (r-1)%(k+1):
                    yield k
            a,b,c=2,6,3
            for d in product('0123456789',repeat=l):
                k = a*m+int(s:=''.join(d))*10+b
                r = b*m+int(s[::-1])*10+a
                if c*(k+1)==r-1:
                    yield k
    A367593_list = list(islice(A367593_gen(),20)) # Chai Wah Wu, Dec 01 2023
    

Formula

A367728(a(n)) = 1.

A367727 a(n) is the numerator of (R(n) - 1)/(n + 1), where R(n) is the digit reversal of n.

Original entry on oeis.org

-1, 0, 1, 1, 3, 2, 5, 3, 7, 4, 0, 5, 20, 15, 8, 25, 60, 35, 80, 9, 1, 1, 21, 31, 41, 51, 61, 71, 81, 91, 2, 3, 2, 16, 6, 13, 62, 36, 82, 23, 3, 13, 23, 3, 43, 53, 63, 73, 83, 93, 4, 7, 24, 17, 4, 27, 64, 37, 84, 47, 5, 15, 25, 35, 9, 5, 65, 75, 85, 19, 6, 2, 26
Offset: 0

Views

Author

Stefano Spezia, Nov 28 2023

Keywords

Crossrefs

Cf. A004086, A367593, A367728 (denominator).

Programs

  • Mathematica
    a[n_]:=Numerator[(FromDigits[Reverse[IntegerDigits[n]]]-1)/(n+1)]; Array[a,73,0]
  • PARI
    a(n) = numerator((fromdigits(Vecrev(digits(n)))-1)/(n+1)); \\ Michel Marcus, Nov 28 2023

A367825 Array read by ascending antidiagonals: A(n, k) is the denominator of (R(n) - k)/(n + k), where R(n) is the digit reversal of n, with A(0, 0) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 2, 1, 2, 1, 1, 5, 5, 5, 5, 1, 1, 3, 3, 1, 3, 3, 1, 1, 7, 7, 7, 7, 7, 7, 1, 1, 4, 2, 4, 1, 4, 2, 4, 1, 1, 9, 9, 3, 9, 9, 3, 9, 9, 1, 10, 5, 5, 5, 5, 1, 5, 5, 5, 5, 1, 1, 1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1, 4, 6, 12, 2, 3, 6, 1, 6, 3, 2, 3, 6, 1
Offset: 0

Views

Author

Stefano Spezia, Dec 02 2023

Keywords

Comments

This array generalizes A367728.

Examples

			The array of the fractions begins:
  1,  -1,   -1,   -1,   -1,   -1,    -1,    -1, ...
  1,   0, -1/3, -1/2, -3/5, -2/3,  -5/7,  -3/4, ...
  1, 1/3,    0, -1/5, -1/3, -3/7,  -1/2,  -5/9, ...
  1, 1/2,  1/5,    0, -1/7, -1/4,  -1/3,  -2/5, ...
  1, 3/5,  1/3,  1/7,    0, -1/9,  -1/5, -3/11, ...
  1, 2/3,  3/7,  1/4,  1/9,    0, -1/11,  -1/6, ...
  1, 5/7,  1/2,  1/3,  1/5, 1/11,     0, -1/13, ...
  1, 3/4,  5/9,  2/5, 3/11,  1/6,  1/13,     0, ...
  ...
The array of the denominators begins:
  1, 1, 1, 1,  1,  1,  1,  1, ...
  1, 1, 3, 2,  5,  3,  7,  4, ...
  1, 3, 1, 5,  3,  7,  2,  9, ...
  1, 2, 5, 1,  7,  4,  3,  5, ...
  1, 5, 3, 7,  1,  9,  5, 11, ...
  1, 3, 7, 4,  9,  1, 11,  6, ...
  1, 7, 2, 3,  5, 11,  1, 13, ...
  1, 4, 9, 5, 11,  6, 13,  1, ...
  ...
		

Crossrefs

Cf. A367824 (numerator), A367827 (antidiagonal sums).

Programs

  • Mathematica
    A[0,0]=1; A[n_,k_]:=Denominator[(FromDigits[Reverse[IntegerDigits[n]]]-k)/(n+k)]; Table[A[n-k,k],{n,0,12},{k,0,n}]//Flatten

Formula

A(1, n) = A026741(n+1).
A(2, n) = A060819(n+2).
A(3, n) = A060789(n+3).
A(4, n) = A106609(n+4).
A(5, n) = A106611(n+5).
A(6, n) = A051724(n+6).
A(7, n) = A106615(n+7).
A(8, n) = A106617(n+8) = A231190(n+16).
A(9, n) = A106619(n+9).
A(10, n) = A106612(n+10).

A367740 a(n) = A367727(A367593(n)).

Original entry on oeis.org

-1, 0, 0, 0, 5, 0, 9, 5, 0, 5, 0, 5, 0, 5, 3, 0, 5, 0, 8, 5, 0, 8, 5, 0, 8, 5, 3, 0, 8, 5, 0, 8, 5, 3, 0, 8, 5, 0, 8, 5, 3, 0, 8, 5
Offset: 1

Views

Author

Stefano Spezia, Nov 29 2023

Keywords

Comments

Restricted to integers k where k + 1 divides R(k) - 1 the terms are (R(k) - 1) / (k + 1), where R(k) denotes the digit reversal of k. - Peter Luschny, Dec 01 2023
The 0's correspond to the powers of 10 (cf. A011557), the 5's correspond to the numbers of the form 14*10^h + 7 = 7*A199682(h) for h > 0, and the 8's correspond to the numbers of the form 12345*10^m + 6789 = A367650(m) for m > 3. The only negative term -1 corresponds to A367593(1) = 0. - Stefano Spezia, Dec 01 2023

Crossrefs

Programs

  • Python
    def A367740List(upto):
        L = []
        for n in range(upto):
            rev = int(str(n)[::-1])
            if (rev - 1) % (n + 1) == 0:
                L.append((rev - 1) // (n + 1))
        return L
    print(A367740List(10**6))  # Peter Luschny, Dec 01 2023
    
  • Python
    from itertools import product, count, islice
    def A367740_gen(): # generator of terms
        yield from (-1,0,0)
        for l in count(1):
            m = 10**(l+1)
            for d in product('0123456789',repeat=l):
                for a, b, c in ((1, 0, 0), (1, 1, 0), (1, 4, 2), (1, 5, 5), (1, 7, 5)):
                    k = a*m+int(s:=''.join(d))*10+b
                    r = b*m+int(s[::-1])*10+a
                    if c*(k+1)==r-1:
                        yield c
                a,b = 1,9
                k = a*m+int(s:=''.join(d))*10+b
                r = b*m+int(s[::-1])*10+a
                p,q = divmod(r-1,k+1)
                if not q:
                    yield p
            a,b,c=2,6,3
            for d in product('0123456789',repeat=l):
                k = a*m+int(s:=''.join(d))*10+b
                r = b*m+int(s[::-1])*10+a
                if c*(k+1)==r-1:
                    yield c
    A367740_list = list(islice(A367740_gen(),20)) # Chai Wah Wu, Dec 01 2023

Formula

-1 <= a(n) <= 9.

Extensions

a(30)-a(44) from Chai Wah Wu, Dec 02 2023
Showing 1-4 of 4 results.