[seqfan] Re: Numbers n such that the decimal representation of n is contained as substring in that of the n-th pentagonal number.
Jonathan Post
jvospost3 at gmail.com
Wed Jul 28 20:25:39 CEST 2010
Numbers n such that the decimal representation of n is contained as
substring in that of the n-th hexagonal number.
Not having Mathematica installed, I cannot make the obvious tweak to
the provided code, and am starting by hand:
0, 1, 5, 6, 25, 26, 50, 51, 62, 75, 76, 95, 125, 376, ...
Examples: the 5th hexagonal number, 45, has a 5. The 6th hexagonal
number, 66, has a 6 (we do not consider multiplicity).
The 25th hexagonal number, 1225, has a 25.
Yes, I see the pattern started with {(5,6), (25,26), (75,76), ...}.
This is to hexagonal numbers A000384 as A179782 is to pentagonal
numbers A000326, as A119238 is to triangular numbers A000217, and as
A018834 is to squares A000290.
45, 46, and 47 have the subsequence property, as do an infinite number
of others such as 175 and 176, and 276, 311...
Thank you, all. I'd love to see the Alois Heinz/Richard Mathar
sequence submitted. I was aware of the ambiguity, but self-censored
my comments and early examples as less interesting.
On Tue, Jul 27, 2010 at 5:33 AM, Alois Heinz <heinz at hs-heilbronn.de> wrote:
>
> I understand that "substring" is contiguous and ordered, whereas
> "subsequence"
> is possibly not contiguous but ordered. See also:
>
> http://en.wikipedia.org/wiki/Subsequence#Substring_vs._subsequence
>
> Numbers n such that the decimal representation of n is
> contained as subsequence in that of the n-th pentagonal number:
>
> 0, 1, 5, 7, 25, 59, 65, 67, 81, 145, 284, 401, 481, 482,
> 551, 620, 625, 640, 656, 659, 665, 667, 670, 720, 965,
> 1001, 2881, 2937, 3001, 3401, 4001, 4005, 4007, 4042,
> 4116, 4825, 5480, 5517, 5523, 5632, 5821, 5825, 5880,
> 5940, 5941, 6116, 6118, 6343, 6398, 6400, 6401, 6540,
> 6561, 6600, 6601, 6614, 6625, 6635, 6656, 6659, 6665,
> 6667, 6670, 6720, 6776, 6811, 6825, 7025, 7123, 7161
>
> Richard Mathar schrieb:
>> There is a standard wording problem here: does "substring" mean
>> i) contiguous and/or ii) ordered substring? This comes up in particular
>> since all examples agree already with the narrow interpretation.
>>
>> Is, for example, 342 a substring in 348245 = (34)8(2)45?
>> Is 842 a substring of 348245 = 3(4)(8)(2)45? Most people writing programs
>> tacitly assume that they may use the simplest interface their
>> programming language/library offers, which is the (linear time) algorithm
>> that searches only for blocks of correctly oriented substrings
>> in the host string.
>>
>> RJM
>>
>
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>
More information about the SeqFan
mailing list