This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A348831 #32 Sep 08 2022 08:46:26 %S A348831 212,2112,6638,6662,6688,20988,21012,21062,21112,21138,21162,21188, %T A348831 21212,66338,66362,66388,66412,66438,66488,66512,66562,66588,66612, %U A348831 66712,66738,66762,66788,66812,66838,66862,66888,66912,66938,66988,67012,67062,209762,209788 %N A348831 Positive numbers whose square starts and ends with exactly 44, and no 444. %C A348831 When a square starts and ends with digits dd, then dd is necessarily 44. %C A348831 The last 2 digits of terms are either 12, 38, 62 or 88. %C A348831 From _Marius A. Burtea_, Nov 09 2021 : (Start) %C A348831 The sequence is infinite because the numbers 212, 2112, 21112, ..., (19*10^k + 8) / 9, k >= 3, are terms because the remainder when dividing by 1000 is 544 and 445*10^(2*k - 2) < ((19*10^k + 8) / 9)^2 < 447*10^(2*k - 2), k >= 3. %C A348831 Also 6638, 66338, 663338, 6633338, 66333338, 663333338, 6633333338, ..., (199*10^k + 14) / 3, k >= 2, are terms and have no digits 0, because their squares are: 44063044, 4400730244, 4400730244, 440017302244, 44001173022244, 4400111730222244, 440011117302222244, ... (End) %e A348831 212 is a term since 212^2 = 44944. %e A348831 662 is not a term since 662^2 = 438244. %e A348831 668 is not a term since 668^2 = 446224. %e A348831 2108 is not a term since 2108^2 = 4443664. %e A348831 21038 is not a term since 21038^2 = 442597444. %e A348831 21088 is not a term since 21088^2 = 444703744. %t A348831 Select[Range[10, 300000], (d = IntegerDigits[#^2])[[1 ;; 2]] == d[[-2 ;; -1]] == {4, 4} && d[[-3]] != 4 && d[[3]] != 4 &] (* _Amiram Eldar_, Nov 08 2021 *) %o A348831 (Magma) fd:=func<n|Seqint(Intseq(n*n)) mod 100 eq 44 and Seqint(Intseq(n*n)) mod 1000 ne 444>; fs:=func<n|Seqint(Reverse(Intseq(n*n))) mod 100 eq 44 and Seqint(Reverse(Intseq(n*n))) mod 1000 ne 444>; [n:n in [1..210000]|fd(n) and fs(n)]; // _Marius A. Burtea_, Nov 08 2021 %o A348831 (Python) %o A348831 from itertools import count, takewhile %o A348831 def ok(n): %o A348831 s = str(n*n); return len(s.rstrip("4")) == len(s.lstrip("4")) == len(s)-2 %o A348831 def aupto(N): %o A348831 ends = [12, 38, 62, 88] %o A348831 r = takewhile(lambda x: x<=N, (100*i+d for i in count(0) for d in ends)) %o A348831 return [k for k in r if ok(k)] %o A348831 print(aupto(209788)) # _Michael S. Branicky_, Nov 08 2021 %Y A348831 Cf. A017317. %Y A348831 Subsequence of A045858, A273375, A305719 and A346774. %Y A348831 Similar to: A348488 (d=4), this sequence (dd=44), A348832 (ddd=444). %K A348831 nonn,base %O A348831 1,1 %A A348831 _Bernard Schott_, Nov 08 2021