[seqfan] Re: Numbers n such that the decimal representation of n is contained as substring in that of the n-th pentagonal number.

Douglas McNeil mcneil at hku.hk
Tue Jul 27 04:39:23 CEST 2010


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




More information about the SeqFan mailing list