OFFSET
1,2
COMMENTS
Infinite since s^i is a term for all odd i and s = 10, 32, 62, 91, 183, 190, 196, 258, 276, 671, 710, 1210, 1570, ..., where ^ denotes repeated concatenation of digits. - Michael S. Branicky, Aug 28 2024
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..82 (all terms <= 10^10)
EXAMPLE
E.g. LS(1)=11, LS(2)=12, LS(10)=1110, LS(188)=1128 etc. and in each case LS(n) is a multiple of n.
122918=0 mod 2998, so 2998 is in the sequence.
But 13 == 1 mod 3, so 3 is not in the sequence.
MAPLE
# Implementation by R. J. Mathar, May 08 2019:
A045918 := proc(n)
local a, f, pd, dgs, i ;
a := [] ;
f := 0 ;
pd := -1 ;
dgs := convert(n, base, 10) ;
for i from 1 to nops(dgs) do
if op(-i, dgs) <> pd then
if pd >= 0 then
a := [op(a), f, pd] ;
end if;
pd := op(-i, dgs) ;
f := 1 ;
else
f:= f+1 ;
end if;
end do:
a := [op(a), f, pd] ;
digcatL(%) ;
end proc:
isA079342 := proc(n)
simplify( modp(A045918(n) , n) = 0 ) ;
end proc:
for n from 1 to 30000 do
if isA079342(n) then
print(n) ;
end if;
end do:
PROG
(Python)
def LS(n): return int(''.join(str(len(list(g)))+k for k, g in groupby(str(n))))
def ok(n): return LS(n)%n == 0
print([k for k in range(1, 10**4) if ok(k)]) # Michael S. Branicky, Aug 28 2024
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Mark Hudson (mrmarkhudson(AT)hotmail.com), Feb 13 2003
STATUS
approved