[seqfan] Re: Numbers n such that the decimal representation of n is contained as substring in that of the n-th pentagonal number.
Alois Heinz
heinz at hs-heilbronn.de
Thu Jul 29 01:31:26 CEST 2010
a:= proc(n) option remember; local k;
if n=1 then 0
else for k from a(n-1)+1
while searchtext (cat(k), cat(k*(2*k-1)))=0
do od;
k
fi
end:
seq (a(n), n=1..50);
0, 1, 5, 6, 25, 26, 50, 51, 62, 75, 76, 95, 125, 376, 500, 501,
625, 876, 1568, 4376, 4873, 5000, 5001, 5625, 7095, 9376, 9950,
40625, 42084, 50000, 50001, 59376, 60666, 90625, 109376, 390625,
500000, 500001, 609376, 819347, 890625, 936199, 999500, 2109376,
2890625, 4131044, 5000000, 5000001, 7109376, 7890625
Jonathan Post schrieb:
> 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, ...
>
>
> 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.
>
I can submit the other sequence. But perhaps someone else wants to do it?
After the "summer hours".
Alois
More information about the SeqFan
mailing list