The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A067271 Numbers n such that the digits of P_7(n), the n-th heptagonal number, end in n. 0
 1, 4, 5, 8, 9, 16, 25, 40, 41, 56, 65, 80, 81, 96, 176, 225, 400, 401, 576, 625, 800, 801, 976, 1376, 2625, 4000, 4001, 5376, 6625, 8000, 8001, 9376, 10625, 29376, 40000, 40001, 50625, 69376, 80000, 80001, 90625 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Recall that P_7(n) = n(5n-3)/2. LINKS 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 Sequence in context: A020934 A094004 A228012 * A268128 A064394 A346457 Adjacent sequences:  A067268 A067269 A067270 * A067272 A067273 A067274 KEYWORD base,nonn AUTHOR Joseph L. Pe, Feb 21 2002 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 5 07:15 EDT 2021. Contains 346462 sequences. (Running on oeis4.)