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.

A338166 Terms of A338039 that are repeated concatenations of smaller integers.

This page as a plain text file.
%I A338166 #21 Oct 28 2021 01:59:48
%S A338166 1818,8181,181818,198198,405405,484848,504504,565656,576576,656565,
%T A338166 675675,818181,848484,891891,11311131,13041304,13111311,18181818,
%U A338166 19981998,22622262,26222622,33933393,39333933,40314031,41544154,45144514,46364636,63646364,81818181,87498749,89918991,94789478
%N A338166 Terms of A338039 that are repeated concatenations of smaller integers.
%H A338166 Michel Marcus, <a href="/A338166/b338166.txt">Table of n, a(n) for n = 1..1050</a> (up to 15 digits).
%H A338166 Daniel Tsai, <a href="https://arxiv.org/abs/2010.03151">A recurring pattern in natural numbers of a certain property</a>, arXiv:2010.03151 [math.NT], 2020.
%H A338166 Daniel Tsai, <a href="http://math.colgate.edu/~integers/v32/v32.mail.html">A recurring pattern in natural numbers of a certain property</a>, Integers (2021) Vol. 21, Article #A32.
%t A338166 Block[{f}, f[1] = 0; f[n_] := Plus @@ #[[All, 1]] + Plus @@ Select[#[[All, -1]], # > 1 &] &@ FactorInteger[n]; Select[Union@ Flatten@ Table[Union@ Flatten@ Map[Function[k, Map[FromDigits[Join @@ ConstantArray[IntegerDigits[#], n/k]] &, Range[10^(k - 1), 10^k - 1]]], Most@ Divisors[n]], {n, 3, 8}], And[Mod[#1, 10] != 0, #2 != #1, f[#1] == f[#2]] & @@ {#, IntegerReverse[#]} &] ] (* _Michael De Vlieger_, May 27 2021, after _Amiram Eldar_ at A338039 *)
%o A338166 (PARI) f(n) = my(f=factor(n)); vecsum(f[,1]) + sum(k=1, #f~, if (f[k,2]!=1, f[k,2])); \\ A338038
%o A338166 isok(m) = my(r=fromdigits(Vecrev(digits(m)))); if ((r != m) && (f(r) == f(m)), return(m));
%o A338166 listc(c) = {my(list = List()); fordiv(c, d, if ((d != 1) && (d != c), for(k=10^(d-1), 10^d, if (k % 10, my(sk = Str(k), skk = sk); for (j=1, c/d-1, sk = concat(sk, skk)); if (isok(eval(sk)), listput(list, eval(sk))););););); list;}
%o A338166 lista(nn) = {my(list = List()); forcomposite(c=1, nn, my(clist = Vec(listc(c))); for (k=1, #clist, listput(list, clist[k]));); vecsort(Vec(list),,8);}
%o A338166 lista(8) \\ to get terms up to 8 digits
%Y A338166 Cf. A338038, A338039.
%K A338166 nonn,base
%O A338166 1,1
%A A338166 _Michel Marcus_, Oct 14 2020