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.

A056926 a(n) = sqrt(n) if n is a square, otherwise 1.

This page as a plain text file.
%I A056926 #12 Jun 07 2023 20:32:09
%S A056926 0,1,1,1,2,1,1,1,1,3,1,1,1,1,1,1,4,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,
%T A056926 1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,1,1,1,
%U A056926 1,1,1,1,1,1,1,1,1,1,1,1,1,9,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10,1,1,1,1
%N A056926 a(n) = sqrt(n) if n is a square, otherwise 1.
%C A056926 Like A037213, but has 1's instead of 0's for nonsquare n > 0. - _Antti Karttunen_, Jul 22 2018
%H A056926 Antti Karttunen, <a href="/A056926/b056926.txt">Table of n, a(n) for n = 0..65537</a>
%F A056926 a(n) = A007955(n)/A056925(n) = 1 + (sqrt(n)-1)*A010052(n), for all n >= 1.
%F A056926 a(n) = n^((d(n) mod 2)/2) for n>=1. - _Wesley Ivan Hurt_, Jun 07 2023
%e A056926 a(24) = 1 because 24 is not a square, a(25) = 5 because 25 = 5^2.
%t A056926 sq1[n_]:=Module[{sn=Sqrt[n]},If[IntegerQ[sn],sn,1]]; Array[sq1,110] (* _Harvey P. Dale_, Jul 25 2011 *)
%o A056926 (PARI) A056926(n) = if(issquare(n,&n),n,1); \\ _Antti Karttunen_, Jul 22 2018
%Y A056926 Cf. A000196, A037213.
%K A056926 easy,nonn
%O A056926 0,5
%A A056926 _Henry Bottomley_, Jul 12 2000
%E A056926 Term a(0) = 0 prepended by _Antti Karttunen_, Jul 22 2018