[seqfan] Re: In search of a formula for a number triangle

Hans Havermann gladhobo at teksavvy.com
Tue Jan 8 22:02:50 CET 2013


Harvey P. Dale:

> DeleteDuplicates[Flatten[Table[{n,Range[10n,10n+n-2]},{n,20}]]]

I just tried my own Mathematica program, from scratch. First I create a function that generates a list of "numbers starting with n":

nswn[x_]:=(s={x};Do[s=Join[s,Range[10^i*x,10^i*(x+1)-1]],{i,4}];s)

The {i,4} is enough to generate 11111 candidate numbers. If you need more, {i,5} generates 111111.

Next I do the actual program for A077341. First (to show that it works), for calculating line 12:

t={};Do[a=Take[Complement[nswn[j],t],j];t=Join[t,a],{j,12}];a

{12,120,121,122,123,124,125,126,127,128,129,1200}

Next, for calculating A077341 for 2020 lines:

t={};Do[a=Take[Complement[nswn[j],t],j];t=Join[t,a],{j,2020}];t

A very large output was generated. Here is a sample of it:
{1,2,20,3,30,31,4,40,<<2041194>>,20201004,20201005,20201006,20201007,20201008,20201009,20201010,20201011}


More information about the SeqFan mailing list