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.

Previous Showing 31-39 of 39 results.

A146358 Primes p such that continued fraction of (1 + sqrt(p))/2 has period 13: primes in A333640.

Original entry on oeis.org

421, 757, 1021, 1097, 1117, 1301, 1553, 1973, 2069, 2237, 2273, 2789, 2861, 3373, 3461, 3517, 3877, 3917, 4133, 4397, 4481, 5521, 5573, 5717, 6221, 6317, 6637, 6997, 7253, 7517, 8741, 9049, 9173, 9437, 10181, 10949, 11597, 11789, 12497, 15473, 15797, 16141, 18353
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[2*10^4], PrimeQ[#] && Length[ContinuedFraction[(1+Sqrt[#])/2][[2]]] == 13 &] (* Amiram Eldar, Mar 30 2020 *)
    Select[Prime[Range[2500]],Length[ContinuedFraction[(1+Sqrt[#])/2][[2]]]==13&] (* Harvey P. Dale, Mar 05 2023 *)

Extensions

Definition corrected, 3 terms added. - R. J. Mathar, Nov 08 2008
More terms from Amiram Eldar, Mar 30 2020

A146359 Primes p such that continued fraction of (1 + sqrt(p))/2 has period 14: primes in A146337.

Original entry on oeis.org

179, 251, 307, 347, 467, 587, 683, 1987, 5099, 5683, 7883, 8059, 8707, 12227, 14867, 15083, 15227, 22283, 34883, 40627, 42787, 47819, 50147, 51683, 68147, 73547, 78467, 84523, 84979, 89051, 95219, 104947, 106451, 107699, 132707, 134291, 142811, 149939, 164051
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Crossrefs

Programs

  • Maple
    A := proc(n) local c; try c := numtheory[cfrac](1/2+sqrt(n)/2,'periodic,quotients') ; RETURN(nops(c[2]) ); catch: RETURN(-1) end try ; end: isA146337 := proc(n) if A(n) = 14 then RETURN(true); else RETURN(false); fi; end: isA146359 := proc(n) RETURN(isprime(n) and isA146337(n)) ; end: for k from 1 do if isA146359(ithprime(k)) then printf("%d, ",ithprime(k)) ; fi; od: # R. J. Mathar, Nov 08 2008
  • Mathematica
    Select[Range[2*10^4], PrimeQ[#] && Length[ContinuedFraction[(1+Sqrt[#])/2][[2]]] == 14 &] (* Amiram Eldar, Mar 30 2020 *)

Extensions

5813 and 6791 removed, extended beyond 8707 by R. J. Mathar, Nov 08 2008
More terms from Amiram Eldar, Mar 30 2020

A146361 Primes p such that continued fraction of (1 + sqrt(p))/2 has period 16 : primes in A146339.

Original entry on oeis.org

191, 311, 431, 647, 1319, 1487, 2351, 5527, 9431, 19087, 21143, 24359, 27239, 29207, 32183, 34367, 36791, 38711, 41759, 42071, 43063, 43319, 49367, 58271, 58391, 59399, 62327, 65183, 66239, 77543, 82759, 84263, 87407, 90271, 93967, 94463, 97127, 100703, 101063
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[2*10^4], PrimeQ[#] && Length[ContinuedFraction[(1+Sqrt[#])/2][[2]]] == 16 &] (* Amiram Eldar, Mar 30 2020 *)
    Select[Prime[Range[10000]],Length[ContinuedFraction[(1+Sqrt[#])/2][[2]]]==16&] (* Harvey P. Dale, Apr 12 2025 *)

Extensions

3391 removed - R. J. Mathar, Sep 06 2009
More terms from Amiram Eldar, Mar 30 2020

A333640 Numbers k such that the continued fraction of (1 + sqrt(k))/2 has period 13.

Original entry on oeis.org

421, 757, 1021, 1097, 1117, 1241, 1301, 1553, 1625, 1649, 1973, 2069, 2125, 2237, 2249, 2273, 2665, 2789, 2861, 3085, 3349, 3373, 3461, 3517, 3545, 3877, 3917, 4133, 4397, 4481, 4573, 4589, 4885, 5389, 5521, 5573, 5713, 5717, 6185, 6221, 6317, 6637, 6997, 7093
Offset: 1

Views

Author

Amiram Eldar, Mar 31 2020

Keywords

Comments

For primes in this sequence see A146358.

Examples

			a(1) = 421 because the continued fraction of (1 + sqrt(421))/2 = 10, 1, 3, 6, 1, 1, 2, 2, 1, 1, 6, 3, 1, 19, 1, 3, 6, ... has a period (1, 3, 6, 1, 1, 2, 2, 1, 1, 6, 3, 1, 19) of length 13.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^4], !IntegerQ @ Sqrt[#] && Length[ContinuedFraction[(1 + Sqrt[#])/2][[2]]] == 13 &]

A146329 Numbers k such that continued fraction of (1 + sqrt(k))/2 has period 4.

Original entry on oeis.org

6, 7, 8, 14, 20, 23, 24, 28, 32, 33, 34, 42, 47, 48, 52, 55, 60, 62, 69, 72, 75, 78, 79, 80, 95, 98, 110, 119, 120, 126, 133, 135, 136, 138, 140, 141, 142, 156, 167, 168, 174, 180, 189, 194, 205, 210, 213, 215, 219, 220, 222, 223, 224, 248, 252, 254, 272, 287, 288
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

For primes in this sequence see A028871 - {2}.

Examples

			a(2) = 7 because continued fraction of (1 + sqrt(7))/2 = 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, ... has period (1,1,4,1) length 4.
		

Crossrefs

Programs

  • Maple
    isA146329 := proc(n) RETURN(A146326(n) = 4) ; end:
    for n from 2 to 400 do if isA146329(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Sep 06 2009
  • Mathematica
    cf4Q[n_]:=Module[{s=(1+Sqrt[n])/2},If[IntegerQ[s],1,Length[ ContinuedFraction[ s][[2]]]]==4]; Select[Range[300],cf4Q] (* Harvey P. Dale, Dec 14 2017 *)

Extensions

39, 68, 150, 155, etc. removed by R. J. Mathar, Sep 06 2009

A146334 Numbers k such that continued fraction of (1 + sqrt(k))/2 has period 10.

Original entry on oeis.org

43, 67, 116, 129, 134, 161, 162, 184, 218, 242, 243, 246, 270, 274, 297, 301, 314, 338, 339, 345, 354, 356, 407, 411, 451, 452, 459, 465, 475, 498, 515, 517, 532, 534, 561, 563, 590, 591, 595, 597, 603, 611, 638, 648, 657, 665, 669, 671, 690, 705, 715
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

For primes in this sequence see A146355.

Examples

			a(1) = 43 because continued fraction of (1+Sqrt[43])/2 = 3, 1, 3, 1, 1, 12, 1, 1, 3, 1, 5, 1, 3, 1, 1, 12, 1, 1, 3, 1, 5, 1, 3, 1, 1, 12, 1, 1, 3, 1, ... has period (1, 3, 1, 1, 12, 1, 1, 3, 1, 5) length 10.
		

Crossrefs

Programs

  • Maple
    A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146334 := proc(n) RETURN(A146326(n) = 10) ; end: for n from 2 to 715 do if isA146334(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Sep 06 2009
  • Mathematica
    cf10Q[n_]:=Module[{s=(1+Sqrt[n])/2,x},x=If[IntegerQ[s],1,Length[ ContinuedFraction[ s][[2]]]];x==10]; Select[Range[750],cf10Q] (* Harvey P. Dale, Sep 22 2015 *)

Extensions

284 removed by R. J. Mathar, Sep 06 2009

A107356 Period of continued fraction for (1 + square root of n-th squarefree integer)/2.

Original entry on oeis.org

2, 2, 1, 4, 4, 2, 2, 1, 4, 2, 3, 6, 2, 6, 4, 2, 1, 2, 8, 4, 4, 2, 3, 6, 6, 5, 4, 10, 8, 4, 2, 1, 4, 6, 6, 6, 3, 4, 3, 6, 10, 4, 6, 8, 9, 6, 2, 4, 4, 2, 2, 1, 6, 2, 7, 8, 2, 12, 4, 9, 3, 6, 12, 6, 18, 6, 7, 4, 6, 7, 6, 6, 14, 4, 2, 2, 12, 10, 6, 6, 4, 10, 7, 4, 18, 4, 4, 2, 3, 6, 5, 20, 14, 8, 5, 12, 6, 10
Offset: 1

Views

Author

Steven Finch, May 24 2005

Keywords

Examples

			a(7) = 2 because 11 is the 7th smallest squarefree integer and (1 + sqrt 11)/2 = [2,6,3,6,3,6,3,... ] thus has an eventual period of 2. We omit 1 from the list of squarefree integers.
		

Crossrefs

Programs

  • Mathematica
    (* first do *) Needs["NumberTheory`NumberTheoryFunctions`"] (* then *) s = Drop[ Select[ Range[162], SquareFreeQ[ # ] &], 1]; Length[ ContinuedFraction[ # ][[2]]] & /@ ((1 + Sqrt[s])/2) (* Robert G. Wilson v, May 27 2005 *)
    Length[ContinuedFraction[(Sqrt[#]+1)/2][[2]]]&/@Select[Range[ 2,200], SquareFreeQ] (* Harvey P. Dale, Aug 16 2021 *)

Formula

a(n) = A146326(A005117(n+1)). - R. J. Mathar, Sep 24 2009

Extensions

More terms from Robert G. Wilson v, May 27 2005

A146364 a(n) = smallest primes whose continued fraction have different period.

Original entry on oeis.org

2, 5, 7, 17, 19, 31, 41, 43, 73, 89, 103, 139, 151, 179, 191, 193, 211, 241, 271, 331, 337, 379, 409, 421, 433, 463, 487, 491, 521, 541, 571, 601, 619, 631, 673, 739, 751, 769, 823, 919, 929, 937, 1033, 1039, 1051, 1201, 1249, 1291, 1321, 1399, 1439, 1471, 1531, 1579, 1609, 1699, 1747, 1753, 1759
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

This sequence is sorted A146363.

Crossrefs

Programs

  • Maple
    g:= proc(n) local c;
          c:= NumberTheory:-ContinuedFraction((1+sqrt(n))/2);
          nops(Term(c,periodic)[2]);
    end proc:
    R:= NULL: S:= {}: count:= 0:
    p:= 1:
    while count < 100 do
      p:= nextprime(p);
      v:= g(p);
      if not member(v,S) then
        R:= R,p; count:= count+1; S:= S union {v};
        if count mod 20 = 0 then printf("%d %d\n",count,p) fi
      fi
    od:
    R; # Robert Israel, Jun 14 2024
  • Mathematica
    $MaxExtraPrecision = 300; s = 10; aa = {}; Do[k = ContinuedFraction[(1 + Sqrt[n])/2, 1000]; If[Length[k] < 190, AppendTo[aa, 0], m = 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; s = s + 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; AppendTo[aa, m]], {n, 1, 1200}]; Print[aa]; bb = {}; Do[k = 1; yes = 0&&PeimeQ[k]; Do[If[aa[[k]] == n && yes == 0, AppendTo[bb, k]; yes = 1], {k, 1, Length[aa]}], {n, 1, 22}]; Sort[bb] (*Artur Jasinski*)

Extensions

More terms from Robert Israel, Jun 14 2024

A146478 a(n) = length of period of continued fraction (1 + sqrt(prime(n)))/2.

Original entry on oeis.org

2, 2, 1, 4, 2, 1, 3, 6, 4, 1, 8, 3, 5, 10, 4, 1, 6, 3, 10, 8, 9, 4, 2, 7, 9, 3, 12, 6, 7, 7, 12, 6, 7, 18, 5, 20, 5, 18, 4, 1, 14, 5, 16, 15, 3, 20, 26, 4, 2, 1, 9, 12, 19, 14, 3, 12, 5, 24, 9, 15, 18, 1, 14, 16, 19, 3, 34, 21, 14, 9, 9, 4, 20, 7, 30, 8, 7, 5, 3, 27, 18, 13, 16, 23, 4, 2, 19, 23, 3
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

Subsequence of A146326 (length of period continued fraction of (1 + sqrt(n))/2).

Crossrefs

Programs

  • Maple
    A146478 := proc(p) local c; c := numtheory[cfrac](1/2+sqrt(p)/2,'periodic','quotients') ; nops(c[2]) ; end: for n from 1 to 100 do printf("%d,",A146478(ithprime(n))) ; od: # R. J. Mathar, Nov 05 2008
  • Mathematica
    Table[Length[ContinuedFraction[(1+Sqrt[Prime[n]])/2][[2]]],{n,100}] (* Zak Seidov, Mar 22 2011 *)

Extensions

a(59) changed from 7 to 9 by R. J. Mathar, Nov 05 2008
Previous Showing 31-39 of 39 results.