login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A096493 Number of distinct primes in continued fraction period of square root of n. 5

%I #11 Mar 18 2016 15:59:55

%S 0,1,1,0,0,1,0,0,0,0,1,1,0,1,0,0,0,0,2,1,1,1,1,0,0,0,1,2,1,1,2,0,1,0,

%T 0,0,0,0,0,1,1,1,2,1,1,2,1,0,0,0,1,1,1,1,1,1,0,0,2,1,2,0,0,0,0,0,3,0,

%U 1,1,2,1,1,0,0,2,2,0,1,0,0,0,0,0,0,1,1,1,2,1,1,1,0,3,1,1,1,0,0,0,0,0,1,1,0

%N Number of distinct primes in continued fraction period of square root of n.

%H Harvey P. Dale, <a href="/A096493/b096493.txt">Table of n, a(n) for n = 1..1000</a>

%e n=127: the period={3,1,2,2,7,11,7,2,2,1,3,22},

%e distinct-primes={2,3,7,11}, so a[127]=4;

%t {te=Table[0, {m}], u=1}; Do[s=Count[PrimeQ[Union[Last[ContinuedFraction[n^(1/2)]]]], True]; te[[u]]=s;u=u+1, {n, 1, m}];te

%t dpcf[n_]:=Module[{s=Sqrt[n]},If[IntegerQ[s],0,Count[Union[ ContinuedFraction[ s][[2]]],_?PrimeQ]]]; Array[dpcf,110] (* _Harvey P. Dale_, Mar 18 2016 *)

%Y Cf. A003285, A013646, A096491, A096492.

%K nonn

%O 1,19

%A _Labos Elemer_, Jun 29 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)