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.

A045789 Squares with initial digit '6'.

Original entry on oeis.org

64, 625, 676, 6084, 6241, 6400, 6561, 6724, 6889, 60025, 60516, 61009, 61504, 62001, 62500, 63001, 63504, 64009, 64516, 65025, 65536, 66049, 66564, 67081, 67600, 68121, 68644, 69169, 69696, 600625, 602176, 603729, 605284, 606841
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Range[Ceiling[Sqrt[6 10^n]],Floor[Sqrt[7 10^n]]]^2,{n,5}]] (* Harvey P. Dale, Jun 15 2011 *)

Formula

a(n) = A045860(n)^2. - Michel Marcus, Sep 04 2021

A035073 a(n) is root of square starting with digit 6: first term of runs.

Original entry on oeis.org

8, 25, 78, 245, 775, 2450, 7746, 24495, 77460, 244949, 774597, 2449490, 7745967, 24494898, 77459667, 244948975, 774596670, 2449489743, 7745966693, 24494897428, 77459666925, 244948974279, 774596669242, 2449489742784, 7745966692415, 24494897427832, 77459666924149
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1998

Keywords

Crossrefs

Subsequence of A045860.
Cf. A067576 (squares), A035076 (2..9).

Programs

  • Python
    from math import isqrt
    def a(n): return isqrt(6*10**n) + 1
    print([a(n) for n in range(1, 28)]) # Michael S. Branicky, Aug 25 2021

Formula

a(n) = ceiling(sqrt(6*10^n)), n > 0.

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