login
This site is supported by donations to The OEIS Foundation.
Logo

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; internal format)
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]] (* From Harvey P. Dale, Jul 12 2011 *)

CROSSREFS

Sequence in context: A020668 A020934 A094004 * A064394 A092022 A190200

Adjacent sequences:  A067268 A067269 A067270 * A067272 A067273 A067274

KEYWORD

base,nonn

AUTHOR

Joseph L. Pe (joseph_l_pe(AT)hotmail.com), Feb 21 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 20:11 EST 2012. Contains 205961 sequences.