NEW SEQ?
Rob Pratt
Rob.Pratt at sas.com
Wed Jun 29 17:39:52 CEST 2005
Zak,
I don't know if the sequence is new, but your algorithm can be improved. There is no need to take a max over all permutations when you already know that the permutation with digits in nonincreasing order yields the largest number. Instead, use
FromDigits[Sort[IntegerDigits[n], Greater]] - n
Rob
-----Original Message-----
From: zak seidov [mailto:zakseidov at yahoo.com]
Sent: Wednesday, June 29, 2005 10:18 AM
To: seqfan at ext.jussieu.fr; njas at research.att.com
Subject: Re: NEW SEQ?
The point is that of course
i tried to find it but failed,
zak
--- zak seidov <zakseidov at yahoo.com> wrote:
>
> Neil,
> seqfans,
>
> %C A000001 Is it known?
> If yes - great,
> if not - i dare submit this.
>
> Thanks, zak
>
> %I A000001
> %S A000001
>
0,0,0,0,0,0,0,0,0,0,0,9,18,27,36,45,54,63,72,0,0,0,9,18,27,36,45,54,63,0,0,0,0,9,18,27,36,45,54,0,0,0,0,0,9,18,27,36,45,0,0,0,0,0,0,9,18,27,36,0,0,0,0,0,0,0,9,18,27,0,0,0,0,0,0,0,0,9,18,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,9,108,207,306,405,504,603,702,801,0,0,99,198,297,396,495,594,693,792,90,90,99,198,297,396,495,594,693,792,180,180,189,198,297,396,495,594,693,792,270,270,279,288,297,396,495,594,693,792,360
> %N A000001 Difference between n and the largest number with the same
> digit set as n.
> %C A000001 Is it known? If yes, great, if not i dare submit this.
> %t A000001 Table[Max[FromDigits/@
> Permutations[IntegerDigits[n]]]-n,{n,150}]
> %O A000001 1
> %K A000001 ,nonn,
> %A A000001 Zak Seidov (zakseidov at yahoo.com), Jun 29
> 2005
>
>
>
>
> ____________________________________________________
>
> Yahoo! Sports
> Rekindle the Rivalries. Sign up for Fantasy Football
>
> http://football.fantasysports.yahoo.com
>
____________________________________________________
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
http://football.fantasysports.yahoo.com
More information about the SeqFan
mailing list