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.

A243091 Least number k > n such that n concatenated with k is a perfect square.

Original entry on oeis.org

1, 6, 5, 6, 9, 29, 25, 29, 41, 61, 24, 56, 25, 69, 44, 21, 81, 64, 49, 36, 25, 316, 201, 104, 336, 281, 244, 225, 224, 241, 276, 36, 49, 64, 81, 344, 100, 249, 44, 69, 96, 209, 436, 56, 89, 369, 225, 61, 400, 284, 176, 84, 441, 361, 76, 225, 169, 76, 564, 536, 84, 504, 500, 504, 516, 536
Offset: 0

Views

Author

Derek Orr, Aug 18 2014

Keywords

Comments

Records occur at: 0, 1, 4, 5, 8, 9, 13, 16, 21, 24, 35, 42, 52, 58, 67, 75, 80, ..., . - Robert G. Wilson v, Nov 23 2015

Examples

			a(1) = 6 since 6>1 and 16 = 4^2.
a(2) = 5 since 5>2 and 25 = 5^2.
		

Crossrefs

Cf. A090566.

Programs

  • Mathematica
    f[n_] := Block[{x = n, d = 1 + Floor@ Log10@ n}, q = (Floor@ Sqrt[(10^d + 1) x] + 1)^2; If[q < (10^d) (x + 1), Mod[q, 10^d], Mod[(Floor@ Sqrt[(10^d) (10 x + 1) - 1] + 1)^2, 10^(d + 1)]]]; Array[f, 65] (* Robert G. Wilson v, Nov 23 2015, after the algorithm of David W. Wilson in A090566 *)
    lnk[n_]:=Module[{k=n+1},While[!IntegerQ[Sqrt[n 10^IntegerLength[k]+k]],k++];k]; Array[lnk,70,0] (* Harvey P. Dale, Sep 01 2023 *)
  • PARI
    a(n)=s=Str(n); k=n+1; while(!issquare(eval(concat(s,Str(k)))), k++); return(k)
    vector(100, n, a(n))
    
  • PARI
    A048761 = t->(sqrtint(t-1)+1)^2
    A243091(n)={my(d=#Str(n),a=A048761((1+10^d)*n)); a>=(n+1)*10^d && a=A048761((n*10+1)*10^d); a%10^(d+(a>=100^d))} \\ M. F. Hasler, Nov 24 2015

Extensions

a(0)=1 added by N. J. A. Sloane, Nov 24 2015