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

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A102832 Number of n-digit squares which contain the string "666" but not "6666". 0
 0, 0, 0, 0, 0, 0, 3, 21, 78, 302, 1139, 4156, 14791, 52529, 183565, 635691, 2183533, 7314869, 25303217 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,7 LINKS MATHEMATICA fQ[n_] := StringPosition[ ToString[n^2], "666"] != {} && StringPosition[ ToString[n^2], "6666"] == {}; t = Table[0, {20}]; Do[ If[ fQ[n], t[[ Ceiling[ Log[10, n^2]] + 1]]++ ], {n, 3162277661}]; t (* Robert G. Wilson v, Mar 10 2005 *) t6[digs_]:=Module[{a=Floor[Sqrt[10^(digs-1)]], b=Floor[ Sqrt[ 10^digs]]}, Count[ Range[a, b]^2, _?(SequenceCount[IntegerDigits[#], {6, 6, 6}]> 0&&SequenceCount[IntegerDigits[#], {6, 6, 6, 6}]==0&)]]; Table[ t6[n], {n, 20}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 26 2021 *) CROSSREFS Cf. A052041, A075415, A102807 A032746. Sequence in context: A067002 A110450 A176646 * A112851 A253943 A034490 Adjacent sequences:  A102829 A102830 A102831 * A102833 A102834 A102835 KEYWORD nonn,base AUTHOR James R. Buddenhagen, Feb 27 2005 EXTENSIONS a(13)-a(19) from Robert G. Wilson v, Mar 03 2005 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 November 29 21:32 EST 2021. Contains 349416 sequences. (Running on oeis4.)