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

Richard Mathar mathar at strw.leidenuniv.nl
Tue Jul 27 12:19:12 CEST 2010

```http://list.seqfan.eu/pipermail/seqfan/2010-July/005416.html proposes

jvp> %I A000001
jvp> %S A000001 0,1,5,7,25,67,482
jvp> %N A000001 Numbers n such that the decimal representation of n is
jvp> contained as substring in that of the n-th pentagonal number.
jvp> %C A000001 This is to pentagonal numbers A000326 as A119238 is to
jvp> triangular numbers A000217 and as A018834 is to squares A000290.
jvp> %e A000001 The 5th pentagonal number, 35, which contains 5.
jvp> %e A000001 The 7th pentagonal number, 70, which contains 7.
jvp> %e A000001 The 25th pentagonal number, 925, which contains 25.
jvp> %e A000001 The 67th pentagonal number, 6700, which contains 67.
jvp> %e A000001 The 482nd pentagonal number, 348245, which contains 482.

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

```

More information about the SeqFan mailing list