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-36 of 36 results.

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

A146344 Records in A146326.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 18, 20, 26, 34, 42, 48, 50, 52, 54, 60, 66, 72, 76, 80, 84, 94, 96, 102, 104, 114, 122, 126, 130, 140, 148, 152, 156, 158, 178, 190, 192, 196, 202, 204, 206, 210, 228, 234, 248, 258, 268, 276, 294, 322, 332, 348, 352, 374, 376, 380, 398
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Crossrefs

Programs

  • Maple
    146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: read("transforms") ; a26 := [seq(A146326(n),n=1..1000)] ; RECORDS(a26)[1] ; # R. J. Mathar, Sep 06 2009
  • Mathematica
    f[n_] := Length @ ContinuedFraction[(1 + Sqrt[n])/2][[-1]]; fmax = -1; seq = {}; Do[f1 = f[n]; If[f1 > fmax, fmax = f1; AppendTo[seq, f1]], {n, 1, 10^4}]; seq (* Amiram Eldar, Apr 02 2020 *)

Formula

a(n) = A146326(A146345(n)). - Amiram Eldar, Apr 02 2020

Extensions

42 inserted by R. J. Mathar, Sep 06 2009
a(1) inserted and more terms added by Amiram Eldar, Apr 02 2020

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

A146477 Numbers k for which A146326(k) is different from A146326(j) for j < k.

Original entry on oeis.org

2, 5, 6, 17, 18, 31, 41, 43, 73, 89, 94, 106, 118, 151, 172, 193, 211, 241, 265, 268, 331, 334, 337, 379, 394, 409, 421, 433, 463, 489, 521, 526, 601, 604, 619, 634, 673, 694, 718, 721, 751, 769, 886, 919, 929, 937, 1033, 1039, 1114, 1174, 1201, 1249, 1291, 1321, 1324, 1471, 1516, 1579, 1609
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

This sequence is sorted A146343.
Original name was: a(n) = smallest numbers which continued fractions have different period.

Crossrefs

Programs

  • Maple
    f:= proc(n) if issqr(n) then 0 else nops(numtheory:-cfrac((1+sqrt(n))/2,periodic,quotients)[2]) fi end proc:
    S:= {0}: R:= NULL: count:= 0:
    for n from 2 while count < 30 do
      v:= f(n);
      if not member(v,S) then
         count:= count+1; R:= R, n; S:= S union {v};
      fi
    od:
    R; # Robert Israel, May 02 2021
  • 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; Do[If[aa[[k]] == n && yes == 0, AppendTo[bb, k]; yes = 1], {k, 1, Length[aa]}], {n, 1, 22}]; Sort[bb]

Extensions

19 replaced by 18, 331 and 334 inserted by R. J. Mathar, Nov 08 2008
Name clarified by Robert Israel, May 02 2021

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-36 of 36 results.