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.

A038678 Squares ending in a different nonzero square.

Original entry on oeis.org

49, 64, 81, 121, 144, 169, 225, 289, 324, 361, 441, 484, 529, 625, 729, 784, 841, 961, 1024, 1089, 1225, 1369, 1444, 1521, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401, 2601, 2704, 2809, 2916, 3025, 3136, 3249, 3364, 3481, 3721, 3844, 3969, 4225
Offset: 1

Views

Author

Keywords

Comments

Subsequence of A065807. - Zak Seidov, Mar 23 2012

Examples

			15^2 = 225 ends with 25 = 5^2.
		

Crossrefs

Programs

  • Maple
    q:= n-> (s-> ormap(x-> (t-> t>0 and issqr(t))(parse(x))
                 , [s[i..-1]$i=2..length(s)]))(""||n):
    select(q, [i^2$i=1..100])[];  # Alois P. Heinz, Mar 16 2020
  • Mathematica
    ds[n_] := DeleteCases[NestWhileList[FromDigits[Rest[IntegerDigits[#]]] &, n, # > 9 &], 0]; Select[Range[4, 65]^2, Or @@ IntegerQ /@ Sqrt[Rest[ds[#]]] &] (* Jayanta Basu, Jul 10 2013 *)
  • PARI
    issqend(n) = my(p=10, q); for(k=1, #Str(n)-1, if ((q=(n % p)) && issquare(q), return (1)); p*=10);
    isok(n) = issquare(n) && issqend(n); \\ Michel Marcus, Mar 17 2020

A065808 Square of n has a smaller square as its final digits.

Original entry on oeis.org

7, 8, 9, 10, 11, 12, 13, 15, 17, 18, 19, 20, 21, 22, 23, 25, 27, 28, 29, 30, 31, 32, 33, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 67, 68, 69, 70, 71, 72, 73, 75, 77, 78, 79, 80, 81, 82, 83, 85, 87, 88
Offset: 1

Views

Author

Klaus Brockhaus, Nov 22 2001

Keywords

Comments

Includes all n >= 7 not == 4 or 6 (mod 10). - Robert Israel, Oct 24 2017

Crossrefs

A065807 gives the corresponding squares.

Programs

  • Maple
    filter:= n ->
      ormap(t -> issqr(n^2 mod 10^t), [$1..ilog10(n^2)]):
    select(filter, [$1..100]); # Robert Israel, Oct 24 2017
  • Mathematica
    ds[n_] := NestWhileList[FromDigits[Rest[IntegerDigits[#]]] &, n, # > 9 &]; Select[Range[4, 88], Or @@ IntegerQ /@ Sqrt[Rest[ds[#^2]]] &] (* Jayanta Basu, Jul 10 2013 *)
  • PARI
    a065808(m) = local(k, a, b, d, j, n, r); for(k=1, m, a=length(Str(n))-1; b=1; j=1; n=k^2; while(b, d=divrem(n, 10^j); if(d[1]>0&&issquare(d[2]), b=0; issquare(n, &r); print1(r, ","), if(j
    				

Extensions

Offset changed to 1 by Robert Israel, Oct 24 2017
Showing 1-2 of 2 results.