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

A273375 Squares ending in digit 4.

Original entry on oeis.org

4, 64, 144, 324, 484, 784, 1024, 1444, 1764, 2304, 2704, 3364, 3844, 4624, 5184, 6084, 6724, 7744, 8464, 9604, 10404, 11664, 12544, 13924, 14884, 16384, 17424, 19044, 20164, 21904, 23104, 24964, 26244, 28224, 29584, 31684, 33124, 35344, 36864, 39204, 40804, 43264
Offset: 1

Views

Author

Vincenzo Librandi, May 24 2016

Keywords

Crossrefs

Cf. A017317 (numbers ending in 4), A017319 (cubes ending in 4).
Cf. similar sequences listed in A273373.

Programs

  • Magma
    /* By definition: */ [n^2: n in [0..200] | Modexp(n, 2, 10) eq 4];
    
  • Magma
    [(10*n+(-1)^n-5)^2/4: n in [1..50]];
  • Mathematica
    Table[(10 n + (-1)^n - 5)^2/4, {n, 1, 50}] (* or *) LinearRecurrence[{1, 2, -2, -1, 1}, {4, 64, 144, 324, 484}, 50]
    Select[Range[200]^2,Mod[#,10]==4&] (* or *) LinearRecurrence[{1,1,-1},{2,8,12},40]^2(* Harvey P. Dale, Aug 06 2017 *)

Formula

G.f.: 4*x*(1 + 15*x + 18*x^2 + 15*x^3 + x^4) /((1+x)^2*(1-x)^3).
a(n) = 4*A047209(n)^2 = (10*n + (-1)^n - 5)^2/4.
Sum_{n>=1} 1/a(n) = 2*Pi^2/(25*(5-sqrt(5))). - Amiram Eldar, Feb 16 2023
E.g.f.: (4 - 5*x + 25*x^2)*cosh(x) + (9 + 5*x + 25*x^2)*sinh(x) - 4. - Stefano Spezia, Feb 21 2025

Extensions

Edited by Bruno Berselli, May 24 2016

A273374 Squares ending in digit 9.

Original entry on oeis.org

9, 49, 169, 289, 529, 729, 1089, 1369, 1849, 2209, 2809, 3249, 3969, 4489, 5329, 5929, 6889, 7569, 8649, 9409, 10609, 11449, 12769, 13689, 15129, 16129, 17689, 18769, 20449, 21609, 23409, 24649, 26569, 27889, 29929, 31329, 33489, 34969, 37249, 38809
Offset: 1

Views

Author

Vincenzo Librandi, May 21 2016

Keywords

Comments

A quasipolynomial of order two and degree two: a(n) = 25n^2 - 30n + 9 if n is even and 25n^2 - 20n + 4 if n is odd. - Charles R Greathouse IV, Nov 03 2021

Crossrefs

Cf. A017377 (numbers ending in 9), A017379 (cubes ending in 9).
Cf. similar sequences listed in A273373.

Programs

  • Magma
    /* By definition: */ [n^2: n in [0..200] | Modexp(n,2,10) eq 9];
    
  • Magma
    [6+(50*(n-1)*n-5*(2*n-1)*(-1)^n+1)/2: n in [1..50]];
    
  • Mathematica
    Table[6 + (50 (n - 1) n - 5 (2 n - 1) (-1)^n + 1)/2, {n, 1, 50}]
  • PARI
    a(n)=(5*n-3+n%2)^2 \\ Charles R Greathouse IV, Nov 03 2021

Formula

G.f.: x*(9 + 40*x + 102*x^2 + 40*x^3 + 9*x^4)/((1 + x)^2*(1 - x)^3).
a(n) = 6 + (50*(n-1)*n - 5*(2*n-1)*(-1)^n + 1)/2.
a(n) = A063226(n)^2. - Seiichi Manyama, May 25 2016
Sum_{n>=1} 1/a(n) = Pi^2*(3-sqrt(5))/50. - Amiram Eldar, Feb 16 2023

Extensions

Corrected and extended by Bruno Berselli, May 21 2016

A273372 Squares ending in digit 1.

Original entry on oeis.org

1, 81, 121, 361, 441, 841, 961, 1521, 1681, 2401, 2601, 3481, 3721, 4761, 5041, 6241, 6561, 7921, 8281, 9801, 10201, 11881, 12321, 14161, 14641, 16641, 17161, 19321, 19881, 22201, 22801, 25281, 25921, 28561, 29241, 32041, 32761, 35721, 36481, 39601, 40401
Offset: 1

Views

Author

Vincenzo Librandi, May 21 2016

Keywords

Comments

Intersection of A000290 and A017281; also, union of A017282 and A017378. The square roots are in A017281 or in A017377 (numbers ending in 1 or 9, respectively). - David A. Corneth, May 22 2016

Crossrefs

Cf. A017281 (numbers ending in 1), A017283 (cubes ending in 1).
Cf. similar sequences listed in A273373.

Programs

  • Magma
    /* By definition: */ [n^2: n in [0..200] | Modexp(n,2,10) eq 1];
    
  • Magma
    [5*(10*n+(-1)^n-5)*(2*n+(-1)^n-1)/4+1: n in [1..50]];
    
  • Mathematica
    Table[5 (10 n + (-1)^n - 5) (2 n + (-1)^n - 1)/4 + 1, {n, 1, 50}]
  • Python
    A273372_list = [(10*n+m)**2 for n in range(10**3) for m in (1,9)] # Chai Wah Wu, May 24 2016
  • Ruby
    p (1..(n + 1) / 2).inject([]){|s, i| s + [(10 * i - 9) ** 2, (10 * i - 1) ** 2]}[0..n - 1] # Seiichi Manyama, May 24 2016
    

Formula

G.f.: x*(1 + 80*x + 38*x^2 + 80*x^3 + x^4) / ((1 + x)^2*(1 - x)^3).
a(n) = 10*A132356(n-1) + 1 = 5*(10*n+(-1)^n-5)*(2*n+(-1)^n-1)/4+1.
a(n) = (5*n - 5/2 + (3/2)*(-1)^n)^2 = 25*n^2 - 25*n + 17/2 + 15*n*(-1)^n - (15/2)*(-1)^n. - David A. Corneth, May 21 2016
a(n) = A090771(n)^2. - Michel Marcus, May 25 2016
Sum_{n>=1} 1/a(n) = Pi^2*(3+sqrt(5))/50. - Amiram Eldar, Feb 16 2023

Extensions

Edited by Bruno Berselli, May 24 2016

A348490 Positive numbers whose square starts and ends with exactly one 6.

Original entry on oeis.org

26, 246, 254, 256, 264, 776, 784, 786, 794, 796, 804, 806, 824, 826, 834, 836, 2454, 2456, 2464, 2466, 2474, 2476, 2484, 2486, 2494, 2496, 2504, 2506, 2514, 2516, 2524, 2526, 2534, 2536, 2544, 2546, 2554, 2556, 2564, 2566, 2594, 2596, 2604, 2606, 2614, 2616, 2624, 2626, 2634, 2636, 2644, 7746
Offset: 1

Views

Author

Bernard Schott, Oct 29 2021

Keywords

Comments

When a square ends with 6, it ends with only one 6.
From Marius A. Burtea, Oct 30 2021 : (Start)
The sequence is infinite because the numbers 806, 8006, 80006, ..., 8*10^k + 6, k >= 2, are terms with squares 649636, 64096036, 6400960036, 640009600036, ..., 64*10^(2*k) + 96*10^k + 36, k >= 2.
Numbers 796, 7996, 79996, 799996, 7999996, 79999996, ..., 10^k*8 - 4, k >= 2, are terms and have no digits 0, because their squares are 633616, 63936016, 6399360016, 639993600016, 63999936000016, 6399999360000016, ....
Also 794, 7994, 79994, 799994, ..., (8*10^k - 6), k >= 2, are terms and have no digits 0, because their squares are 630436, 63904036, 6399040036, 639990400036, 63999904000036, 6399999040000036, ... (End)

Examples

			26^2 = 676, hence 26 is a term.
814^2 = 662596, hence 814 is not a term.
		

Crossrefs

Cf. A045789, A045860, A273373 (squares ending with 6).
Similar to: A348487 (k=1), A348488 (k=4), A348489 (k=5), this sequence (k=6), A348491 (k=9).
Subsequence of A305719.

Programs

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