OFFSET
1,3
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
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..44
FORMULA
A367728(a(n)) = 1.
EXAMPLE
123456789 is a term since (987654321 - 1)/(123456789 + 1) = 8, which is an integer.
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 *)
PROG
(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
(PARI) isok(k) = denominator((fromdigits(Vecrev(digits(k))) - 1)/(k + 1)) == 1; \\ Michel Marcus, Nov 30 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Stefano Spezia, Nov 24 2023
STATUS
approved