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.

A193381 Largest multiple of n which is a concatenation of the n numbers n(n-1)/2,...,n(n+1)/2-1, or 0 if no such number exists.

This page as a plain text file.
%I A193381 #10 Nov 20 2023 19:05:04
%S A193381 0,12,543,9876,1413121110,201918171516,27262524212322,
%T A193381 3534333231302928,444342414039383736,54535251494847464550,
%U A193381 6564636261605958575655,777675747372717069676668,90898887868584838281798078,999897969594939291104103101102100
%N A193381 Largest multiple of n which is a concatenation of the n numbers n(n-1)/2,...,n(n+1)/2-1, or 0 if no such number exists.
%C A193381 This is to A192392 what is A080481 to A053067: The integers are considered in groups of n=1,2,3,... numbers, starting with {0}, {1,2}, {3,4,5}, ... The sequence lists the concatenation of the permutation of the n elements of each group which yields the largest multiple of n, when written in decimal.
%e A193381 a(20) = concat(210,209,...,201,199,...,191,200).
%t A193381 lmn[n_]:=Max[Select[FromDigits[Flatten[IntegerDigits/@#]]&/@Permutations[n],Divisible[ #,Length[n]]&]]; Join[{0},lmn/@With[{nn=10},TakeList[Range[(nn(nn+1))/2],Range[2,nn]]]] (* The program generates the first 10 terms of the sequence. To generate more, increase the nn constant but the program may take a long time to run. *) (* _Harvey P. Dale_, Nov 20 2023 *)
%o A193381 (PARI) a(n)={my(d=vecsort(vector(n,i,Str(n*(n-1)/2-1+i)),,4),t); for(i=1,n!, eval(concat(d))%n || return(eval(concat(d))); d=precperm(d))} /* see A076072 for precperm() */
%K A193381 nonn,base
%O A193381 1,2
%A A193381 _M. F. Hasler_, Jul 24 2011