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.

A177715 The position within sqrt(n) at which n first occurs.

This page as a plain text file.
%I A177715 #20 Sep 03 2024 08:26:22
%S A177715 0,4,2,0,36,38,4,1,0,88,19,51,221,318,48,0,11,98,24,143,60,40,8,108,0,
%T A177715 144,9,267,32,188,183,154,370,44,107,0,117,25,10,148,145,107,4,234,48,
%U A177715 298,252,31,0,102,211,119,178,352,118,224,63,9,107,103,239,130,94,0,16
%N A177715 The position within sqrt(n) at which n first occurs.
%C A177715 Determine position from the decimal point, and define a(n)=0 for perfect squares (A000290).
%H A177715 Amiram Eldar, <a href="/A177715/b177715.txt">Table of n, a(n) for n = 1..10000</a>
%e A177715 a(1)=0 because 1 is a perfect square.
%e A177715 a(2)=4 because the first "2" occurs at position 4 in "1.41421356...".
%e A177715 a(5)=36 because the first "5" occurs at position 36 in "2.236067977499789696409173668731276235"
%t A177715 max = 500; a[n_] := If[IntegerQ @ Sqrt[n], 0, SequencePosition[(r = RealDigits[ FractionalPart @ Sqrt[n], 10, max])[[1]], IntegerDigits[n]][[1, 1]] - r[[2]]]; Array[a, 100] (* _Amiram Eldar_, Sep 25 2020 *)
%Y A177715 Cf. A000290.
%K A177715 nonn,base
%O A177715 1,2
%A A177715 _Gil Broussard_, May 12 2010