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

A135928 Digital roots of the Mersenne primes.

Original entry on oeis.org

3, 7, 4, 1, 1, 4, 1, 1, 1, 4, 4, 1, 4, 1, 1, 1, 1, 1, 4, 1, 4, 4, 4, 4, 4, 1, 1, 4, 1, 1, 1, 4, 4, 1, 4, 4, 4, 4, 1, 1, 1, 4, 1, 4, 4, 1, 4, 4
Offset: 1

Views

Author

Ant King, Dec 07 2007

Keywords

Comments

As a consequence of the fact that all prime numbers are of the form 6n-1 or 6n+1 for p>3, all the elements of this sequence after the second will be either 1 or 4, although there is no obvious pattern to their distribution. We can use this result to show that all Mersenne primes after the first are congruent to 1, modulo 6.

Examples

			The fourth Mersenne prime is 127, which has a digital root of 1. Hence a(4)=1.
		

Crossrefs

Programs

  • Mathematica
    DigitalRoot[n_]:=FixedPoint[Plus@@IntegerDigits[ # ]&,n];data1=Select[Range[4500],PrimeQ[2^#-1] &];data2=2^#-1 &/@data1;DigitalRoot/@data2

Formula

a(n) = A010888(A000668(n)).
For n > 2, a(n) = (A000043(n) mod 3)^2. - Jens Kruse Andersen, Jul 29 2014

Extensions

a(40)-a(43) (using A000043) from Jens Kruse Andersen, Jul 29 2014
a(44)-a(48) from mersenne.org added by M Sayer, Jan 05 2023

A217870 Decimal expansion of sqrt(sqrt(2 + sqrt(3))).

Original entry on oeis.org

1, 3, 8, 9, 9, 1, 0, 6, 6, 3, 5, 2, 4, 1, 4, 7, 7, 1, 7, 9, 1, 1, 5, 4, 8, 8, 1, 1, 9, 9, 2, 2, 1, 0, 1, 0, 2, 1, 9, 6, 0, 8, 9, 9, 0, 3, 5, 3, 9, 2, 0, 5, 0, 5, 2, 6, 5, 1, 8, 2, 2, 0, 1, 4, 3, 3, 1, 7, 5, 9, 4, 4, 0, 8, 8, 4, 6, 7, 7, 4, 4, 8, 6, 8, 3, 8, 6, 1, 3, 8, 6, 0, 8, 2, 2, 2, 9, 1, 7, 3, 1, 1, 1, 1, 0
Offset: 1

Views

Author

Arkadiusz Wesolowski, Oct 13 2012

Keywords

Comments

It can be used for a Lucas-Lehmer test of prime numbers.
The value is equal to e^(log(2 + sqrt(3))/4) = e^A182023.

Examples

			1.389910663524147717911548811992210102196089903539205052651822014331759...
		

Crossrefs

Programs

  • Magma
    SetDefaultRealField(RealField(100)); Sqrt(Sqrt(2 + Sqrt(3))); // G. C. Greubel, Sep 29 2018
  • Maple
    evalf(sqrt(sqrt(2+sqrt(3))),120); # Muniru A Asiru, Sep 30 2018
  • Mathematica
    RealDigits[N[Sqrt@Sqrt[2 + Sqrt[3]], 200]][[1]]
  • Maxima
    fpprec : 100$ bfloat(sqrt(sqrt(2 + sqrt(3)))); /* Martin Ettl, Oct 15 2012 */
    
  • PARI
    default(realprecision, 200); x=sqrt(sqrt(2+sqrt(3))); for(n=1, 200, d=floor(x); x=(x-d)*10; print1(d, ", "));
    

Formula

Equals (2+sqrt(3))^(1/4). - Vaclav Kotesovec, Oct 18 2014

A182023 Decimal expansion of log(2+sqrt(3))/4.

Original entry on oeis.org

3, 2, 9, 2, 3, 9, 4, 7, 4, 2, 3, 1, 2, 0, 4, 1, 7, 7, 1, 5, 6, 2, 6, 1, 5, 8, 6, 8, 2, 6, 9, 9, 2, 1, 1, 1, 0, 0, 6, 7, 4, 5, 4, 9, 2, 8, 6, 6, 8, 7, 9, 1, 1, 9, 9, 4, 2, 1, 1, 8, 0, 6, 4, 2, 3, 0, 1, 1, 5, 0, 4, 6, 3, 5, 4, 1, 1, 0, 9, 9, 4, 0, 1, 8, 5, 5, 4, 7, 5, 3, 3, 6, 2, 5, 2, 5, 4, 4, 5
Offset: 0

Views

Author

N. J. A. Sloane, Apr 06 2012

Keywords

Examples

			0.32923947423120417715626158682699211100674549286687911994211...
		

References

  • Gottfried Helms and others, Postings to Sequence Fans Mailing List, Apr 05 2012

Crossrefs

Cf. A003010.
Equals A065918/4.

Programs

A227615 Number of bits necessary to represent u(n) in binary, where u is the Lucas-Lehmer sequence: u(0) = 100 (in binary); for n>0, u(n) = u(n-1)^2 - 2.

Original entry on oeis.org

3, 4, 8, 16, 31, 61, 122, 244, 487, 973, 1946, 3892, 7783, 15565, 31130, 62259, 124517, 249033, 498066, 996131, 1992262, 3984524, 7969047, 15938093, 31876185, 63752369, 127504737, 255009473, 510018945, 1020037890, 2040075780
Offset: 0

Views

Author

Olivier de Mouzon, Jul 17 2013

Keywords

Comments

a(0)=3, a(1)=4 and for n>=1, a(n+1) is 2*a(n) or 2*a(n)-1.
It seems the rule to decide between the 2 is not straightforward. So you actually need to compute u(n) to have its required number of bits.
Yet, for n>=1, we have a lower bound: a(n) >= 2^n and an upper bound: a(n) <= 2^(n+1).

Examples

			For n=2, u(2) = 194, log_2(u(2)) is between 7.5 and 7.6, so E(log_2(u(2))) = 7, so a(2) = E(log_2(u(2))) + 1 = 8. And indeed, u(2) = 194 (in base 10) = 11000010 in base 2 requires 8 bits (all bits above are 0).
		

Crossrefs

Programs

  • PARI
    lista(nn) = {a = 4; print1(#binary(a), ", "); for (n=1, nn, a = a^2-2; print1(#binary(a), ", "););} \\ Michel Marcus, Apr 04 2016

Formula

a(n) = E(log_2(u(n))) + 1, where E(x) is the integer part of x and u is defined by: u(0) = 4 (or 100 in binary) and for n>0, u(n) = u(n-1)^2 - 2.
a(n) = A070939(A003010(n)). - Michel Marcus, Apr 04 2016

Extensions

Terms from a(19) on from Michel Marcus, Apr 04 2016

A319749 a(n) is the numerator of the Heron sequence with h(0)=3.

Original entry on oeis.org

3, 11, 119, 14159, 200477279, 40191139395243839, 1615327685887921300502934267457919, 2609283532796026943395592527806764363779539144932833602430435810559
Offset: 0

Views

Author

Paul Weisenhorn, Sep 27 2018

Keywords

Comments

The denominator of the Heron sequence is in A319750.
The following relationship holds between the numerator of the Heron sequence and the numerator of the continued fraction A041018(n)/A041019(n) convergent to sqrt(13).
n even: a(n)=A041018((5*2^n-5)/3).
n odd: a(n)=A041018((5*2^n-1)/3).
More generally, all numbers c(n)=A078370(n)=(2n+1)^2+4 have the same relationship between the numerator of the Heron sequence and the numerator of the continued fraction convergent to 2n+1.
sqrt(c(n)) has the continued fraction 2n+1; n,1,1,n,4n+2.
hn(n)^2-c(n)*hd(n)^2=4 for n>1.
From Peter Bala, Mar 29 2022: (Start)
Applying Heron's method (sometimes called the Babylonian method) to approximate the square root of the function x^2 + 4, starting with a guess equal to x, produces the sequence of rational functions [x, 2*T(1,(x^2+2)/2)/x, 2*T(2,(x^2+2)/2)/( 2*x*T(1,(x^2+2)/2) ), 2*T(4,(x^2+2)/2)/( 4*x*T(1,(x^2+2)/2)*T(2,(x^2+2)/2) ), 2*T(8,(x^2+2)/2)/( 8*x*T(1,(x^2+2)/2)*T(2,(x^2+2)/2)*T(4,(x^2+2)/2) ), ...], where T(n,x) denotes the n-th Chebyshev polynomial of the first kind. The present sequence is the case x = 3. Cf. A001566 and A058635 (case x = 1), A081459 and A081460 (essentially the case x = 4). (End)

Examples

			A078370(2)=29.
hn(0)=A041046(0)=5; hn(1)=A041046(3)=27; hn(2)=A041046(5)=727;
hn(3)=A041046(13)=528527.
		

Crossrefs

2*T(2^n,x/2) modulo differences of offset: A001566 (x = 3 and x = 7), A003010 (x = 4), A003487 (x = 5), A003423 (x = 6), A346625 (x = 8), A135927 (x = 10), A228933 (x = 18).

Programs

  • Maple
    hn[0]:=3:  hd[0]:=1:
    for n from 1 to 6 do
    hn[n]:=(hn[n-1]^2+13*hd[n-1]^2)/2:
    hd[n]:=hn[n-1]*hd[n-1]:
       printf("%5d%40d%40d\n", n, hn[n], hd[n]):
    end do:
    #alternative program
    a := n -> if n = 0 then 3 else simplify( 2*ChebyshevT(2^(n-1), 11/2) ) end if:
    seq(a(n), n = 0..7); # Peter Bala, Mar 16 2022
  • Python
    def aupton(nn):
        hn, hd, alst = 3, 1, [3]
        for n in range(nn):
            hn, hd = (hn**2 + 13*hd**2)//2, hn*hd
            alst.append(hn)
        return alst
    print(aupton(7)) # Michael S. Branicky, Mar 16 2022

Formula

h(n) = hn(n)/hd(n); hn(0)=3; hd(0)=1.
hn(n+1) = (hn(n)^2+13*hd(n)^2)/2.
hd(n+1) = hn(n)*hd(n).
A041018(n) = A010122(n)*A041018(n-1) + A041018(n-2).
A041019(n) = A010122(n)*A041019(n-1) + A041019(n-2).
From Peter Bala, Mar 16 2022: (Start)
a(n) = 2*T(2^(n-1),11/2) for n >= 1, where T(n,x) denotes the n-th Chebyshev polynomial of the first kind.
a(n) = 2*T(2^n, 3*sqrt(-1)/2) for n >= 2.
a(n) = ((11 + 3*sqrt(13))/2)^(2^(n-1)) + ((11 - 3*sqrt(13))/2)^(2^(n-1)) for n >= 1.
a(n+1) = a(n)^2 - 2 for n >= 1.
a(n) = A057076(2^(n-1)) for n >= 1.
Engel expansion of (1/6)*(13 - 3*sqrt(13)); that is, (1/6)*(13 - 3*sqrt(13)) = 1/3 + 1/(3*11) + 1/(3*11*119) + .... (Define L(n) = (1/2)*(n - sqrt(n^2 - 4)) for n >= 2 and show L(n) = 1/n + L(n^2-2)/n. Iterate this relation with n = 11. See also Liardet and Stambul, Section 4.)
sqrt(13) = 6*Product_{n >= 0} (1 - 1/a(n)).
sqrt(13) = (9/5)*Product_{n >= 0} (1 + 2/a(n)). See A001566. (End)

Extensions

a(6) and a(7) added by Peter Bala, Mar 16 2022

A382437 a(n) = a(n-1)^2 + 4 * a(n-1), with a(0) = 2.

Original entry on oeis.org

2, 12, 192, 37632, 1416317952, 2005956546822746112, 4023861667741036022825635656102100992, 16191462721115671781777559070120513664958590125499158514329308740975788032
Offset: 0

Views

Author

V. Barbera, Mar 25 2025

Keywords

Crossrefs

Programs

  • Mathematica
    NestList[#*(4 + #) &, 2, 8] (* Paolo Xausa, Apr 01 2025 *)
  • PARI
    a(n)=if(n, a(n-1)^2 + 4*a(n-1), 2);
    vector(8, i, a(i-1))

Formula

a(n) = A003010(n) - 2.
a(n)/2 = A002812(n) - 1.
For n > 1: a(n) = 3 * 2^(2*n) * Product_{i = 0..n-2} A002812(i)^2.
Conjecture: a(n) = Sum_{k=1..2^n} (2^n * 2^k * binomial(2^n + k - 1, 2*k - 1) / k).

A105850 a(n+1) = a(n)^2 - 2^(2^n+1) with a(1) = 8.

Original entry on oeis.org

8, 56, 3104, 9634304, 92819813433344, 8615517765800787268541087744, 74227146372828989101844394431169040459931374583287906304
Offset: 1

Views

Author

Douglas Stones (dssto1(AT)student.monash.edu.au), Apr 22 2005

Keywords

Comments

Lehmer used this sequence in his proof of the Lucas-Lehmer test.

Crossrefs

Cf. A003010.

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,a^2-2^(2^n+1)}; Transpose[NestList[nxt,{1,8},7]][[2]] (* Harvey P. Dale, Jul 24 2013 *)

Formula

a(n) = 2^(2^(n-1))*A003010(n).

A261532 Hall's sequence g_n.

Original entry on oeis.org

7, 589, 11064985, 7835767761026353, 7859104819806710982081319640824417, 15811975313589523224392147529414564125936123169432771986649715567359169
Offset: 3

Views

Author

Joerg Arndt, Aug 24 2015

Keywords

Crossrefs

Programs

  • Magma
    [n le 1 select 7 else 2*(Self(n-1)-1)*(1+2^(n+1)*(Self(n-1)-1)) + 1: n in [1..6]]; // Vincenzo Librandi, Aug 24 2015
  • PARI
    N=11;  g=vector(N);  g[3] = 7;
    for (n=3, N-1, g[n+1] = 2*(g[n]-1)*(1+2^n*(g[n]-1))+1 );
    vector(N-3, j, g[j+2])
    

Formula

a(n) = g(n) where g(3) = 7 and g(n+1) = 2*(g(n)-1)*(1+2^n*(g(n)-1)) + 1.
Previous Showing 31-38 of 38 results.