login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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
Sequence in context: A067002 A110450 A176646 * A112851 A253943 A034490
KEYWORD
nonn,base
AUTHOR
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 11:46 EDT 2024. Contains 371241 sequences. (Running on oeis4.)