[seqfan] Re: Numbers n such that the decimal representation of n is contained as substring in that of the n-th pentagonal number.
zak seidov
zakseidov at yahoo.com
Tue Jul 27 10:29:30 CEST 2010
1.(* Mathematica *) Reap[Do[If[!StringFreeQ[ToString[n(3n-1)/2],ToString[n]],Sow[n]],{n,0,10^8}]][[2,1]]
2. The sequence is infinite. E.g., all integers
of the form (1+2*10^n)/3 with n>=0 :
1, 7, 67, 667, 6667,...
are here.
3.Doug's value are OK for sure
(at least up to 7477735 ;-)).
Zak
--- On Mon, 7/26/10, Douglas McNeil <mcneil at hku.hk> wrote:
> From: Douglas McNeil <mcneil at hku.hk>
> Subject: [seqfan] Re: Numbers n such that the decimal representation of n is contained as substring in that of the n-th pentagonal number.
> To: "Sequence Fanatics Discussion list" <seqfan at list.seqfan.eu>
> Date: Monday, July 26, 2010, 10:39 PM
> On Tue, Jul 27, 2010 at 8:45 AM,
> Jonathan Post <jvospost3 at gmail.com>
> wrote:
> > Before I submit this, as I've made errors in some
> recent submissions,
> > would anyone like to code it, and verify, correct, or
> extend it?
> >
> > %I A000001
> > %S A000001 0,1,5,7,25,67,482
> > %N A000001 Numbers n such that the decimal
> representation of n is
> > contained as substring in that of the n-th pentagonal
> number.
>
> [0, 1, 5, 7, 25, 67, 482, 551, 625, 667, 2937, 6667, 9284,
> 9376, 9649,
> 48179, 49900, 55712, 66667, 89517, 90625, 161579, 631206,
> 666667,
> 890625, 1348613, 2089517, 3863187, 4999000, 6666667,
> 7109376, 7477735,
> 8575619, 10721030, 12890625, 18911582, 20199339, 66666667,
> 91621035,
> 99290795]
>
> FWIW in most languages a simple scan is a one-liner which
> would
> probably have taken less time to type than the email, e.g.
> list(n for
> n in xrange(10**8) if str(n) in str((3*n**2-n)//2)).
>
>
> Doug
>
> --
> Department of Earth Sciences
> University of Hong Kong
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>
More information about the SeqFan
mailing list