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 51-56 of 56 results.

A307453 a(n) is the least prime p for which the continued fraction expansion of sqrt(p) has exactly n consecutive 1's starting at position 2.

Original entry on oeis.org

2, 3, 31, 7, 13, 3797, 5273, 4987, 90371, 79873, 2081, 111301, 1258027, 5325101, 12564317, 9477889, 47370431, 709669249, 1529640443, 2196104969, 392143681, 8216809361, 30739072339, 200758317433, 370949963971, 161356959383, 1788677860531, 7049166342469, 4484287435283, 3690992602753
Offset: 0

Views

Author

Michel Marcus, Apr 09 2019

Keywords

Examples

			For p = 2,  we have [1; 2, ...]; see A040000.
For p = 3,  we have [1; 1, 2, ...]; see A040001.
For p = 31, we have [5; 1, 1, 3, ...]; see A010129.
For p = 7,  we have [2; 1, 1, 1, 4, ...]; see A010121.
		

Crossrefs

Programs

  • PARI
    isok(p, n) = {my(c=contfrac(sqrt(p)));  for (k=2, n+1, if (c[k] != 1, return (0));); return(c[n+2] !=  1);}
    a(n) = {my(p=2); while (! isok(p, n), p = nextprime(p+1)); p;}

Formula

Limit_{n->infinity} (sqrt(a(n)) - floor(sqrt(a(n)))) = A094214. - Daniel Suteu, Apr 09 2019

Extensions

a(21)-a(29) from Daniel Suteu, Apr 09 2019
a(0) added by Chai Wah Wu, Apr 09 2019

A084642 A Jacobsthal ratio.

Original entry on oeis.org

1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1
Offset: 0

Views

Author

Paul Barry, Jun 08 2003

Keywords

Comments

The Jacobsthal recurrence means that A001045(n+1)/A001045(n) = 1 + 2/(A001045(n)/A001045(n-1)). The sequence of these fractions alternates after the first terms values just above 2 and just below 2, because the mapping x -> 1+2/x is concave in the neighborhood of x=2, where x=2 is an attractor. As a consequence, this sequence here iterates like A040001 or A000034 after a few terms. - R. J. Mathar, Sep 17 2008
Decimal expansion of 433/3300. - Elmo R. Oliveira, May 06 2024

Crossrefs

Programs

  • Magma
    [1,3] cat [1+ (n mod 2): n in [2..120]]; // G. C. Greubel, Mar 20 2023
    
  • Mathematica
    Table[(3-(-1)^n)/2 +Boole[n==1], {n,0,120}] (* G. C. Greubel, Mar 20 2023 *)
  • SageMath
    [1 + (n%2) + int(n==1) for n in range(121)] # G. C. Greubel, Mar 20 2023

Formula

a(n) = floor(A001045(n+2)/A001045(n+1)).
a(n) = floor((2^(n+2) - (-1)^(n+2))/(2^(n+1) - (-1)^(n+1))).
From G. C. Greubel, Mar 20 2023: (Start)
a(n) = A000034(n) + [n=1].
a(n) = a(n-2), for n > 3, with a(0) = 1, a(1) = 3, a(2) = 1, a(3) = 2.
G.f.: (1 + 3*x - x^3)/(1-x^2).
E.g.f.: (1/2)*(2*x + 3*exp(x) - exp(-x)). (End)

A154388 Triangle T(n,k), 0<=k<=n, read by rows given by [0,1,-1,0,0,0,0,0,0,0,...] DELTA [1,-1,-1,1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Philippe Deléham, Jan 08 2009

Keywords

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1, 0;
  0, 0, 0, 1;
  0, 0, 0, 1, 0;
  0, 0, 0, 0, 0, 1; ...
		

Formula

Sum_{k=0..n} T(n,k)*x^(n-k) = A135528(n+1), A000012(n), A040001(n), A153284(n+1) for x = 0,1,2,3 respectively.
G.f.: (1+y*x+(y-y^2)*x^2)/(1-y^2*x^2). - Philippe Deléham, Dec 17 2011
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A000012(n), A158302(n) for x = 0, 1, 2 respectively. - Philippe Deléham, Dec 17 2011

A175921 Period 5: repeat [1, 2, 2, -1, 1].

Original entry on oeis.org

1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1
Offset: 1

Views

Author

Jaroslav Krizek, Oct 17 2010

Keywords

Crossrefs

Programs

Extensions

Edited by Joerg Arndt, Sep 16 2013

A064849 Period of continued fraction for sqrt(3)*n.

Original entry on oeis.org

2, 2, 2, 2, 4, 8, 2, 4, 10, 4, 2, 8, 6, 2, 2, 8, 6, 20, 4, 8, 14, 8, 8, 12, 16, 2, 30, 2, 16, 4, 18, 16, 10, 20, 16, 20, 18, 8, 6, 12, 2, 12, 8, 8, 6, 20, 20, 20, 30, 36, 6, 2, 8, 68, 14, 2, 16, 32, 22, 4, 38, 18, 40, 36, 6, 28, 10, 20, 40, 8, 4, 40, 18, 22, 16, 12, 28, 2, 46, 20, 98, 8
Offset: 1

Views

Author

R. K. Guy, Oct 26 2001

Keywords

Examples

			A040001 (cfrac for n=1) has period length 2, so a(1)=2. A040008 (cfrac for n=2) has period length 2, so a(2)=2. A040021 (cfrac for =3) has period length 2, so a(3)=2. - _R. J. Mathar_, Feb 10 2016
		

Programs

  • Mathematica
    Table[Length[Last[ContinuedFraction[Sqrt[3] n]]], {n, 128}]

A307530 Primes p for which the continued fraction expansion of sqrt(p) has a single 1 starting at second position.

Original entry on oeis.org

3, 23, 47, 59, 61, 79, 97, 137, 139, 163, 167, 191, 193, 223, 251, 281, 283, 313, 317, 349, 353, 359, 389, 397, 431, 433, 439, 479, 521, 523, 563, 569, 571, 613, 617, 619, 659, 661, 673, 719, 727, 769, 773, 823, 827, 829, 839, 881, 883, 887, 941, 947, 953, 1009
Offset: 1

Views

Author

Michel Marcus, Apr 13 2019

Keywords

Comments

Misak and Ulas prove that the density of primes with k ones is 1/(Fibonacci(k+3)*Fibonacci(k+1)) = 1/3, here with k=1 (a single 1).

Examples

			For p = 3,  we have [1; 1, 2, ...]; see A040001.
For p = 27, we have [4; 1, 3, ...]; see A010127.
For p = 47, we have [6; 1, 5, ...]; see A010137.
		

Crossrefs

Programs

  • PARI
    isok(p) = my(cf = contfrac(sqrt(p))); (cf[2] == 1) && (cf[3] != 1);
    lista(nn) = forprime(p=2, nn, if (isok(p), print1(p, ", ")));
Previous Showing 51-56 of 56 results.