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.

A079342 Integers k that divide LS(k), where LS is the "Look and Say" function (A045918).

Original entry on oeis.org

1, 2, 5, 10, 22, 32, 62, 91, 183, 188, 190, 196, 258, 276, 330, 671, 710, 1130, 1210, 1570, 2644, 2998, 3292, 4214, 17055, 20035, 53015, 70315, 101010, 108947, 199245, 233606, 309665, 323232, 356421, 483405, 626262, 919191, 1743599
Offset: 1

Views

Author

Mark Hudson (mrmarkhudson(AT)hotmail.com), Feb 13 2003

Keywords

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

Examples

			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.
		

Crossrefs

Cf. A152957. - David Wasserman, Dec 15 2008

Programs

  • 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:
  • 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