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.

A084068 a(1) = 1, a(2) = 2; a(2*k) = 2*a(2*k-1) - a(2*k-2), a(2*k+1) = 4*a(2*k) - a(2*k-1).

Original entry on oeis.org

1, 2, 7, 12, 41, 70, 239, 408, 1393, 2378, 8119, 13860, 47321, 80782, 275807, 470832, 1607521, 2744210, 9369319, 15994428, 54608393, 93222358, 318281039, 543339720, 1855077841, 3166815962, 10812186007, 18457556052, 63018038201, 107578520350
Offset: 1

Views

Author

Benoit Cloitre, May 10 2003

Keywords

Comments

The upper principal and intermediate convergents to 2^(1/2), beginning with 2/1, 3/2, 10/7, 17/12, 58/41, form a strictly decreasing sequence; essentially, numerators=A143609 and denominators=A084068. - Clark Kimberling, Aug 27 2008
From Peter Bala, Mar 23 2018: (Start)
Define a binary operation o on the real numbers by x o y = x*sqrt(1 + y^2) + y*sqrt(1 + x^2). The operation o is commutative and associative with identity 0. We have
a(2*n + 1) = 1 o 1 o ... o 1 (2*n + 1 terms) and
a(2*n) = (1/sqrt(2))*(1 o 1 o ... o 1) (2*n terms). Cf. A049629, A108412 and A143608.
This is a fourth-order divisibility sequence. Indeed, a(2*n) = U(2*n)/sqrt(2) and a(2*n+1) = U(2*n+1), where U(n) is the Lehmer sequence [Lehmer, 1930] defined by the recurrence U(n) = 2*sqrt(2)*U(n-1) - U(n-2) with U(0) = 0 and U(1) = 1. The solution to the recurrence is U(n) = (1/2)*( (sqrt(2) + 1)^n - (sqrt(2) - 1)^n ).
It appears that this sequence consists of those numbers m such that 2*m^2 = floor( m*sqrt(2) * ceiling(m*sqrt(2)) ). Cf. A084069. (End)
Conjecture: a(n) is the earliest occurrence of n in A348295, which is to say, a(n) is the least m such that Sum_{k=1..m} (-1)^(floor(k*(sqrt(2)-1))) = Sum_{k=1..m} (-1)^A097508(k) = n. This has been confirmed for the first 32 terms by Chai Wah Wu, Oct 21 2021. - Jianing Song, Jul 16 2022

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.

Crossrefs

Programs

  • Maple
    a := proc (n) if `mod`(n, 2) = 1 then (1/2)*(sqrt(2) + 1)^n - (1/2)*(sqrt(2) - 1)^n else (1/2)*((sqrt(2) + 1)^n - (sqrt(2) - 1)^n)/sqrt(2) end if;
    end proc:
    seq(simplify(a(n)), n = 1..30); # Peter Bala, Mar 25 2018
  • Mathematica
    a[n_] := ((Sqrt[2]+1)^n - (Sqrt[2]-1)^n) ((-1)^n(Sqrt[2]-2) + (Sqrt[2]+2))/8;
    Table[Simplify[a[n]], {n, 30}] (* after Paul Barry, Peter Luschny, Mar 29 2018 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -1,0,6,0]^(n-1)*[1;2;7;12])[1,1] \\ Charles R Greathouse IV, Jun 20 2015

Formula

"A Diofloortin equation": n such that 2*n^2=floor(n*sqrt(2)*ceiling(n*sqrt(2))).
a(n)*a(n+3) = -2 + a(n+1)*a(n+2).
From Paul Barry, Jun 06 2006: (Start)
G.f.: x*(1+x)^2/(1-6*x^2+x^4);
a(n) = ((sqrt(2)+1)^n-(sqrt(2)-1)^n)*((sqrt(2)/8-1/4)*(-1)^n+sqrt(2)/8+1/4);
a(n) = Sum_{k=0..floor(n/2)} 2^k*(C(n,2*k)-C(n-1,2*k+1)*(1+(-1)^n)/2). (End)
A000129(n+1) = A079496(n) + a(n). - Gary W. Adamson, Sep 18 2007
Equals A133566 * A000129, where A000129 = the Pell sequence. - Gary W. Adamson, Sep 18 2007
From Peter Bala, Mar 23 2018: (Start)
a(2*n + 2) = a(2*n + 1) + sqrt( (1 + a(2*n + 1)^2)/2 ).
a(2*n + 1) = 2*a(2*n) + sqrt( (1 + 2*a(2*n)^2) ).
More generally,
a(2*n+2*m+1) = sqrt(2)*a(2*n) o a(2*m+1), where o is the binary operation defined above, that is,
a(2*n+2*m+1) = sqrt(2)*a(2*n)*sqrt(1 + a(2*m+1)^2) + a(2*m+1)*sqrt(1 + 2*a(2*n)^2).
sqrt(2)*a(2*(n + m)) = (sqrt(2)*a(2*n)) o (sqrt(2)*a(2*m)), that is,
a(2*n+2*m) = a(2*n)*sqrt(1 + 2*a(2*m)^2) + a(2*m)*sqrt(1 + 2*a(2*n)^2).
sqrt(1 + 2*a(2*n)^2) = A001541(n).
1 + 2*a(2*n)^2 = A055792(n+1).
a(2*n) - a(2*n-1) = A001653(n).
(1 + a(2*n+1)^2)/2 = A008844(n). (End)
a(n) = A000129(n) for even n and A001333(n) for odd n. - R. J. Mathar, Oct 15 2021

A221874 Numbers m such that 10*m^2 + 6 is a square.

Original entry on oeis.org

1, 5, 43, 191, 1633, 7253, 62011, 275423, 2354785, 10458821, 89419819, 397159775, 3395598337, 15081612629, 128943316987, 572704120127, 4896450447169, 21747674952197, 185936173675435, 825838944063359, 7060678149219361, 31360132199455445
Offset: 1

Views

Author

Bruno Berselli, Jan 28 2013

Keywords

Comments

The Diophantine equation 10*x^2 + k = y^2, for |k| < 10, has integer solutions with the following k values:
k = 1, the nonnegative x values are in A084070;
k = -1, " A097315;
k = 4, " 2*A084070;
k = -4, " 2*A097315;
k = 6, " this sequence;
k = -6, " A221875;
k = 9, " A075836;
k = -9, " A052454.
a(n+1)/a(n) tends alternately to (sqrt(2)+sqrt(5))^2/3 and (2*sqrt(2)+sqrt(5))^2/3; a(n+2)/a(n) tends to A176398^2.

Crossrefs

Programs

  • Magma
    m:=22; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+x)*(1+4*x+x^2)/((1-6*x-x^2)*(1+6*x-x^2))));
    
  • Maple
    A221874:=proc(q)
    local n;
    for n from 1 to q do if type(sqrt(10*n^2+6),integer) then print(n);
    fi; od; end:
    A221874(100000000000000000); # Paolo P. Lava, Feb 11 2013
  • Mathematica
    LinearRecurrence[{0, 38, 0, -1}, {1, 5, 43, 191}, 22]
  • Maxima
    makelist(expand(((-5*(-1)^n+2*sqrt(10))*(3+sqrt(10))^(2*floor(n/2))-(5*(-1)^n+2*sqrt(10))*(3-sqrt(10))^(2*floor(n/2)))/10), n, 1, 22);

Formula

G.f.: x*(1+x)*(1+4*x+x^2)/((1-6*x-x^2)*(1+6*x-x^2)).
a(n) = ((-5*(-1)^n+2*t)*(3+t)^(2*floor(n/2)) - (5*(-1)^n+2*t)*(3-t)^(2*floor(n/2)))/10, where t=sqrt(10).
a(n) = 2*A129556(n) + 1.
a(n)*a(n-3) - a(n-1)*a(n-2) = -36 + 12(-1)^n.

A207832 Numbers x such that 20*x^2 + 1 is a perfect square.

Original entry on oeis.org

0, 2, 36, 646, 11592, 208010, 3732588, 66978574, 1201881744, 21566892818, 387002188980, 6944472508822, 124613502969816, 2236098580947866, 40125160954091772, 720016798592704030
Offset: 0

Views

Author

Gary Detlefs, Feb 20 2012

Keywords

Comments

Denote as {a,b,c,d} the second-order linear recurrence a(n) = c*a(n-1) + d*a(n-2) with initial terms a, b. The following sequences and recurrence formulas are related to integer solutions of k*x^2 + 1 = y^2.
.
k x y
- ----------------------- -----------------------
2 A001542 {0,2,6,-1} A001541 {1,3,6,-1}
3 A001353 {0,1,4,-1} A001075 {1,2,4,-1}
5 A060645 {0,4,18,-1} A023039 {1,9,18,-1}
6 A001078 {0,2,10,-1} A001079 {1,5,10,-1}
7 A001080 {0,3,16,-1} A001081 {1,8,16,-1}
8 A001109 {0,1,6,-1} A001541 {1,3,6,-1}
10 A084070 {0,1,38,-1} A078986 {1,19,38,-1}
11 A001084 {0,3,20,-1} A001085 {1,10,20,-1}
12 A011944 {0,2,14,-1} A011943 {1,7,14,-1}
13 A075871 {0,180,1298,-1} A114047 {1,649,1298,-1}
14 A068204 {0,4,30,-1} A069203 {1,15,30,-1}
15 A001090 {0,1,8,-1} A001091 {1,4,8,-1}
17 A121740 {0,8,66,-1} A099370 {1,33,66,-1}
18 A202299 {0,4,34,-1} A056771 {1,17,34,-1}
19 A174765 {0,39,340,-1} A114048 {1,179,340,-1}
20 a(n) {0,2,18,-1} A023039 {1,9,18,-1}
21 A174745 {0,12,110,-1} A114049 {1,55,110,-1}
22 A174766 {0,42,394,-1} A114050 {1,197,394,-1}
23 A174767 {0,5,48,-1} A114051 {1,24,48,-1}
24 A004189 {0,1,10,-1} A001079 {1,5,10,-1}
26 A174768 {0,10,102,-1} A099397 {1,51,102,-1}
The sequence of the c parameter is listed in A180495.

Crossrefs

Programs

  • Magma
    m:=16; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(2*x/(1-18*x+x^2))); // Bruno Berselli, Jun 19 2019
    
  • Maple
    readlib(issqr):for x from 1 to 720016798592704030 do if issqr(20*x^2+1) then print(x) fi od;
  • Mathematica
    LinearRecurrence[{18, -1}, {0, 2}, 16] (* Bruno Berselli, Feb 21 2012 *)
    Table[2 ChebyshevU[-1 + n, 9], {n, 0, 16}]  (* Herbert Kociemba, Jun 05 2022 *)
  • Maxima
    makelist(expand(((2+sqrt(5))^(2*n)-(2-sqrt(5))^(2*n))/(4*sqrt(5))), n, 0, 15); /* Bruno Berselli, Jun 19 2019 */

Formula

a(n) = 18*a(n-1) - a(n-2).
From Bruno Berselli, Feb 21 2012: (Start)
G.f.: 2*x/(1-18*x+x^2).
a(n) = -a(-n) = 2*A049660(n) = ((2 + sqrt(5))^(2*n)-(2 - sqrt(5))^(2*n))/(4*sqrt(5)). (End)
a(n) = Fibonacci(6*n)/4. - Bruno Berselli, Jun 19 2019
For n>=1, a(n) = A079962(6n-3). - Christopher Hohl, Aug 22 2021

A084069 Numbers k such that 7*k^2 = floor(k*sqrt(7)*ceiling(k*sqrt(7))).

Original entry on oeis.org

1, 3, 17, 48, 271, 765, 4319, 12192, 68833, 194307, 1097009, 3096720, 17483311, 49353213, 278635967, 786554688, 4440692161, 12535521795, 70772438609, 199781794032, 1127918325583, 3183973182717, 17975920770719, 50743789129440
Offset: 1

Views

Author

Benoit Cloitre, May 10 2003

Keywords

Comments

This is a strong divisibility sequence, that is, GCD(a(n),a(m)) = a(GCD(n,m)) for all positive integers n and m. Consequently, this is a divisibility sequence: if n divides m then a(n) divides a(m). - Peter Bala, Sep 01 2019

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+3x+x^2)/(1-16x^2+x^4),{x,0,30}],x] (* or *) LinearRecurrence[{0,16,0,-1},{1,3,17,48},31] (* Harvey P. Dale, Oct 31 2011 *)

Formula

a(1)=1, a(2)=3, a(2n) = 6*a(2n-1)-a(2n-2); a(2n+1) = 3*a(2n)-a(2n-1).
a(n)*a(n+3) = -3 + a(n+1)*a(n+2).
G.f.: x*(1+3*x+x^2)/(1-16*x^2+x^4). [corrected by Harvey P. Dale, Oct 31 2011]
a(n) = 16*a(n-2) - a(n-4), n > 4. - Harvey P. Dale, Oct 31 2011
a(n) = U_n(sqrt(18),1) = (alpha^n - beta^n)/(alpha - beta) for n odd and a(n) = 3*U_n(sqrt(18),1) = (sqrt(2)/2)*(alpha^n - beta^n)/(alpha - beta) for n even, where U_n(sqrt(R),Q) denotes the Lehmer sequence with parameters R and Q and alpha = (sqrt(3) + sqrt(14))/2 and beta = (sqrt(3) - sqrt(14))/2. - Peter Bala, Sep 01 2019

A359800 a(n) is the least m such that the concatenation of n^2 and m is a square.

Original entry on oeis.org

6, 9, 61, 9, 6, 1, 284, 516, 225, 489, 104, 4, 744, 249, 625, 3201, 444, 9, 201, 689, 4201, 416, 984, 4801, 681, 5201, 316, 996, 5801, 601, 6201, 144, 936, 6801, 449, 7201, 7401, 804, 7801, 225, 8201, 8401, 6, 8801, 9001, 9201, 9401, 324, 9801, 19344, 769, 38025
Offset: 1

Views

Author

Mohammed Yaseen, Jan 13 2023

Keywords

Comments

The only one-digit terms are 1, 4, 6 and 9. Proof: Squares mod 10 are 0, 1, 4, 5, 6 and 9. Concatenation of a square and 0 is 10 times that square, which is not a square. So 0 is ruled out. Squares with last digit 5 have second last digit 2. Since no square ends in 2, 5 is also ruled out.
From Thomas Scheuerle, Jan 14 2023: (Start)
The only term with two digits is a(3) = 61.
Some terms with an odd number of digits appear infinitely often, for example, 516 for n = 8, 1352, 632958674, ... .
If a term has an even number of digits and is of the form 1+2*k*10^(d+1) with 10^d <= 2*k < 10^(d+1), then it appears only once at k = n in this sequence. Are terms with an even number of digits possible which are not of this form? (End)

Examples

			For n=3, 61 is the least number m such that the concatenation of 3^2 and m is a square: 961 = 31^2. So a(3) = 61.
For n=7, 284 is the least number m such that the concatenation of 7^2 and m is a square: 49284 = 222^2. So a(7) = 284.
		

Crossrefs

Programs

  • PARI
    a(n)={my(m=n^2, b=1); while(1, m*=10; my(r=(sqrtint(m+b-1)+1)^2-m); b*=10; if(rAndrew Howroyd, Jan 13 2023
  • Python
    from math import isqrt
    def a(n):
        t, k = str(n*n), isqrt(10*n**2)
        while not (s:=str(k*k)).startswith(t) or s[len(t)]=="0": k += 1
        return int(s[len(t):])
    print([a(n) for n in range(1, 53)]) # Michael S. Branicky, Jan 15 2023
    
  • Python
    from math import isqrt
    from sympy.ntheory.primetest import is_square
    def A359800(n):
        m = 10*n*n
        if is_square(m): return 0
        a = 1
        while (k:=(isqrt(a*(m+1)-1)+1)**2-m*a)>=10*a:
            a *= 10
        return k # Chai Wah Wu, Feb 15 2023
    

Formula

a(n) = A071176(n^2) = A071176(A000290(n)).
From Thomas Scheuerle, Jan 13 2023: (Start)
a(A084070(n)) = 1.
a(2*A084070(n)) = 4.
a(A221874(n)) = 6.
a(A075836(n)) = 9. (End)
Showing 1-5 of 5 results.