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 11-17 of 17 results.

A354492 Diagonal of A354703.

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 9, 7, 9, 4, 9, 16, 7, 16, 8, 14, 9, 12, 23, 13, 21, 8, 17, 32, 20, 28
Offset: 1

Views

Author

Hugo Pfoertner, Jun 22 2022

Keywords

Comments

a(n)-n is an indicator of whether the free space between the covered grid points and the perimeter of the square is relatively large. a(n)-n > 0 for n = 7, 12, 14, 19, 24, 26, ... . A comparison with the linked illustrations from A354702 shows that in all these cases the covering square is rotated by Pi/4 and that the next outer diagonal rows of grid points are very close to the perimeter of the covering square.
In these cases it is favorable if the difference from n*sqrt(2) to the next larger integer is as small as possible. This also fits with 7 and 12 being terms in A084068. Since A084068(5) = 41, it is expected that a record of a(n)-n will occur at a(41) = 41^2 - A354702(41,41) = 1681 - 1624 = 57 and a(n)-n = 16.

Crossrefs

A354707 is the analogous sequence, but for the problem of maximizing the number of grid points covered.

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

A348295 a(n) = Sum_{k=1..n} (-1)^(floor(k*(sqrt(2)-1))).

Original entry on oeis.org

0, 1, 2, 1, 0, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 3, 4, 3, 2, 1, 2, 3, 2, 1, 0, 1, 2, 1, 0, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 3, 4, 3, 2, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 3, 4, 5, 4, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 4, 5, 4, 3, 2, 3, 4, 3, 2, 3, 4, 5, 4
Offset: 0

Views

Author

Jianing Song, Oct 10 2021

Keywords

Comments

Problem B6 of the 81st William Powell Putnam Mathematical Competition (2020) asks to show that a(n) >= 0 for all n.
Conjecture: (1) Sequence is unbounded from above. Moreover, it seems that the earliest occurrence of m is A000129(m) for even m and A001333(m) for odd m (this has been confirmed for m <= 32 by Chai Wah Wu, Oct 21 2021). See A084068 for the conjectured indices of records.
(2) There are infinitely many 0's in the sequence. See A348299 for indices of 0. Since |a(n+1) - a(n)| = 1, (1)(2) together imply that this sequence hits every natural number infinitely many times.

Examples

			A097508(1)..A097508(10) = [0, 0, 1, 1, 2, 2, 2, 3, 3, 4], so a(10) = 1+1-1-1+1+1+1-1-1+1 = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[(-1)^Floor[k*(Sqrt[2] - 1)], {k, 1, n}]; Array[a, 100, 0] (* Amiram Eldar, Oct 11 2021 *)
  • PARI
    a(n) = sum(k=1, n, (-1)^(sqrtint(2*k^2)-k))
    
  • Python
    from math import isqrt
    def A348295(n): return sum(-1 if (isqrt(2*k*k)-k) % 2 else 1 for k in range(1,n+1)) # Chai Wah Wu, Oct 12 2021

Formula

a(n) = Sum_{k=1..n} (-1)^A097508(k).

A089499 a(0)=0; a(1)=1; a(2n) = 4*Sum_{k=0..n} a(2k-1); a(2n+1) = a(2n) + a(2n-1).

Original entry on oeis.org

0, 1, 4, 5, 24, 29, 140, 169, 816, 985, 4756, 5741, 27720, 33461, 161564, 195025, 941664, 1136689, 5488420, 6625109, 31988856, 38613965, 186444716, 225058681, 1086679440, 1311738121, 6333631924, 7645370045, 36915112104, 44560482149
Offset: 0

Views

Author

Charlie Marion, Nov 11 2003

Keywords

Comments

1, 4, 5, 24, 29, 140, ...= numerators in convergents to (sqrt(8) - 2) = continued fraction [0; 1, 4, 1, 4, 1, 4, ...]; where sqrt(8) - 2 = 0.828427124... = the inradius of a right triangle with hypotenuse 6, legs sqrt(32) and 2. Denominators of convergents to [0; 1, 4, 1, 4, 1, 4, ...] = A041011 starting (1, 5, 6, 29, 35, ...). - Gary W. Adamson, Dec 22 2007
This is a strong divisibility sequence, that is, gcd(a(n), a(m)) = a(gcd(n,m)) for all natural numbers n and m. - Peter Bala, May 12 2014

Crossrefs

Cf. A041011.

Programs

Formula

For n > 0, a(n) = A001333(n) + A084068(n-1)*(-1)^n.
a(n)*a(n+1) = A046729(n).
a(2n+1) = A001653(n); a(2n) = A005319(n).
a(1) = 1, a(2n) = 4*a(2n-1) + a(2n-2); a(2n-1) = a(2n-2) + a(2n-3). Given the 2 X 2 matrix X = [1, 4; 1, 5], [a(2n-1), a(2n)] = top row of X^n. The sequence starting (1, 4, 5, 24, 29, ...) = numerators in continued fraction [0; 1, 4, 1, 4, 1, 4, ...] = (sqrt(8) - 2) = 0.828427124... E.g., X^3 = [29, 140; 35, 169], where 29/35, 140/169 are convergents to (sqrt(8)-2). - Gary W. Adamson, Dec 22 2007
From R. J. Mathar, Jul 08 2009: (Start)
a(n) = A000129(n)*A000034(n+1).
a(n) = 6*a(n-2) - a(n-4).
G.f.: -x*(-1-4*x+x^2)/((x^2-2*x-1)*(x^2+2*x-1)). (End)
From Peter Bala, May 12 2014: (Start)
a(2*n + 1) = A041011(2*n + 1); a(2*n) = 4*A041011(2*n).
For n odd, a(n) = (alpha^n - beta^n)/(alpha - beta), and for n even, a(n) = 4*(alpha^n - beta^n)/(alpha^2 - beta^2), where alpha = 1 + sqrt(2) and beta = 1 - sqrt(2).
a(n) = Product_{j = 1..floor(n/2)} ( 4 + 4*cos^2(j*Pi/n) ) for n >= 1. (End)

Extensions

Corrected by T. D. Noe, Nov 08 2006
Definition corrected by Jonathan Sondow, Jun 06 2014

A143528 Array D of denominators of Best Remaining Upper Approximates of x=sqrt(2), by antidiagonals.

Original entry on oeis.org

1, 2, 3, 7, 4, 5, 12, 9, 6, 8, 41, 14, 11, 13, 10, 70, 19, 16, 18, 15, 17, 239, 24, 21, 23, 20, 22, 29, 408, 53, 26, 28, 25, 27, 34, 46, 1393, 82, 31, 33, 30, 32, 39, 51, 58, 2378, 111, 36, 38, 35, 37, 44, 56, 63, 75, 8119, 140, 65, 43, 40, 42, 49, 61, 68, 80
Offset: 1

Views

Author

Clark Kimberling, Aug 23 2008

Keywords

Comments

(1) Row 1 of R consists of the upper principal and upper intermediate convergents to x.
(2) (row limits of R) = x; (column limits of R) = 0.
(3) Every positive integer occurs exactly once in D, so that as a sequence, A143528 is a permutation of the positive integers.
(4) p=1+floor(q*r) for every p/q in R. Consequently, the terms of N are distinct and their ordered union is the sequence 1+A001951.
(5) Conjecture: Every (N(n,k+1)-N(n,k))/(D(n,k+1)-D(n,k)) is a lower principal convergent to x.
(6) Suppose n>=1 and p/q and s/t are consecutive terms in row n of R. Then (conjecture) p*t-q*s=n.

Examples

			Northwest corner of D:
1 2 7 12
3 4 9 14
5 6 11 16
8 13 18 23
Northwest corner of R:
2/1 3/2 10/7 17/12
5/3 6/4 13/9 20/14
8/5 9/6 16/11 23/16
12/8 19/13 26/18 33/23
		

References

  • C. Kimberling, "Best lower and upper approximates to irrational numbers," Elemente der Mathematik 52 (1997) 122-126.

Crossrefs

Formula

For any positive irrational number x, define an array D by successive rows as follows: D(n,k) = least positive integer q not already in D such that there exists an integer p such that 0 < p/q - x < c/d- x for every positive rational number c/d that has 0 < d < q. Thus p/q is the "best remaining upper approximate" of x when all better upper approximates are unavailable. For each q, define N(n,k)=p and R(n,k)=p/q. Then R is the "array of best remaining upper approximates of x," D is the corresponding array of denominators and N, of numerators.

A134569 a(n) = least m such that {-m*r} < {n*r}, where { } denotes fractional part and r = sqrt(2).

Original entry on oeis.org

2, 1, 2, 1, 12, 2, 1, 2, 1, 7, 2, 1, 2, 1, 2, 1, 12, 2, 1, 2, 1, 7, 2, 1, 2, 1, 2, 1, 70, 2, 1, 2, 1, 12, 2, 1, 2, 1, 7, 2, 1, 2, 1, 2, 1, 12, 2, 1, 2, 1, 7, 2, 1, 2, 1, 2, 1, 41, 2, 1, 2, 1, 12, 2, 1, 2, 1, 7, 2, 1, 2, 1, 2, 1, 12, 2, 1, 2, 1, 7, 2, 1, 2, 1, 2, 1, 12, 2, 1, 2, 1, 7, 2, 1, 2, 1, 2, 1, 70, 2
Offset: 1

Views

Author

Clark Kimberling, Nov 02 2007

Keywords

Comments

The defining inequality {-m*r} > {n*r} is equivalent to {m*r} + {n*r} < 1. Are all a(n) in A084068? Are all a(n) denominators of intermediate convergents to sqrt(2)?

Examples

			a(3)=2 because {-m*r} < {3*r} = 0.2426... for m=1 whereas
{-2*r} = 0.1715..., so that 2 is the least m for which
{-m*r} < {3*r}.
		

Crossrefs

Cf. A134568.

A134803 Numbers n such that the sum of all numbers of the same parity <= n is equal to the sum of numbers of the opposite parity from n+1 to n+m, where m is odd and > 1.

Original entry on oeis.org

3, 8, 119, 288, 4059, 9800
Offset: 1

Views

Author

Keywords

Examples

			3 -> 1+3 = 4 = 4
8 -> 2+4+6+8 = 20 = 9+11
119 -> 1+3+5+...+119 = 3600 = 120+122+...+168
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local a,k,i,s1,s2; for i from 1 by 1 to n do if 2*trunc(i/2)=i then s1:=sum('2*k','k'=1..(i/2)); else s1:=sum('2*k-1','k'=1..(i+1)/2); fi; a:=1; s2:=i+1; while s1>s2 do a:=a+2; s2:=s2+i+a; od; if s1=s2 then lprint(i,s1); fi; od; end: P(10000);
Previous Showing 11-17 of 17 results.