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

A173989 a(n) is the 2-adic valuation of A173300(n).

Original entry on oeis.org

0, 0, 1, 1, 2, 1, 3, 3, 4, 3, 5, 5, 6, 5, 7, 7, 8, 7, 9, 9, 10, 9, 11, 11, 12, 11, 13, 13, 14, 13, 15, 15, 16, 15, 17, 17, 18, 17, 19, 19, 20, 19, 21, 21, 22, 21, 23, 23, 24, 23, 25, 25, 26, 25, 27, 27, 28, 27, 29, 29, 30, 29, 31, 31, 32, 31, 33, 33, 34, 33, 35, 35, 36, 35, 37, 37, 38, 37
Offset: 1

Views

Author

J. Lowell, Mar 04 2010

Keywords

Comments

Conjecture: always follows the pattern A, A, A+1, A, where A is an odd number.

Crossrefs

Programs

  • Maple
    From R. J. Mathar, Mar 20 2010: (Start)
    A173300 := proc(n) local x,y ; x := (1+sqrt(3))/2 ; y := (1-sqrt(3))/2 ; denom(expand(x^n+y^n)) ; end proc:
    A173989 := proc(n) log[2](A173300(n)) ; end proc: seq(A173989(n),n=3..100) ; (End)
  • Mathematica
    Log2[Denominator[Map[First, NestList[{Last[#], Last[#] + First[#]/2} &, {1, 2}, 100]]]] (* Paolo Xausa, Feb 01 2024, after Nick Hobson in A173300 *)
  • PARI
    \\ using Max Alekseyev's function in A173300
    A173300(n) = denominator(2*polcoeff( lift( Mod((1+x)/2, x^2-3)^n ), 0))
    for(k=1,74,print1(logint(A173300(k),2),", ")) \\ Hugo Pfoertner, Oct 10 2018

Formula

a(n) = log(A173300(n))/log(2).
Apparently a(n) = A102302(n) for n >= 7. - Hugo Pfoertner, Oct 10 2018
Conjectures from Colin Barker, Oct 10 2018: (Start)
G.f.: x^3*(1 + x^2 - x^3 + x^4) / ((1 - x)^2*(1 + x)*(1 + x^2)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n > 7.
(End)
Apparently a(n) = A116921(n) for n>=3. - R. J. Mathar, Aug 29 2025

Extensions

More terms from R. J. Mathar and Max Alekseyev, Mar 20 2010

A173299 Numerators of fractions x^n + y^n, where x + y = 1 and x^2 + y^2 = 2.

Original entry on oeis.org

1, 2, 5, 7, 19, 13, 71, 97, 265, 181, 989, 1351, 3691, 2521, 13775, 18817, 51409, 35113, 191861, 262087, 716035, 489061, 2672279, 3650401, 9973081, 6811741, 37220045, 50843527, 138907099, 94875313, 518408351, 708158977, 1934726305, 1321442641
Offset: 1

Views

Author

J. Lowell, Feb 15 2010

Keywords

Comments

x and y are given by -A152422 and 1-A152422. - R. J. Mathar, Mar 01 2010
Letting f(n) = x^n + y^n, recurrence relation f(n) = f(n - 1) + f(n - 2)/2 implies a(n) / A173300(n) = A026150(n) / 2^(n - 1). - Nick Hobson, Jan 30 2024

Examples

			a(3) = 5 because x^3 + y^3 is 2.5 and 2.5 is 5/2.
		

Crossrefs

Cf. A173300 (denominators).

Programs

  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(2*x^2-2*x-1); S:=[ r^n+(1-r)^n: n in [1..34] ]; [ Numerator(RationalField()!S[j]): j in [1..#S] ]; // Klaus Brockhaus, Mar 02 2010
    
  • Maple
    A173299 := proc(n) local x,y ; x := (1+sqrt(3))/2 ; y := (1-sqrt(3))/2 ; expand(x^n+y^n) ; numer(%) ; end proc: # R. J. Mathar, Mar 01 2010
  • Mathematica
    Module[{x=(1-Sqrt[3])/2,y},y=1-x;Table[x^n+y^n,{n,40}]]//Simplify// Numerator (* Harvey P. Dale, Aug 24 2019 *)
  • PARI
    { a(n) = numerator( 2 * polcoeff( lift( Mod((1+x)/2,x^2-3)^n ), 0) ) }
    
  • Python
    from fractions import Fraction
    def a173299_gen(a, b):
        while True:
            yield a.numerator
            b, a = b + Fraction(a, 2), b
    g = a173299_gen(1, 2)
    print([next(g) for  in range(34)])  # _Nick Hobson, Feb 20 2024

Formula

a(n) = numerator of ((1 + sqrt(3))/2)^n + ((1 - sqrt(3))/2)^n.

Extensions

Formula, more terms, and PARI script from Max Alekseyev, Feb 24 2010
More terms from Klaus Brockhaus and R. J. Mathar, Mar 01 2010

A305491 a(n) = numerator(r(n)) where r(n) = (((1/2)*(sqrt(3) + 1))^n - ((1/2)*(sqrt(3) - 1))^n * cos(Pi*n))/sqrt(3).

Original entry on oeis.org

0, 1, 1, 3, 2, 11, 15, 41, 7, 153, 209, 571, 195, 2131, 2911, 7953, 679, 29681, 40545, 110771, 37829, 413403, 564719, 1542841, 263445, 5757961, 7865521, 21489003, 7338631, 80198051, 109552575, 299303201, 12776743, 1117014753, 1525870529, 4168755811, 1423656585
Offset: 0

Views

Author

Peter Luschny, Jun 02 2018

Keywords

Comments

Let f(x, y) = ((y+1)^x - (y-1)^x * cos(Pi*x))/(y * 2^x). Then f(n, sqrt(3)) are the rational numbers a(n)/A060723(n) and f(n, sqrt(5)) the Fibonacci numbers A000045(n).
From Paul Curtz, Dec 05 2018: (Start)
The binomial inverse of the rational sequence r(n) starts 0, 1, -1, 3/2, -2, 11/4, -15/4, 41/8, -7, 153/16, -209/16, ... and is up to signs equal to r(n). The difference table starts:
0, 1, 1, 3/2, 2, 11/4, 15/4, 41/8, ...
1, 0, 1/2, 1/2, 3/4, 1, 11/8, 15/8, ...
-1, 1/2, 0, 1/4, 1/4, 3/8, 1/2, 11/16, ...
3/2, -1/2, 1/4, 0, 1/8, 1/8, 3/16, 1/4, ...
...
Let s(n) = 2*r(n+1) - r(n) then s(n) = 1, 2, 5/2, 7/2, 19/4, 13/2, ... = A173299(n)/A173300(n) for n >= 1. (End)

Crossrefs

Cf. A060723 (denominators), A060755, A000045, A305492.

Programs

  • Mathematica
    Table[Numerator[Simplify[((1/2 (Sqrt[3] + 1))^x - (1/2 (Sqrt[3] - 1))^x Cos[Pi  x])/Sqrt[3]]], {x, 0, 36}]

Formula

A recurrence for r(n) is given in A060723.

A274845 a(0)=1, a(1)=0, a(4n+2) = a(4n+3) = a(4n+5) = (4^(n+1) +(-1)^n)/5, a(4n+4) = (2*4^(n+1) -3*(-1)^n)/5.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 3, 3, 7, 3, 13, 13, 25, 13, 51, 51, 103, 51, 205, 205, 409, 205, 819, 819, 1639, 819, 3277, 3277, 6553, 3277, 13107, 13107, 26215, 13107, 52429, 52429, 104857, 52429, 209715, 209715, 419431, 209715, 838861, 838861, 1677721, 838861, 3355443
Offset: 0

Views

Author

Paul Curtz, Jul 08 2016

Keywords

Comments

Antidiagonals of the array in A274613 written as a triangle:
1,
0, 1/2,
0, 1/2, 1/4,
0, 0, 1/2, 1/8,
0, 0, 1/4, 3/8, 1/16,
... .
a(n) is the numerators of the antidiagonal sums i.e. 1, 0, 1/2, 1/2, 1/4, 1/2, 3/8, 3/8, 7/16, 3/8, 13/32, 13/32, 25/64, 13/32, ... = a(n)/b(n).
The denominators b(n) are A173300(n).
a(0)+a(1) = 1, a(4n+2) +a(4n+3) +a(4n+4) +a(4n+5) = 4, 16, 64, 256, ... .

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,0,0,3,0,0,0,4}, {1,0,1,1,1,1,3,3}, 50] (* G. C. Greubel, Jul 08 2016 *)
  • PARI
    Vec((1+x^2+x^3-2*x^4+x^5)/((1-2*x^2)*(1+2*x^2)*(1+x^4)) + O(x^60)) \\ Colin Barker, Jul 22 2016

Formula

a(4n) = A102900(n), a(4n+1) = A015521(n), a(4n+2) = a(4n+3) = A015521(n+1).
a(n) = 3*a(n-4) + 4*a(n-8). - G. C. Greubel, Jul 08 2016
G.f.: (1+x^2+x^3-2*x^4+x^5) / ((1-2*x^2)*(1+2*x^2)*(1+x^4)). - Colin Barker, Jul 22 2016

Extensions

More terms from Colin Barker, Jul 22 2016
Showing 1-4 of 4 results.