The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A348832 Positive numbers whose square starts and ends with exactly 444. 2
666462, 666538, 666962, 667038, 2107462, 2107538, 2107962, 2108038, 2108462, 2108538, 2108962, 2109038, 2109462, 6663462, 6663538, 6663962, 6664038, 6664462, 6664538, 6664962, 6665038, 6665462, 6665538, 6665962, 6666038, 6667462, 6667538, 6667962, 6668038, 6668462, 6668538, 6668962 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The 1st problem of British Mathematical Olympiad (BMO) in 1995 (see link) asked to find all positive integers whose squares end in three 4’s (A039685); this sequence is the subsequence of these integers whose squares also start in precisely three 4's (no four or more 4's). Two such infinite subsequences are proposed below.
When a square starts and ends with digits ddd, then ddd is necessarily 444.
The first 3 digits of terms are either 210, 666 or 667, while the last 3 digits are either 038, 462, 538 or 962 (see examples).
From Marius A. Burtea, Nov 09 2021 : (Start)
The sequence is infinite because the numbers 667038, 6670038, 66700038, 667000038, ..., 667*10^k + 38, k >= 3, are terms because are square 444939693444, 44489406921444, 4448895069201444, 444889050692001444, 44488900506920001444, ...
Also, 6663462, 66633462, 666333462, 6663333462, ..., (1999*10^k + 386) / 3, k >= 4, are terms and have no digits 0, because their squares are 44401725825444, 4440018258105444, 444000282580905444, 44400012825808905444,
4440001128258088905444, ... (End)
REFERENCES
A. Gardiner, The Mathematical Olympiad Handbook: An Introduction to Problem Solving, Oxford University Press, 1997, reprinted 2011, Pb 1 pp. 55 and 95-96 (1995)
LINKS
British Mathematical Olympiad 1975, Problem 1.
EXAMPLE
666462 is a term since 666462^2 = 444171597444.
21038 is not a term since 21038^2 = 442597444.
MATHEMATICA
Select[Range[100, 7*10^6], (d = IntegerDigits[#^2])[[1 ;; 3]] == d[[-3 ;; -1]] == {4, 4, 4} && d[[-4]] != 4 && d[[4]] != 4 &] (* Amiram Eldar, Nov 09 2021 *)
PROG
(Python)
from itertools import count, takewhile
def ok(n):
s = str(n*n); return len(s.rstrip("4")) == len(s.lstrip("4")) == len(s)-3
def aupto(N):
ends = [38, 462, 538, 962]
r = takewhile(lambda x: x<=N, (1000*i+d for i in count(0) for d in ends))
return [k for k in r if ok(k)]
print(aupto(6668962)) # Michael S. Branicky, Nov 09 2021
(Magma) fd:=func<n|Seqint(Intseq(n*n)) mod 1000 eq 444 and Seqint(Intseq(n*n)) mod 10000 ne 4444>; fs:=func<n|Seqint(Reverse(Intseq(n*n))) mod 1000 eq 444 and Seqint(Reverse(Intseq(n*n))) mod 10000 ne 4444>; [n:n in [1..6700000]|fd(n) and fs(n)]; // Marius A. Burtea, Nov 09 2021
CROSSREFS
Subsequence of A039685, A045858, A273375, A305719, A346892.
Similar to: A348488 (d=4), A348831 (dd=44), this sequence (ddd=444).
Sequence in context: A144132 A069373 A270801 * A162840 A233817 A204887
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Nov 09 2021
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 June 17 13:47 EDT 2024. Contains 373445 sequences. (Running on oeis4.)