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-3 of 3 results.

A273373 Squares ending in digit 6.

Original entry on oeis.org

16, 36, 196, 256, 576, 676, 1156, 1296, 1936, 2116, 2916, 3136, 4096, 4356, 5476, 5776, 7056, 7396, 8836, 9216, 10816, 11236, 12996, 13456, 15376, 15876, 17956, 18496, 20736, 21316, 23716, 24336, 26896, 27556, 30276, 30976, 33856, 34596, 37636, 38416, 41616
Offset: 1

Views

Author

Vincenzo Librandi, May 21 2016

Keywords

Comments

These are the only squares whose second last digit is odd. This implies that the only squares whose last two digits are the same are those ending with 0 or 4; those ending with 1, 5, and 9 are paired with even second last digits. - Waldemar Puszkarz, May 24 2016

Crossrefs

Cf. A017341 (numbers ending in 6), A017343 (cubes ending in 6).
Cf. squares with last digit k: A017270 (k=0), A273372 (k=1), A273375 (k=4), A017330 (k=5), this sequence (k=6), A273374 (k=9).

Programs

  • Magma
    /* By definition: */ [n^2: n in [0..200] | Modexp(n,2,10) eq 6];
    
  • Magma
    [(10*n - 3*(-1)^n - 5)^2/4: n in [1..50]];
  • Maple
    seq(seq((10*i+j)^2,j=[4,6]),i=0..20); # Robert Israel, May 24 2016
  • Mathematica
    Table[(10 n - 3 (-1)^n - 5)^2/4, {n, 1, 50}]
    CoefficientList[Series[4 (4 + 5 x + 32 x^2 + 5 x^3 + 4 x^4) / ((1 + x)^2 (1 - x)^3), {x, 0, 50}], x]
    Select[Range[250]^2,Mod[#,10]==6&] (* Harvey P. Dale, May 31 2020 *)

Formula

G.f.: 4*x*(4 + 5*x + 32*x^2 + 5*x^3 + 4*x^4)/((1 + x)^2*(1 - x)^3).
a(n) = 4*A047221(n)^2 = (10*n - 3*(-1)^n - 5)^2/4.
a(n) = A090773(n)^2. - Michel Marcus, May 25 2016
Sum_{n>=1} 1/a(n) = 2*Pi^2/(25*(5+sqrt(5))). - Amiram Eldar, Feb 16 2023

Extensions

Corrected and extended by Bruno Berselli, May 23 2016

A348491 Positive numbers whose square starts and ends with exactly one 9.

Original entry on oeis.org

3, 97, 303, 307, 313, 953, 957, 963, 967, 973, 977, 983, 987, 993, 3003, 3007, 3013, 3017, 3023, 3027, 3033, 3037, 3043, 3047, 3053, 3057, 3063, 3067, 3073, 3077, 3083, 3087, 3093, 3097, 3103, 3107, 3113, 3117, 3123, 3127, 3133, 3137, 3143, 9487, 9493, 9497, 9503, 9507, 9513, 9517
Offset: 1

Views

Author

Bernard Schott, Nov 02 2021

Keywords

Comments

When a square ends with 9, it ends with only one 9.
From Marius A. Burtea, Nov 02 2021 : (Start)
The sequence is infinite because the numbers 303, 3003, 30003, ..., 3*(10^k + 1), k >= 2, are terms with squares 91809, 9018009, 900180009, 90001800009, ... 9*(10^(2*k) + 2*10^k + 1), k >= 2.
Numbers 97, 967, 9667, 96667, 966667, ..., (29*10^n + 1) / 3, k >= 1, are terms and have no digits 0, because their squares are 9409, 935089, 93450889, 9344508889, 934445088889, ...
Also 963, 9663, 96663, 966663, 9666663, 96666663, ... (29*10^k - 11) / 3, k >= 2, are terms and have no digits 0, because their squares are 927369, 93373569, 9343735569, 934437355569, 93444373555569, 9344443735555569, ... (End)

Examples

			97^2 = 9409, hence 97 is a term.
997^2 = 994009, hence  997 is not a term.
		

Crossrefs

Subsequence of A305719, A063226, and A045863.
Cf. A017377, A045863, A273374 (squares ending with 9).
Similar to: A348487 (k=1), A348488 (k=4), A348489 (k=5), A348490 (k=6), this sequence (k=9).

Programs

  • Magma
    [3] cat [n:n in [4..9600]|Intseq(n*n)[1] eq 9 and Intseq(n*n)[#Intseq(n*n)] eq 9]; // Marius A. Burtea, Nov 02 2021
    
  • Mathematica
    Join[{3}, Select[Range[10, 10^4], (d = IntegerDigits[#^2])[[1]] == d[[-1]] == 9 && d[[2]] != 9 &]] (* Amiram Eldar, Nov 02 2021 *)
  • PARI
    isok(k) = my(d=digits(sqr(k))); (d[1]==9) && (d[#d]==9) && if (#d>2, (d[2]!=9) && (d[#d-1]!=9), 1); \\ Michel Marcus, Nov 03 2021
    
  • PARI
    list(lim)=my(v=List([3])); for(d=2, 2*#digits(lim\=1), my(s=sqrtint(9*10^(d-1)-1)+1); s+=[3,2,1,0,3,2,1,0,5,4][s%10+1]; forstep(n=s, min(sqrtint(10^d-10^(d-2)-1), lim), if(s%10==3, [4,6], [6,4]), listput(v, n))); Vec(v) \\ Charles R Greathouse IV, Nov 03 2021
  • Python
    from itertools import count, takewhile
    def ok(n):
      s = str(n*n); return len(s.rstrip("9")) == len(s.lstrip("9")) == len(s)-1
    def aupto(N):
      r = takewhile(lambda x: x<=N, (10*i+d for i in count(0) for d in [3, 7]))
      return [k for k in r if ok(k)]
    print(aupto(9517)) # Michael S. Branicky, Nov 02 2021
    

A152752 Terms of A118962 that are == 9 (mod 10), in the order of appearance.

Original entry on oeis.org

9, 9, 49, 49, 49, 49, 169, 169, 169, 169, 289, 169, 289, 169, 289, 169, 289, 169, 289, 169, 289, 529, 289, 529, 529, 289, 529, 289, 729, 529, 289, 729, 529, 289, 529, 729, 289, 529, 729, 529, 1089, 529, 729, 1089, 529, 729, 529, 1089, 1369, 529, 729, 1089
Offset: 1

Views

Author

Paul Curtz, Dec 12 2008

Keywords

Crossrefs

Extensions

Edited by N. J. A. Sloane, Dec 13 2008
a(11) corrected and more terms from Georg Fischer, Oct 29 2024
Showing 1-3 of 3 results.