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.

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