cp's OEIS Frontend

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.

Showing 1-2 of 2 results.

A045788 Squares with initial digit '5'.

Original entry on oeis.org

529, 576, 5041, 5184, 5329, 5476, 5625, 5776, 5929, 50176, 50625, 51076, 51529, 51984, 52441, 52900, 53361, 53824, 54289, 54756, 55225, 55696, 56169, 56644, 57121, 57600, 58081, 58564, 59049, 59536, 501264, 502681, 504100, 505521
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    seq(op(map(`^`, [seq(i,i=ceil(sqrt(5*10^d))..floor(sqrt(6*10^d-1)))],2)),d=1..5); # Robert Israel, Sep 30 2016
  • Mathematica
    Flatten[Table[Range[Ceiling[Sqrt[5 10^n]],Floor[Sqrt[6 10^n]]]^2,{n,5}]]  (* Harvey P. Dale, Jun 15 2011 *)

Formula

a(n) = A045859(n)^2. - R. J. Mathar, Jul 23 2025

Extensions

Offset changed by Robert Israel, Sep 30 2016

A348489 Positive numbers whose square starts and ends with exactly one 5.

Original entry on oeis.org

75, 225, 715, 725, 735, 755, 765, 2245, 2255, 2265, 2275, 2285, 2295, 2305, 2315, 2325, 2335, 2345, 2375, 2385, 2395, 2405, 2415, 2425, 2435, 2445, 7075, 7085, 7095, 7105, 7115, 7125, 7135, 7145, 7155, 7165, 7175, 7185, 7195, 7205, 7215, 7225, 7235, 7245
Offset: 1

Views

Author

Bernard Schott, Oct 25 2021

Keywords

Comments

When a square ends with 5, it ends with 25.
From Marius A. Burtea, Oct 25 2021: (Start)
Numbers 75, 765, 7665, 76665, ..., (23*10^k -5) / 3, k >= 1, are terms and have no digits 0, because their squares are 5625, 585225, 58752225, 5877522225, 587775222225, 58777752222225, ...
Also 75, 735, 7335, 73335, ..., (22*10^n+5) / 3, k >= 1, are terms and have no digits 0, because their squares are 5625, 540225, 53802225, 5378022225, 537780222225, 53777802222225, ... (End)

Examples

			75^2 = 5625, hence 75 is a term.
235^2 = 55225, hence 235 is not a term.
		

Crossrefs

Cf. A045859, A017330 (squares ending with 5).
Similar to: A348487 (k=1), A348488 (k=4), this sequence (k=5), A348490 (k=6), A348491 (k=9).
Subsequence of A305719.

Programs

  • Magma
    [n:n in [4..7500]|Intseq(n*n)[1] eq 5 and Intseq(n*n)[#Intseq(n*n)] eq 5 and Intseq(n*n)[-1+#Intseq(n*n)] ne 5 ]; // Marius A. Burtea, Oct 25 2021
    
  • Mathematica
    Select[5 * Range[2, 1500], (d = IntegerDigits[#^2])[[1]] == d[[-1]] == 5 && d[[2]] != 5 &] (* Amiram Eldar, Oct 25 2021 *)
  • PARI
    isok(k) = my(d=digits(sqr(k))); (d[1]==5) && (d[#d]==5) && if (#d>2, (d[2]!=5) && (d[#d-1]!=5), 1); \\ Michel Marcus, Oct 25 2021
    
  • Python
    from itertools import count, takewhile
    def ok(n):
      s = str(n*n); return len(s.rstrip("5")) == len(s.lstrip("5")) == len(s)-1
    def aupto(N):
      r = takewhile(lambda x: x<=N, (10*i+5 for i in count(0)))
      return [k for k in r if ok(k)]
    print(aupto(7245)) # Michael S. Branicky, Oct 26 2021
Showing 1-2 of 2 results.