OFFSET
1,2
COMMENTS
Recall that P_7(n) = n(5n-3)/2.
EXAMPLE
P_7(n) = 188, ending in 8. Hence 8 is a term of the sequence.
MATHEMATICA
(*returns true if a ends with b, false o.w.*) f[a_, b_] := Module[{c, d, e, g, h, i, r}, r = False; c = ToString[a]; d = ToString[b]; e = StringLength[c]; g = StringPosition[c, d]; h = Length[g]; If[h > 0, i = g[[h]]; If[i[[2]] == e, r = True]]; r]; Do[If[f[n(5n-3)/2, n], Print[n]], {n, 1, 10^5} ]
Transpose[Select[Table[{n, n (5n-3)/2}, {n, 100000}], Mod[Last[#], 10^IntegerLength[ First[#]]]==First[#]&]][[1]] (* Harvey P. Dale, Jul 12 2011 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Joseph L. Pe, Feb 21 2002
STATUS
approved