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.

Showing 1-5 of 5 results.

A146348 Primes p such that continued fraction of (1 + sqrt(p))/2 has period 3.

Original entry on oeis.org

17, 37, 61, 101, 197, 257, 317, 401, 461, 557, 577, 677, 773, 1129, 1297, 1429, 1601, 1877, 1901, 2917, 3137, 4357, 4597, 5417, 5477, 6053, 7057, 8101, 8761, 8837, 10733, 11621, 12101, 13457, 13877, 14401, 15277, 15377, 15877, 16333, 16901, 17737, 17957, 18329, 21317, 22501, 23593, 24337, 25601, 28901, 30137, 30977, 32401, 33857, 41453, 41617, 42437, 44101
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

Primes in A146328. Finite A050952 is subset of this sequence.
From Michel Lagneau, Sep 03 2014: (Start)
The primes of the form p = n^2+1 for n>2 are in the sequence, and the continued fraction of (1+sqrt(p))/2 is [n/2; 1, 1, n-1, 1, 1, n-1, 1, 1, ...] with the period (1, 1, n-1).
We observe that the other primes {61, 317, 461, 557, 773, 1129, 1429, ...} are prime divisors of composite numbers of the form k^2+1 where k = 11, 114, 48, 118, 317, 168, 620, ... .
(End)
Another possibly infinite subset of the sequence is primes of the form 100*k^2-44*k+5, where the continued fraction is [5*k-1; 2, 2, 10*k-3, ...] with period [2, 2, 10*k-3]. This includes {61, 317, 773, 1429, 4597, 6053, ...}. - Robert Israel, Sep 03 2014

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: isA146348 := proc(n) RETURN(isprime(n) and A146326(n) = 3) ; end: for n from 2 to 4000 do if isA146348(n) then printf("%d,\n",n) ; fi; od: # R. J. Mathar, Sep 06 2009
  • Mathematica
    okQ[n_] := Length[ContinuedFraction[(1 + Sqrt[n])/2][[2]]] == 3; Select[Prime[Range[100]], okQ]

Extensions

1019 removed; more terms added by R. J. Mathar, Sep 06 2009
More terms from Zak Seidov, Mar 09 2011

A146345 Indices in A146326 where records occur.

Original entry on oeis.org

1, 2, 6, 18, 31, 43, 94, 106, 151, 211, 331, 394, 526, 694, 751, 886, 919, 1114, 1324, 1726, 1759, 1831, 2011, 2311, 2326, 2671, 3019, 3691, 3754, 3931, 4174, 4951, 4999, 5119, 6211, 6406, 7606, 8254, 8719, 8779, 9244, 9619, 9739, 10399, 10651, 12919, 13126
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

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: read("transforms") ; a26 := [seq(A146326(n),n=1..1400)] ; RECORDS(a26)[2] ; # R. J. Mathar, Sep 06 2009
  • Mathematica
    f[n_] := Length@ContinuedFraction[(1 + Sqrt[n])/2][[-1]]; mx = -1; k = 1; lst = {}; While[k < 14000, a = f@k; If[a > mx, mx = a; AppendTo[lst, k]]; k++]; lst (* Robert G. Wilson v, Apr 11 2017 *)

Extensions

19 replaced by 18, 394 inserted, 4 more terms added by R. J. Mathar, Sep 06 2009
More terms from Robert G. Wilson v, Apr 11 2017

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
Showing 1-5 of 5 results.