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.

A357273 Integers m whose decimal expansion is a prefix of the concatenation of the divisors of m.

This page as a plain text file.
%I A357273 #39 Oct 20 2022 05:05:01
%S A357273 1,11,12,124,135,1111,1525,13515,124816,1223462,12356910,13919571,
%T A357273 1210320658,1243162124,1525125625,12346121028,12478141928,12510153130,
%U A357273 12510254150,1234689111216,1351553159265,1597717414885,1713913539247,12356910151830,13791121336377
%N A357273 Integers m whose decimal expansion is a prefix of the concatenation of the divisors of m.
%C A357273 This is different from A175252 in that the digits to be concatenated can end in the middle of a divisor.
%C A357273 All terms start with the digit 1. - _Chai Wah Wu_, Sep 23 2022
%C A357273 a(26) > 10^14. - _Giovanni Resta_, Oct 20 2022
%e A357273 11 is a term since its divisors are 1 and 11 whose concatenation is 111 whose first 2 digits are 11.
%e A357273 1111 is a term since its divisors are 1, 11, 101, and 1111 whose concatenation is 1111011111 whose first 4 digits are 1111.
%t A357273 q[n_] := (Join @@ IntegerDigits @ Divisors[n])[[1 ;; Length @ (d = IntegerDigits[n])]] == d; Select[Range[1.3*10^6], q] (* _Amiram Eldar_, Sep 22 2022 *)
%o A357273 (PARI) f(n) = my(s=""); fordiv(n, d, s = concat(s, Str(d))); s; \\ A037278
%o A357273 isok(k) = if (k==1, 1, my(v=strsplit(f(k), Str(k))); (v[1] == ""));
%o A357273 (Python)
%o A357273 from sympy import divisors
%o A357273 def ok(n): return "".join(str(d) for d in divisors(n)).startswith(str(n))
%o A357273 print([k for k in range(10**5) if ok(k)]) # _Michael S. Branicky_, Sep 22 2022
%o A357273 (Python)
%o A357273 from itertools import count, islice
%o A357273 from sympy import divisors
%o A357273 def A357273_gen(): # generator of terms
%o A357273     yield 1
%o A357273     for n in count(1):
%o A357273         r = str(n)
%o A357273         if n&1 or r.startswith('2'):
%o A357273             m = 10**(c:=len(r))+n
%o A357273             s, sm = '', str(m)
%o A357273             for d in divisors(m):
%o A357273                 s += str(d)
%o A357273                 if len(s) >= c+1:
%o A357273                     break
%o A357273             if s.startswith(sm):
%o A357273                 yield m
%o A357273 A357273_list = list(islice(A357273_gen(),10)) # _Chai Wah Wu_, Sep 23 2022
%Y A357273 Cf. A037278, A175252 (a subsequence).
%Y A357273 Cf. A004022 (a subsequence).
%Y A357273 Subsequence of A131835.
%K A357273 nonn,base
%O A357273 1,2
%A A357273 _Michel Marcus_, Sep 22 2022
%E A357273 a(16)-a(25) from _Giovanni Resta_, Oct 20 2022