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.

A090566 a(1) = 1; thereafter a(n) = smallest number > a(n-1) such that the concatenation of a(n-1) and a(n) is a square.

Original entry on oeis.org

1, 6, 25, 281, 961, 6201, 59409, 187600, 730641, 4429444, 28600025, 85336064, 468650384, 4590568025, 23901253604, 36922256164, 228378872384, 519390415729, 3999576229761, 22053449580964, 52752598923921, 67153745961316, 346596997521321, 2205389504844676, 32117901134901281
Offset: 1

Views

Author

Amarnath Murthy, Dec 11 2003

Keywords

Comments

From David W. Wilson, Nov 22 2015: (Start)
I used the following algorithm to extend the sequence:
x = a(n);
d = number of digits in x;
p = (10^d + 1)*x; #concat(x, x)
q = (floor(sqrt(p)) + 1)^2; #smallest square > p
if (q < (10^d)(x + 1))
a(n+1) = q mod (10^d); #last d digits of q
else
p = (10^d)*(10x + 1); #concat(x, 10^d)
q = (floor(sqrt(p - 1)) + 1)^2; #smallest square >= p
a(n+1) = q mod (10^(d + 1)); #last d+1 digits of q.
(End)

Crossrefs

See A082209 for another version. Cf. A243091.

Programs

  • Maple
    A[1]:= 1:
    for n from 2 to 100 do
      x:= A[n-1];
      d:= ilog10(x)+1;
      for dp from d while not assigned(A[n]) do
        if dp = d then
          ymin:= x+1
        else
          ymin:= 10^(dp-1)
        fi;
        zmin:= 10^dp*x + ymin;
        r:= isqrt(zmin);
        if r^2 < zmin then z:= (r+1)^2
        else z:= r^2
        fi;
        if z <= 10^dp*x + 10^dp - 1 then
            A[n]:= z - 10^dp*x;
        fi
      od
    od:
    seq(A[i],i=1..100); # Robert Israel, Nov 22 2015
  • Mathematica
    a[1] = 1; a[n_] := Block[{x = a[n - 1], d = 1 + Floor@ Log10@ a[n - 1]}, q = (Floor@ Sqrt[(10^d + 1) x] + 1)^2; If[q < (10^d) (x + 1), Mod[q, 10^d], Mod[(Floor@ Sqrt[(10^d)(10x + 1) -1] + 1)^2, 10^(d + 1)]]]; Array[a, 25] (* after the algorithm of David W. Wilson, Robert G. Wilson v, Nov 22 2015 *)
  • PARI
    A090566(n,show=0,a=1)={for(i=2,n,show&&print1(a","); a=A243091(a));a} \\ Use 2nd optional arg to print out intermediate values, 3rd optional arg to use another starting value. - M. F. Hasler, Nov 22 2015, revised version based on A243091: Nov 24 2015

Formula

a(n+1) = A243091(a(n)). - M. F. Hasler, Nov 24 2015

Extensions

Corrected and extended by David W. Wilson, Nov 20 2015

A265155 Integers which are unique starting points for the algorithm described in A090566.

Original entry on oeis.org

1, 2, 4, 8, 10, 11, 14, 15, 16, 17, 18, 19, 21, 22, 23
Offset: 1

Views

Author

Robert G. Wilson v, Dec 02 2015

Keywords

Comments

Consider the family of integer sequences generated from a starting value b(1) and the rule that each subsequent term is the smallest number greater than the previous term such that the concatenation of the two is a square. Then using
b(1) = a(1) = 1 yields {1, 6, 25, 281, 961, ...} (A090566),
b(1) = a(2) = 2 yields {2, 5, 29, 241, 1809, ...} (A265147),
b(1) = a(3) = 4 yields {4, 9, 61, 504, 4516, ...} (A265148),
b(1) = a(4) = 8 yields {8, 41, 209, 764, 5225, ...} (A265149),
b(1) = a(5) = 10 yields {10, 24, 336, 400, 689, ...} (A265150),
b(1) = a(6) = 11 yields {11, 56, 169, 744, 769, ...} (A265151),
...

Examples

			The complement of {a(n)} is {3, 5, 6, 7, 9, 12, 13, 20, ...}; using any of these values as b(1) yields a sequence that quickly merges into one of the sequences obtained using a value from {a(n)} as b(1):
  b(1) =  3 -> {3, 6, 25, 281, 961, ...},    which quickly merges into A090566
    (as does the result of using b(1) = 6 or 12 or 20 ...);
  b(1) =  5 -> {5, 29, 241, 1809, ...},      which quickly merges into A265147
    (as does the result of using b(1) = 7 ...);
  b(1) =  9 -> {9, 61, 504, 4516, ...},      which quickly merges into A265148;
  b(1) = 13 -> {13, 69, 169, 744, 769, ...}, which quickly merges into A265151.
		

Crossrefs

Programs

A082210 Square root of the squares arising in A082209.

Original entry on oeis.org

1, 4, 8, 7, 31, 248, 71, 4, 8, 7, 31, 248, 71, 4, 8, 7, 31, 248, 71, 4, 8, 7, 31, 248, 71, 4, 8, 7, 31, 248, 71, 4, 8, 7, 31, 248, 71, 4, 8, 7, 31, 248, 71, 4, 8, 7, 31, 248, 71, 4, 8, 7, 31, 248, 71, 4, 8, 7, 31, 248, 71, 4, 8, 7, 31, 248, 71, 4, 8, 7, 31, 248, 71, 4, 8, 7, 31, 248
Offset: 1

Views

Author

Amarnath Murthy, Apr 10 2003

Keywords

Comments

The squares are given in A090567. - M. F. Hasler, Nov 24 2015

Examples

			a(3) = 31 = 961^(1/2) where A082209(3) = 9 and A082209(4) = 61.
		

Crossrefs

Cf. A082209.

Programs

  • Mathematica
    Join[{1},LinearRecurrence[{0, 0, 0, 0, 0, 1},{4, 8, 7, 31, 248, 71},77]] (* Ray Chandler, Aug 26 2015 *)
  • PARI
    A082210(n)=n<2||return([248,71,4,8,7,31][n%6+1]) \\ M. F. Hasler, Nov 24 2015

Formula

a(n) = {A082209(n) concatenated with A082209(n+1)}^(1/2).
Periodic with period 6 from n=2 onward. - Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 20 2003
a(n) = sqrt(A090567(n)) with A090567(n) = A082209(n) concat A243091(A082209(n)). - M. F. Hasler, Nov 24 2015

Extensions

Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 20 2003
Definition corrected and minor edits by M. F. Hasler, Nov 24 2015
Showing 1-3 of 3 results.